All tasks have a default failure schema that makes the task’s ID, Name, Completion Code and Reason Code available in the Source tree of the downstream task. The Task Failure port is connected to the downstream task’s Event Sink port.
Failure handling can be made as simple or complex as you need it to be.
The following sample application sends an email message if the Text Splitter Task fails:
For more complex solutions, you can define a chain of tasks to handle failures, so that the failed execution of a task triggers the execution of the task chain. You can also connect multiple tasks to one failure port, causing these tasks to run in parallel. Finally you can handle errors that occur in tasks that are themselves handling errors.
The following sample application expands the above sample to trigger the Text File Generator to write a text file to disk if the SendMail Task fails to send the email message: