Sunday 28 September 2014

Informatica Workflow Recovery

When a PowerCenter workflow fails, it is the part of the operations team’s responsibility to troubleshoot the issue and successfully complete the workflow. A PowerCenter workflow fails when a task (e.g. session) inside the workflow fails for various reasons. When the root cause of the issue is understood and fixed the workflow has to be completed in such a way that only the failed task and other tasks which are yet to run are executed. Configuring the workflow for recovery helps you achieve this.

Workflow recovery allows you to continue processing the workflow and workflow tasks from the point of interruption. When you enable a workflow for recovery, the Integration Service saves the workflow state of operation in a shared location. The workflow state of operation includes the status of tasks in the workflow and workflow variable values. You can recover the workflow if it terminates, stops, or aborts. The workflow does not have to be running. You can recover a workflow if the Integration Service can access the workflow state of operation.

What is Workflow Recovery
Workflow recovery allows you to continue processing the workflow and workflow tasks from the point of interruption. During the workflow recovery process Integration Service access the workflow state, which is stored in memory or on disk based on the recovery configuration. The workflow state of operation includes the status of tasks in the workflow and workflow variable values.
The configuration in Informatica power centre includes.
1.       Workflow Configuration for Recovery
2.       Session and Tasks Configuration for Recovery
3.       Recovering the Workflow from Failure

1. Workflow Configuration For Recovery 
To configure a workflow for recovery, we must enable the below configurations in power centre
workflow for recovery or Configure the workflow to suspend on task error.

Enable Recovery: When you enable a workflow for recovery, the Integration Service saves the workflow state of operation in a shared location. You can recover the workflow if it terminates, stops, or aborts.
We can set up the automatic recovery in the workflow as shown in below image.


An optional High Availability (HA) license is required for this check box to be available for selection. Without the HA option, workflows must be recovered manually.

Suspend: When you configure a workflow to suspend on error, the Integration Service stores the workflow state of operation in memory. You can recover the suspended workflow if a task fails.
You can fix the task error and recover the workflow. If the workflow is not able to recover automatically from failure with in the maximum allowed number of attempts, it goes to 'suspended' state. 
Below image shows about setting workflow to suspend on error:


2. Session and Tasks Configuration for Recovery
Each session or task in a workflow has its own recovery strategy. When the Integration Service recovers a workflow, it recovers tasks based on the recovery strategy of each task or session specified. There are three different options available as below:
·    Restart task
·    Fail task and continue workflow
·    Resume from the last checkpoint

Restart task: This recovery strategy is available for all type of workflow tasks. When the Integration Service recovers a workflow, it restarts each recoverable task that is configured with a restart strategy. You can configure Session and Command tasks with a restart recovery strategy and other tasks have a restart recovery strategy by default. 

Fail task and continue workflow: It is only available for session and command tasks. When the Integration Service recovers a workflow, it does not recover the task. The task status becomes failed, and the Integration Service continues running the workflow.

Resume from the last checkpoint: This recovery strategy is only available for session tasks. The Integration Service saves the session state of operation and maintains target recovery tables. If the session aborts, stops, or terminates, the Integration Service uses the saved recovery information to resume the session from the point of interruption.

When you configure the session recovery strategy to resume from the last checkpoint, Integration Service stores the session state of operation in the shared location, $PMStorageDir. And also it is written to the recovery tables (PM_RECOVERY, PM_TGT_RUN_ID, PM_REC_STATE) to determine where to begin loading data to target tables, in case of a recovery. 
Below image shows the available session recovery options:


Below image shows available command task recovery options


3. Recovering the Workflow from Failure
Workflow can be either recovered in two ways as described below: 
Recovering Automatically:
If you have High Availability (HA) licence and the workflow is configured to recover automatically as described above, Integration service automatically attempts to recover the workflow based on the recovery strategy set of each session or task in the workflow. If the workflow is not able to recover automatically from failure with in the maximum allowed number of attempts, it goes to 'suspended' state, which can be then manually recovered.

Recovering Manually:
You can manually recover the workflow or individual tasks with in a workflow separately. You can access the options as shown in below image from the workflow manager or from the workflow monitor.

Recover workflow: Continue processing the workflow from the point of interruption. 
Recover Task: Recover a session but not the rest of the workflow. 
Recover workflow from a task: Recover a session and continue processing a workflow.



8 comments:

  1. This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing.
    Regards,
    cognos Training in Chennai

    ReplyDelete

  2. I appreciate your work on Informatica. It's such a wonderful read on Informatica.Keep sharing stuffs like this. I am also educating people on similar technologies so if you are interested to know more you can watch this:-
    https://www.youtube.com/watch?v=56vMQ1lG-vc

    ReplyDelete
  3. very informative blog and useful article thank you for sharing with us Informatica Online Course

    ReplyDelete
  4. Great presentation of Informatica form of blog and Informatica tutorial. Very helpful for beginners like us to understand Informatica course. if you're interested to have an insight on Informatica training do watch this amazing tutorial.:-https://www.youtube.com/watch?v=JX2KkZNaKu0


    ReplyDelete
  5. i have a question , i want to know the resume point of session, when we have enabled resume from last checkpoint, next resumption point will be the 1st row of next commit interval or will it commit all the rows which IS has read before abruption of session?suppose session terminated at 12000 th row and commit interval is 10000, so in next resumption 120001th row will be read or 10001th row will be read??

    ReplyDelete
  6. I feel Informatica and all it related aspects are very necessary to look for more information and above all provide solutions about getting to know about the right set of database complexities that exist.

    Informatica Read Rest Api

    ReplyDelete