Design Pattern to handle waterfall processing
<p>So, imagine spaghetti code. A task should go from 1 to 2 then to 3, etc. If a task breaks, abort the program. I can write this in a procedural manner, but would like to know if there is a design pattern for this.</p>

<p>I looked at Chain of Responsibility, but it does not fit. I already know which process should handle each task. Master/Worker does not fit either because it needs to be processed step by step.</p>

<p>Concrete problem at hand is - allow user to upload an Excel file, compare file to the database table structure, then update the database.</p>

<p>Steps would be:</p>

<ol>
<li>Upload the file - verify that file is uploaded, if not, return.</li>
<li>Verify that file is an excel file, if not, return.</li>
<li>Read file into a datatable, if error, return.</li>
<li>Get datatabe from the database, if error, return.</li>
<li>Load each datatable into respective 2D arrays, if error, return.</li>
<li>Compare if each array has same number of columns, if error, return.
etc etc etc...</li>
</ol>

<p>Is there a way to use a design pattern for this? Thanks.</p>