Task Recovery Strategies
The task recovery strategy determines whether the Data Integration Service reruns or skips a task that is interrupted or that encounters an error. Verify the recovery strategy for any Mapping task in the workflow.
A task can have one of the following recovery strategies:
- Restart
- When a task with a restart recovery strategy is interrupted or encounters a recoverable error, the Data Integration Service cancels the task and the workflow. The Data Integration Service restarts the task when the workflow recovers. When a task with a restart recovery strategy encounters a nonrecoverable error, the Data Integration Service aborts the task and the workflow.
- When you enable recovery on a workflow, all tasks use a restart recovery strategy by default.
- Define a restart strategy for any Mapping task that writes data for a Human task.
- Skip
- When a task with a skip recovery strategy encounters a recoverable error or a nonrecoverable error, the Data Integration Service skips the task. The Data Integration Service runs the next stage in the workflow. If the workflow does not encounter an error or an interruption, the workflow completes successfully.
- If the workflow is not enabled for recovery, the Data Integration Service skips any task that encounters a task error.
Restart Recovery Behavior
When a task with a restart recovery strategy is interrupted, the task state can become Canceled, Aborted or Completed. The Data Integration Service can restart canceled tasks.
The following table describes the task and workflow instance states when a task with a restart recovery strategy is interrupted:
Interruption | Task State | Workflow State | Description |
---|
Task encounters a nonrecoverable error | Aborted | Aborted | The task and the workflow are aborted. The workflow is not recoverable. |
Task encounters a recoverable error | Canceled | Canceled | The task and the workflow are canceled. The workflow is recoverable. |
User aborts the workflow instance | Aborted | Aborted | The Data Integration Service aborts the task and workflow instance. The workflow is not recoverable. |
User cancels the workflow instance | Completed/Running | Canceled | The Data Integration Service cancels the workflow instance and finishes running the current task. The workflow is recoverable. Because the current task runs to completion, the workflow status might change to Canceled while the task is still running. When the task completes, the task enters a Completed state unless the task is a Human task. A Human task remains in a Running state until the workflow recovers. When the workflow recovers, the Human task state changes to Completed when the steps in the task are completed. |
Service process shuts down unexpectedly | Canceled | Canceled | The task and the workflow are canceled. The workflow is recoverable. If the workflow is not configured for automatic recovery, the service process changes the task and workflow instance states to Canceled when the service process restarts. The interrupted task restarts when you recover the workflow. If the workflow is configured for automatic recovery, the service process recovers the workflow instance and restarts the interrupted task when the service process restarts. The service process changes the task and workflow instance states to Running. Note: Before the Data Integration Service restarts, the workflow state and the task state appear as Running, although the workflow and the task are no longer running. The Data Integration Service updates the workflow and task states when it restarts. |
Skip Recovery Behavior
When a task with a skip recovery strategy is interrupted, the task state becomes Failed, Completed, Canceled or Aborted. When a workflow instance runs in recovery mode, the Data Integration Service skips failed and completed tasks.
The following table describes the task and workflow instance state when a task with a skip recovery strategy is interrupted:
Interruption | Task State | Workflow State | Description |
---|
Task encounters a recoverable or nonrecoverable error | Failed | Completed | The Data Integration Service fails the task. The Data Integration Service runs subsequent workflow objects if expressions in the conditional sequence flows evaluate to true or if the sequence flows do not include conditions. If the workflow instance finishes running without another interruption, the Data Integration Service updates the workflow state to Completed. |
User aborts the workflow instance | Aborted | Aborted | The Data Integration Service fails the task and aborts the workflow instance. The workflow is not recoverable. |
User cancels the workflow instance | Completed/Running | Canceled | The Data Integration Service cancels the workflow instance and finishes running the current task. The workflow is recoverable. Because the current task runs to completion, the workflow status might change to Canceled while the task is still running. When the task completes, the task enters a Completed state unless the task is a Human task. A Human task remains in a Running state until the workflow recovers. When the workflow recovers, the Human task state changes to Completed when the steps in the task are completed. |
Service process shuts down unexpectedly | Canceled | Canceled | The workflow and the task are canceled. The workflow is recoverable. If the workflow is not configured for automatic recovery, the service process changes the workflow instance state to Canceled when the service process restarts. When you recover the workflow, the service process reruns the interrupted task regardless of the skip recovery strategy. If the workflow is configured for automatic recovery, the service process recovers the workflow instance and reruns the interrupted task when the service process restarts. The service process sets the workflow instance state to Running. The service process restarts the interrupted task regardless of the skip recovery strategy. Note: Before the Data Integration Service restarts, the workflow state and the task state appear as Running, although the workflow and the task are no longer running. The Data Integration Service updates the workflow and task states when it restarts. |
Human Task Restart Behavior
A Human task uses a restart recovery strategy. Unlike other task types, when an interrupted Human task restarts, it continues from the point at which it ceased operation. The Data Integration Service does not rerun the Human task from the beginning.
Consider the following rules and guidelines for Human task behavior:
- •When a Data Integration Service runs a Human task, the service creates and distributes task instances to users and groups in the Informatica domain. Each task instance identifies a subset of the workflow data that a user must analyze in the Analyst tool.
If the Data Integration Service does not distribute all task instances before the Human task is interrupted, the service continues to distribute the task instances when it restarts the task. The Human task does not restart from the beginning.
- •If the Data Integration Service distributes all task instances before the Human task is interrupted, the Analyst tool users can work on the instances. However, if the Human task contains multiple steps, the task data cannot move from a current task instance to a task instance that another step defines. When the workflow restarts, the Human task continues from the point of interruption and the task data can move to the next step.
- •If the workflow database connection fails during task instance creation, the workflow can enter one of several different states. The workflow might fail, or the Data Integration Service might not create all of the task instances that the Human task specifies.
If the workflow database connection fails before the Data Integration Service creates all of the Human task instances, stop the Data Integration Service. Verify that the workflow database connection is available, and restart the Data Integration Service. When the workflow recovers, the Data Integration Service tries to distribute any task instance that remains undistributed.
- •If a workflow enters an aborted state, any Human task in the workflow enters a Completed state.
Note: If you cancel a workflow that contains a Human task and you try to redeploy the application, the Developer tool might stop responding. This might occur if you abort the workflow when the Human task is in the task creation phase. When the Human task returns control to the workflow, the Developer tool responds and deploys the application.