PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12/27/2018 9:23 AM by  dmcdougald
IPA Batch Job Montioring after WebRun node kicks it off
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Deb Hartman
Sr. Application Analyst
Cooper University Health Care
New Member
(3 points)
New Member
Posts:3


Send Message:

--
11/14/2018 10:10 AM

    When we kick off a batch job with the WebRun node in IPA, is there a way to delay the flow from moving to the next node until the job successfully completes?  Or do we have to use a Wait node and determine how long the job usually takes to run?

    Thanks in advance for your help!

    David Williams
    Private
    Private
    Veteran Member
    (3160 points)
    Veteran Member
    Posts:1064


    Send Message:

    --
    11/14/2018 10:13 AM
    Of course! You can query the Job Queue table to check the status of the job and if it is still running, go into a wait for a few minutes and keep checking until it's done.
    David Williams
    JimY
    Private
    Private
    Veteran Member
    (1315 points)
    Veteran Member
    Posts:469


    Send Message:

    --
    11/15/2018 7:56 AM
    Check out KB 1667935 on the Infor Support site. It has sample IPA Flows and one of them is submitting a job and checking the status.
    pbelsky
    Corporate Applications Analyst
    Green Bay Packaging
    Veteran Member
    (230 points)
    Veteran Member
    Posts:80


    Send Message:

    --
    12/01/2018 11:15 AM

    I also query QUEUEDJOB, but use it a little differently. The query below checks the job's staus code in QUEUEDJOB every .01 seconds and breaks out of the loop when the status is no longer zero. Then the select returns the final status code of the job so you can check and act on it.

     

    DECLARE @status as integer
    DECLARE @timer as decimal(8,0)
    SET @status = 0
    SET @timer = 1

    WHILE @status = 0
    BEGIN
    WAITFOR DELAY '00:00:00.100'
    SET @status = (SELECT STATUS FROM .dbo.QUEUEDJOB WHERE JOBNUMBER = '')
    --PRINT @status
    IF @timer = 6000
       BREAK
    ELSE
       SET @timer = @timer + 1
       --PRINT @timer
    END

    SELECT A.STATUS
    FROM .dbo.QUEUEDJOB A
    WHERE A.JOBNUMBER = ''

    pbelsky
    Corporate Applications Analyst
    Green Bay Packaging
    Veteran Member
    (230 points)
    Veteran Member
    Posts:80


    Send Message:

    --
    12/01/2018 11:16 AM

    Sorry, sql did not paste in properly:

    DECLARE @status as integer
    DECLARE @timer as decimal(8,0)
    SET @status = 0
    SET @timer = 1

    WHILE @status = 0
    BEGIN
    WAITFOR DELAY '00:00:00.100'
    SET @status = (SELECT STATUS FROM .dbo.QUEUEDJOB WHERE JOBNUMBER = 'xxxxx')
    --PRINT @status
    IF @timer = 6000
       BREAK
    ELSE
       SET @timer = @timer + 1
       --PRINT @timer
    END

    SELECT A.STATUS
    FROM .dbo.QUEUEDJOB A
    WHERE A.JOBNUMBER = 'xxxxx'

     

    dmcdougald
    System Analyst
    Private
    (9 points)
    Posts:3


    Send Message:

    --
    12/27/2018 9:23 AM

    Here is the example written in IPA as mentioned above. You might have more control over error handling if you do it this way as opposed to SQL.

    Attachments
    You are not authorized to post a reply.