Workflow: Running in loops

Workflow: Running in loops

Posted by: Collaborative Consulting

Template which provide a simple solution to perform looping of a workflow.

Overview

The solution to loop a workflow/mapping consists of the following components: A. Control table: This table has at a minimum two columns, one column stores the value based on which looping has to be performed which in our case is Dept_ID. The second column specifies if the row has been processed.
DEPT_ID PROCESSED
101X
102
B. Parent workflow: This workflow consists of a mapping which determines if the there are any rows left in the control table that have to be processed. If yes then it calls the child workflow else it creates an indicator file which signals the end of the loop. C. Child workflow: This workflow contains the mapping which needs to be looped as per the requirement. The mapping also updates the control table to flag the row which it is currently processing.Both the workflow contains command task which call each other using pmcmd with NOWAIT parameter. The values in the control table have to be reset prior to process.You can download this listing as part of the Advanced Workflow Techniques.

Features

Solution to loop through a workflow. Sample mapping xml and workflow are provided as XML?s. DDL for control table is provided.Visio flows for the workflows are also provided using Informatica stencil.

Current Version: 1.0Release Date: 4/4/2011 System Requirements:

  • Informatica PowerCenter 9.1 and 9.5

Support

Email: brajagopal@collaborative.com Phone : 001.781.565.2600 Fax : 001.781.565.2700Website :www.collaborative.com Head Office Headquarters Boston70 Blanchard Road, Suite 500Burlington, MA 01803

Comments (6) Comment can only be posted by Signed/Logged in user

Sort: Newest | Oldest
  • Hi,

    I followed the steps. The parent workflow is calling the child workflow properly.

    However, the child workflow fails to call parent in a loop as the instance of parent is still executing.

    In other words, the paren is still in execution mode after calling the child. When child tries to call the parent again, it fails as there is already an active execution of the parent.

    Could you please advise how parent can immediately complete after calling the child and not wait on the child?

    Thanks,

    Srinivas

  • Does it work with 3rd party scheduler? When I have 10 loops, how the 3rd party scheduler can wait till the 10 loops are complete.At this time, this looks like sceduler will go to success when the first loop is intiated.I am using Informatica PC 10.2
  • It doesn't work.Unable to Import into repository using repository manager. Error is Error at (file C:\IPC\wkf_Looping_Example_Parent_Child.XML, line 313, char 315 ): Attribute 'EXECORDER' is not declared for element 'VALUEPAIR'.Error encountered while Parsing file
     |   2
     Load replies
  • Hi, I downloaded the files and tried importing the XML file in repository manager. It gives an error:Error at (file H:\Informatica\wkf_Looping_Example_Parent_Child.XML, line 313, char 315 ): Attribute 'EXECORDER' is not declared for element 'VALUEPAIR'.Error encountered while Parsing file
     |   2
     Load replies
  • Can I get the mapping xmls of the above process mentioned.
     |   1
     Load replies
  • An alternative (and simpler solution) is to have one WF scheduled to run continuously.Inside put a special session that checks the control table to see if at least one row needs processing. If that is the case write 1 row to a target flat file (dummy) otherwise write 0 rows to the target flat file.In the WF after the session you can test on 'target success rows' to do either A) run whatever sessions nessesary to process the dataB) sleep (timer task) for some time until the next time you want the WF to look into the control table for more data to process.I have used this kind of workflows to look for new data in both flat file sources, relational and web services at specified maximum intervals :)
     |   2
     Load replies
Recommended Products