The following examples describe interrupted workflow instances and describe how the Data Integration Service tries to recover each instance. In each example, the workflow is enabled for recovery and each task is a Command task, a Mapping task, or a Notification task.
The workflow encounters the following interruptions:
You cancel the workflow instance.
You cancel the workflow instance while Task 2 is running. The Data Integration Service completes Task 2 and then cancels the workflow instance. The three tasks and the workflow instance have the following states:
When the workflow recovers, the Data Integration Service passes over Task 1 and Task 2 and runs Task 3 for the first time.
You abort the workflow instance while a task with a skip recovery strategy is running.
You abort the workflow instance while Task 2 is running. Task 2 has a skip recovery strategy. The Data Integration Service aborts Task 2 and then aborts the workflow instance. The three tasks and the workflow instance have the following states:
You cannot recover the workflow instance because you aborted the workflow.
The Data Integration Service process shuts down unexpectedly. The workflow is configured for recovery.
The Data Integration Service process shuts down while Task 2 is running. Task 2 is a Notification task. The three tasks and the workflow instance have the following states when the service process restarts:
When the workflow recovers, the Data Integration Service passes over Task 1, restarts Task 2, and runs Task 3 for the first time.
A task with a restart recovery strategy encounters a recoverable error.
Task 2 has a restart recovery strategy and encounters a recoverable error. The service cancels Task 2 and then cancels the workflow instance. The three tasks and the workflow instance have the following states:
When the workflow recovers, the Data Integration Service passes over Task 1, restarts Task 2, and runs Task 3 for the first time.
A task with a skip recovery strategy encounters an error. You cancel the workflow instance.
Task 2 has a skip recovery strategy. The task encounters an error and fails. The outgoing sequence flow does not contain a condition to verify that Task 2 succeeded. As a result, the Data Integration Service continues to run subsequent workflow objects. You cancel the workflow instance while Task 3 is running. Task 3 has a restart recovery strategy. The Data Integration Service cancels Task 3 and then cancels the workflow instance. The four tasks and the workflow instance have the following states:
When the workflow recovers, the Data Integration Service passes over Task 1 and Task 2, restarts Task 3, and runs Task 4 for the first time. During the recovery run, Task 3 and Task 4 complete successfully. The Data Integration Service updates the final workflow state to Completed.
A task with a skip recovery strategy encounters an error. You abort the workflow instance.
Task 2 has a skip recovery strategy. The task encounters an error and fails. The outgoing sequence flow does not contain a condition to verify that Task 2 succeeded. As a result, the Data Integration Service continues to run subsequent workflow objects. You abort the workflow instance while Task 3 is running. Task 3 has a restart recovery strategy. The Data Integration Service aborts Task 3 and then aborts the workflow instance. The four tasks and the workflow instance have the following states:
You cannot recover the workflow instance because you aborted the workflow.
A task with a skip recovery strategy encounters an error. The outgoing conditional sequence flow checks for task failure.
Task 1 has a skip recovery strategy. The task encounters an error and fails. The outgoing sequence flow contains a condition to verify that Task 1 succeeded. Because the condition returns false, the Data Integration Service stops processing subsequent workflow objects and completes the workflow instance. The three tasks and the workflow instance have the following states:
You cannot recover the workflow instance because the workflow instance completed.
A task fails due to a task error in a workflow that does not support recovery.
Because the workflow does not specify a workflow recovery strategy, the Data Integration Service skips any task that fails due to a task error. The workflow can run to completion. The three tasks and the workflow instance have the following states:
You cannot recover the workflow instance because the workflow instance completed.
A mapping in a Mapping task generates no exception data for a Human task. The active sequence flow in the workflow reaches a Terminate event.
Task 1 is a Mapping task and Task 2 is a Notification task. The Mapping task generates exception data for a downstream Human task. The Notification task sends an email that contains the number of exception rows that the mapping in the Mapping task generates. The workflow includes an Exclusive gateway that connects to the Human task and to a Terminate event.
The first sequence flow on the gateway connects to the Terminate event and includes a condition that evaluates the output from the Mapping task. The second sequence flow on the gateway connects to the Human task. Because the mapping that Task 1 specifies generates no exception data, the conditional sequence flow on the gateway triggers the Terminate event. The tasks and the workflow instance have the following states: