7 Replies Latest reply on Jun 13, 2021 1:40 AM by Nico Heinze

    How to run two work flows in loop  without using command task in informtica powercenter

    Ronu Raj New Member

      Hi ,

       

      I had asked in an interview that, how to run two workflows in a loop without  using command task .

       

      Anybody help me how to achieve this ?

       

      Thanks ..

        • 1. Re: How to run two work flows in loop  without using command task in informtica powercenter
          Smitha HC Guru

          Hi Ronu,

           

          You can try using the Post session command to start another workflow using the Startworkflow command.

           

          Thanks,

          Smitha

          • 2. Re: How to run two work flows in loop  without using command task in informtica powercenter
            David Lopez Cruz Guru

            Hi Ranu,

            I don't think it is possible to get that without using commands as the workflow is the higher hierarchy within PowerCenter, and you need to create a relationship between two workflows to integrate them in a loop.

             

            Otherwise, I would suggest to use a scheduler to run continuously the workflow.

             

            Hope it helps.

             

            Regards,

            David

            • 3. Re: How to run two work flows in loop  without using command task in informtica powercenter
              Nico Heinze Guru

              There is one option, assuming you have the Web Service Hub (WSH) license for PowerCenter:

              The WSH offers so-called "batch web services", a collection of SOAP based calls to control and monitor the execution of single tasks or workflows.

              So what you can do is to have two workflows wf_1 and wf_2, each of which has a final session to interact with the WSH. wf_1 will invoke wf_2 via the WSH in no-wait mode (see below) and then terminate, wf_2 will invoke wf_1 via the WSH in no-wait mode and then terminate.

               

              What does "no-wait mode" mean?

              When you start a workflow either with the command-line tool pmcmd or via the WSH, you can tell whether you want for the called workflow to finish or not. In wait mode the caller (in your case either wf_1 or wf_2) would wait for the other workflow to finish, and this would not make sense here. So you would disable this check box and simply request the WSH to start the other workflow.

               

              Other than that I don't see any way without a command task (which would invoke pmcmd), at least no built-in way. Of course you can always program your own Custom Transformation in C to invoke pmcmd, or you can do the same from a Java transformation; but both these features require programming (the CT even requires you to deploy an additional shared library to all PowerCenter servers), and not every customer would be willing to accept this necessity. But it is possible.

               

              Regards,

              Nico

              • 4. Re: How to run two work flows in loop  without using command task in informtica powercenter
                Ronu Raj New Member

                Hi Smitha,

                Thanks for your quick reply? Could you please elaborate on same ?

                Thanks

                • 5. Re: How to run two work flows in loop  without using command task in informtica powercenter
                  Nico Heinze Guru

                  Just to be pernickety again, the post-session command is (technically spoken) a command task embedded in a session.

                  It would be good if you could explain the reason for your question, that might help to give a better answer.

                   

                  Regards,

                  Nico

                  • 6. Re: How to run two work flows in loop  without using command task in informtica powercenter
                    Ronu Raj New Member

                    Hi Nico,

                     

                    Thanks for you quick reply. I know we can run two workflows in loop continuously by writing command task before and after both the workflows.

                     

                    But in one of the interview they have asked that how to run two workflows continuously without using any command task.

                     

                    So i am not sure how to achieve this using infa  powercenter. that's why i am posting my question here.

                     

                    Thanks.

                    • 7. Re: How to run two work flows in loop  without using command task in informtica powercenter
                      Nico Heinze Guru

                      Technically spoken we have to differentiate between mechanisms built into PowerCenter and other mechanisms (outside of PowerCenter).

                       

                      If we're talking about mechanisms built into the software, then command tasks (no matter whether so-called standalone command tasks in a workflow / worklet or pre- / post-session command tasks) and the web service hub are the only ways to invoke (other) workflows from within a workflow.

                       

                      If we're talking about mechanisms not built into the software, then we're talking about either using the command-line tool pmcmd (which can be invoked, for example, from some batch file / shell script / scheduling software), the so-called Operations API (formerly known as the Load Manager API, abbreviated LMAPI, available in C or Java), or the web service hub.

                       

                      I don't know of any other mechanisms to invoke workflows (no matter from where).

                      So if they are asking about running two workflows within an "eternal" loop without using command tasks, then all other choices may be used:

                      - invoke the "other" workflow from the current workflow using the web service hub,

                      - starting those workflows from a scheduling tool or a batch file / shell script in a loop,

                      - using a C or Java program to communicate with the Integration Service directly via the Operations API.

                       

                      Regards,

                      Nico