You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -167,16 +167,34 @@ The pattern is a combination of two: conditional and + error handling. The pipel
167
167
168
168
:::image type="content" source="media/tutorial-pipeline-failure-error-handling/conditional-complex-1.png" alt-text="Screenshot showcasing pipeline proceeds to next step if any of the activities pass, or else runs error handling code.":::
169
169
170
+
## Common Patterns
170
171
171
172
### Try-Catch-Proceed
172
-
The pattern is equivalent to try catch block in coding. It states that if either the activity or the error handling code succeeds, the pipeline should proceed. We've simplified and streamlined the implementation for our customers. Try catch block doesn't need an if block.
173
+
The pattern is equivalent to try catch block in coding. An activity might fail in a pipeline. When it fails, customer needs to run an error handling job to deal with it. However, the single activity failure shouldn't block next activities in the pipeline. For instance, I attempt to run a copy job, moving files into storage. However it might fail half way through. And in that case, I want to delete the partially copied, unreliable files from the storage account (my error handling step). But I'm OK to proceed with other activities afterwards.
174
+
175
+
To set up the pattern:
173
176
174
177
* Add first activity
175
178
* Add error handling to the UponFailure path
176
179
* Add second activity, but don't connect to the first activity
177
180
* Connect both UponFailure and UponSkip paths from the error handling activity to the second activity
178
181
179
-
:::image type="content" source="media/tutorial-pipeline-failure-error-handling/conditional-complex-2.png" alt-text="Screenshot showcasing pipeline with try catch block.":::
182
+
:::image type="content" source="media/tutorial-pipeline-failure-error-handling/error-handling-1-try-catch.png" alt-text="Screenshot showcasing pipeline with try catch block.":::
183
+
184
+
Error Handling job runs only when First Activity fails. Next Activity will run regardless if First Activity succeeds or not.
185
+
186
+
### Generic Error Handling
187
+
Commonly, we have multiple activities running sequentially in the pipeline. If any fails, I need to run an error handling job to clear the state, and/or log the error. For instance, I have sequential copy activities in the pipeline. If any of these fails, I need to run a script job to log the pipeline failure.
188
+
189
+
To set up the pattern:
190
+
191
+
* Build sequential data processing pipeline
192
+
* Add generic error handling step to the end of the pipeline
193
+
* Connect both UponFailure and UponSkip paths from the last activity to the error handling activity
194
+
195
+
:::image type="content" source="media/tutorial-pipeline-failure-error-handling/error-handling-2-generic-no-branching.png" alt-text="Screenshot showcasing pipeline with generic error handling in a pipeline with no branching.":::
196
+
197
+
The last step, Generic Error Handling, will only run if any of the previous activities fails. It will not run if they all succeed.
0 commit comments