11 Replies Latest reply on Apr 12, 2019 3:08 AM by Nico Heinze

    Command Task to trigger workflow is failing.

    chaitanya mannem Active Member

      Severity Timestamp Node Thread Message Code Message ERROR 1/11/2018 5:23:05 PM  4436 LM_36623 Command task instance [cmd_--ABC]: execution of command [Command1] did not complete successfully with exit code [3]

       

      Command task failing with above error.

       

      Any idea?

        • 1. Re: Command Task to trigger workflow is failing.
          Nico Heinze Guru

          If you could please post the command line, we may be able to help.

          Also it would be helpful to know the exact OS version, the Informatica version, the PATH environment variable, and (if running on Unix/Linux) the exact content of the environment variable LD_LIBRARY_PATH (Solaris/Linux) resp. LIBPATH (AIX).

           

          Regards,

          Nico

          • 2. Re: Command Task to trigger workflow is failing.
            chaitanya mannem Active Member

            Hi Nico,

             

            Windows server,informatica 10 version.

             

             

            $PMRootDir\Scripts\startWorkflow.bat $$Param_IS $$Param_DOM $$Param_FOLDER WF_ABC

             

            :: startWorkflow.bat
            :: Batch file used to startworkflows
            :: Usage: validFile.bat [Integration Service] [Domain Name] [Folder] [Workflow] [wait]

            :
            set eCode=0
            IF _%1==_ (exit /B 99) ELSE (set iService=%1)
            IF _%2==_ (exit /B 98) ELSE (set pcDomain=%2)
            IF _%3==_ (exit /B 97) ELSE (set pcFolder=%3)
            IF _%4==_ (exit /B 96) ELSE (set pcWorkflow=%4)
            IF _%5==_ (set waitTag=-nowait) ELSE (
            IF /I "%5" EQU "wait" (set waitTag=-wait) ELSE (exit /B 95))

            :: call pmcmd command
            pmcmd startworkflow -sv %iService% -d %pcDomain% -uv INFA_USR -pv INFA_PWD -f %pcFolder% %waitTag% %pcWorkflow%

            • 3. Re: Command Task to trigger workflow is failing.
              Nico Heinze Guru

              It's been a long time that I've seen a batch file like this, but as far as I can tell this looks clean to me.

               

              could you please post the parameter file for the workflow?

               

              Could you please also verify that the directory $PMRootDir\Scripts exists on the server?

               

              Does the Informatica Domain (i.e. the Tomcat installation) run under a local user or with a domain user ID?

              If it's a domain user ID (probably belonging to a group with local admin rights), could you please try replacing the path $PMRootDir\Scripts\ with the complete "hard-coded" directory path?

               

              Second, assuming it's indeed a domain user ID and not a local user ID of the PowerCenter server, could you please have your Windows network admins grant full access to the $PMRootDir\Scripts directory to the user ID explicitly?

              In the past I've seen more than one case where somehow the access permissions for subdirectories were not inherited correctly from the Active Directory, so we had to grant explicit access permissions to the respective directories to the user; the access permissions from the user group in the Windows domain were simply not correctly handed  over from the´group to this particular user ID.

               

              Regards,

              Nico

              • 4. Re: Command Task to trigger workflow is failing.
                chaitanya mannem Active Member

                I have another workflow running successfully with same script and everything is similar except the workflow name to trigger.

                This may be problem with the workflow that is triggered by this command task.

                • 5. Re: Command Task to trigger workflow is failing.
                  chaitanya mannem Active Member

                  My requirement is actually is looping two workflows to load multiple files one after other.

                  At end of each workflow included the command task with batch I shared above to run other workflow.

                  but the command task failing most of  times it also getting succeeded few times.

                  Strange.

                  Please let me know if you have any clarification.

                  • 6. Re: Command Task to trigger workflow is failing.
                    Nico Heinze Guru

                    Do both workflows use the same script to invoke each other in turn?

                     

                    In this case it's clear why it can't work: you cannot start a workflow which is still running; and the script performs a "pmcmd StartWorkflow ... -wait", so it's still running (meaning the workflow which started the script is still running, too) when the other workflow tries to restart this workflow.

                     

                    Otherwise I'm out of ideas at this moment.

                     

                    Regards,

                    Nico

                    • 7. Re: Command Task to trigger workflow is failing.
                      chaitanya mannem Active Member

                      Hi Nico,

                       

                       

                      Thanks for reply.

                       

                      Yes Both workflows using same scripts to run.

                       

                      Any idea what is the solution in this case ?

                       

                      Should I try with different scripts?

                       

                      Thanks,

                      Chaitanya

                      • 8. Re: Command Task to trigger workflow is failing.
                        Nico Heinze Guru

                        Nope, that won't help.

                         

                        The point is this:

                         

                        You have two workflow wf_1 and wf_2.

                         

                        wf_1 runs and finally tries to start wf_2 in wait mode. So wf_1 is still running, waiting for wf_2 to finish.

                         

                        wf_2 is started from wf_1 and runs. Before it ends, it tries to start wf_1. However, wf_1 is still running (because it waits for wf_2 to finish). So, wf_2 cannot possibly start wf_1 (because it's still running).

                         

                        The error is to start the other workflow in wait mode. Why has this been done?

                         

                        Try starting the workflows in the script in nowait mode, that should help.

                         

                        Regards,

                        Nico

                        • 9. Re: Command Task to trigger workflow is failing.
                          chaitanya mannem Active Member

                          I think I have the issue in wait mode as well.

                          Let me modify the script and run the workflow again.

                          will keep you posted on this.

                           

                           

                          Thanks,

                          Chaitanya

                          • 10. Re: Command Task to trigger workflow is failing.
                            Eva Donaldson New Member

                            I know this is an old post but I am having exactly this problem.  Did you ever find a solution?

                            • 11. Re: Command Task to trigger workflow is failing.
                              Nico Heinze Guru

                              Please post the command you're using (without password, of course ), the batch file you're calling, and the exact error message you're getting.

                               

                              Regards,

                              Nico