Concatenating Jobs on a Process Flow

 4 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Tony Rubi
New Member
Posts: 2
New Member
    We are creating a process flow and we need to concatenate a set of jobs, so that after the first job is completed the second one starts, and the third one starts after the second and so on...
    Now we are creating a process flow and passing each job as a system command node, then putting a user action node after it so that it checks if the job is still active (with a web run).  The entire flow is working fine except that we have to wait at least one hour from one job to the next as the time out in the user action cannot be less than one hour.
    Is there a way to concatenate them so that one job starts as soon as the previous one ends.
    Is there an event that gets fired when a job stops with normal completion?
    Bob Canham
    Veteran Member
    Posts: 217
    Veteran Member
      Rather than starting your job using the system command, you can use WebRun. The jobrun parameters
       can kick off a job and there is a &WAIT=TRUE parameter you can send so that the WebRun node doesn't move on until the job finishes.  If you do that, you can just string your web run nodes together to kick off several jobs. 

      The syntax is:
      [CODE] FUNC=run&USER=&JOB=&OUT=xml&WAIT=true


      if you're using IPA you can also put
      63
      in the success string field to know if it was a successful run or not.
      Kyle Jorgensen
      Veteran Member
      Posts: 122
      Veteran Member
        Use the "WebRun" node to run the jobs. Set the 'wait' parameter to true. Have the output be XML. Have a node after the WebRun to check if the job completed normally (check for the string
        63
        which indicates the job completed normally. If all is well just connect to another WebRun node for the next job.

        We do this to automate back office reports that we publish in LBI as well as automate large chunks of our payroll processing.
        Tony Rubi
        New Member
        Posts: 2
        New Member
          Thanks for the tip!
          Now I have a couple of questions...
          1) What if I don't get the STATUS 63? Should I loop back to the WebRun?
          2) We put the WAIT in a job that took 42 minutes but the system only waited 13 minutes and then kicked in the next job. Why it didn't wait long enough?
          Thanks for the help!
          Kyle Jorgensen
          Veteran Member
          Posts: 122
          Veteran Member
            A status other than 63 means something went wrong with the job. You'll probably need to code the flow to notify someone to take a look at what's wrong. Something to note about these status codes; just because you got a status of 63 doesn't mean that the job did what it was suppose to. It just means the job finished successfully. However, every record could have encountered an error and wrote to an error file. We've incorporated a standard of doing a double-check on batch jobs. 1.) did the job finish successfully? 2.) did the job encounter any critical data errors?

            If you use the 'wait' parameter, you'll need to make sure that the job timeout setting in WAS is set sufficiently high enough to accomodate your longest running job. I know that the setting is in WAS, unfortunately I'm on the programming side of our house and can't point you to the exact place where you set it. Perhaps others on this forum can.

            Here's what the different job status mean:
             
            Status Translations :
            00 : running
            30 : Waiting
            31 : Waiting Step
            32 : Waiting on Time
            33 : Waiting Recovery
            34 : Needs Recovery
            35 : Invalid Parameters
            36 : Queue Inactive
            37 : Hold
            60 : Recurring Skipped
            61 : Recovery Deleted
            62 : Cancelled
            63 : Normal Completion