PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04/06/2017 8:01 AM by  TimC
Multi-step Job Execution in IPD
 37 Replies
Sort:
You are not authorized to post a reply.
Author Messages
TimC
Systems Analyst
Private
Veteran Member
(220 points)
Veteran Member
Posts:84


Send Message:

--
02/22/2017 11:57 AM

    How do I execute a multi-step job in IPD?  the _JOB-TYPE defaults to MULTISTEP.

    Here's my S3 query:

    _PDL=TEST&_TKN=AP150&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&ADDENDA-OPTION=N&CURRENCY-OPT=I&DISC-OPTION=N&JOB-DESCRIPTION=&JOB-NAME=&PAY-GROUP=&PAY-INV-IMMED=N&PAY-THRU-DATE=&PAYMENT-CODE=CHK&PAYMENT-DATE=&PRINT-VOUCHER=N&RECONCILE-ADV-EXP=N&REPORT-SEQ=N&SEL-CASH-CODE=&_STEPNBR=1&SPEC-HANDLING=N&UPDATE-OPTION=Y&USER-NAME=&VOUCHER-NBR-FLAG=N&_DELIM=%09&_OUT=XML&_EOT=TRUE

    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/22/2017 11:59 AM
    The job is clearly defined on the server and in my reference in the query call. However, I'm getting a [JOBNAME] NOT FOUND error. We recently upgraded to 10.
    Bob Canham
    Private
    Private
    Veteran Member
    (561 points)
    Veteran Member
    Posts:203


    Send Message:

    --
    02/22/2017 12:11 PM
    Are you trying to change the job parameters? or just execute it? If you're trying to change the parameters, I don't think that is possible since you can't update it on the AP150 screen online. If you're trying to execute it, then you should be using the webrun node to use the jobrun cgi. That should work. There are some other posts about newer methods of executing jobs as well that I hear are needed for newer versions of 10. I've been on 10 for a while so jobrun still works for me.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/22/2017 2:00 PM
    Sorry. Bad terminology. Update the parameters. Here's my S3 query below.

    Here's my S3 query:

    _PDL=TEST&_TKN=AP150&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&ADDENDA-OPTION=N&CURRENCY-OPT=I&DISC-OPTION=N&JOB-DESCRIPTION=&JOB-NAME=&PAY-GROUP=&PAY-INV-IMMED=N&PAY-THRU-DATE=&PAYMENT-CODE=CHK&PAYMENT-DATE=&PRINT-VOUCHER=N&RECONCILE-ADV-EXP=N&REPORT-SEQ=N&SEL-CASH-CODE=&_STEPNBR=1&SPEC-HANDLING=N&UPDATE-OPTION=Y&USER-NAME=&VOUCHER-NBR-FLAG=N&_DELIM=%09&_OUT=XML&_EOT=TRUE
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/22/2017 2:26 PM
    I didn't paste in the parameters for security purposes. Just wondering if the base query is accurate. Or, perhaps a simple learning of the strategy to submit a multi-step job (query updates) and webrun job executions. I wish I could submit a screen capture to show the progress..
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/22/2017 3:03 PM
    The job has 3 steps. So, how do you define each step update in query nodes?
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 8:22 AM
    Hi there. Any thoughts folks?
    Woozy
    Private
    Private
    Veteran Member
    (3487 points)
    Veteran Member
    Posts:707


    Send Message:

    --
    02/23/2017 8:43 AM
    Hi TimC,

    I really don't have an answer to your question, but I am going to ask a question for you to consider. If you are using IPA to trigger this, why don't you separate it into three separate single-step jobs rather than one multi-step job? This would greatly simplify things within IPA even though it adds additional nodes.

    Multi-step jobs are convenient for human users, but IPA doesn't care if it's one step or three.

    Kelly
    Kelly Meade
    J. R. Simplot Company
    Boise, ID
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 8:54 AM
    Hi Kelly,
    That is a consideration and we'll be testing that. Was just wondering if it was possible to do and how to define update of parameters of each step.
    David Williams
    Private
    Private
    Veteran Member
    (3061 points)
    Veteran Member
    Posts:1031


    Send Message:

    --
    02/23/2017 9:07 AM
    I think the job has to be defined in Portal, not LID, in order for the Web Run to 'see' it.
    David Williams
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 9:15 AM
    My current issue is that the S3 query node that performs the update doesn't see the job name. As mundane as it sounds, the job absolutely exists and the JOB-NAME parameter matches that name. However, it's throwing an error saying that it's not found.

    Here's the query. Parameter values left out for security reasons.

    _PDL=TEST&_TKN=AP150&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&ADDENDA-OPTION=N&CURRENCY-OPT=I&DISC-OPTION=N&JOB-DESCRIPTION=&JOB-NAME=&PAY-GROUP=&PAY-INV-IMMED=N&PAY-THRU-DATE=20170101&PAYMENT-CODE=CHK&PAYMENT-DATE=20170101&PRINT-VOUCHER=N&RECONCILE-ADV-EXP=N&REPORT-SEQ=N&SEL-CASH-CODE=&_STEPNBR=1&SPEC-HANDLING=N&UPDATE-OPTION=Y&USER-NAME=&VOUCHER-NBR-FLAG=N&_DELIM=%09&_OUT=XML&_EOT=TRUE
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 9:18 AM

    a job record is a job record.....there is no difference between a portal and LID job record

    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 9:19 AM
    if you are in a windows system, remember that the user name must include the domain when you are setting the jobname in the query
    Bob Canham
    Private
    Private
    Veteran Member
    (561 points)
    Veteran Member
    Posts:203


    Send Message:

    --
    02/23/2017 9:24 AM
    yeah, if it is multistep, then the S3 query and S3 transaction node won't be able to interact with it. Essentially, unless you can open up the AP150 and inquire on this job, the S3 nodes won't be able to do anything with it. For multistep, you have to manage them either in the special form in Portal or on jobdef which the S3 nodes can't do.

    Your best bet if you need to update parameters is to split it apart and run them as individual jobs, not multistep.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 9:31 AM
    OK. The error that I'm getting is "JOB NAME $$$$$$ NOT FOUND", when it clearly exists. Even if we create it as a simple job type (single job). How does my query above look? I must be missing a parameter somewhere I suspect.....
    Bob Canham
    Private
    Private
    Veteran Member
    (561 points)
    Veteran Member
    Posts:203


    Send Message:

    --
    02/23/2017 9:36 AM
    That job is a multistep, not an AP150 job. If you try to inquire on AP150 with that user id and that job name, it will tell you it isn't found.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 9:43 AM
    we have a service account that IPA is running as, and, I'm logged into IPD as that same user.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 9:44 AM
    We tested this by creating a single step job and I received the same error.
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 9:46 AM
    i don't see jobname defined in the query.

    here is a query that works:

    _PDL=&_TKN=AP520&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&BATCH-NUM=&JOB-DESCRIPTION=PATIENT REFUNDS INTERFACE&VENDOR-SEQUENCE=N&COMPANY=1000&JOB-NAME=AP520&USER-NAME=INFORBC\lawson&_DELIM=%09&_OUT=XML&_EOT=TRUE

    note the domain name in the user name.....
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 10:01 AM
    my earlier attempt got weirded out......

    _PDL=&_TKN=AP520&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&BATCH-NUM=&JOB-DESCRIPTION=PATIENT REFUNDS INTERFACE&VENDOR-SEQUENCE=N&COMPANY=1000&JOB-NAME=AP520&USER-NAME=INFORBC\lawson&_DELIM=%09&_OUT=XML&_EOT=TRUE
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 10:01 AM
    "JOB 101EMP NOT FOUND". The job is owned by a service account and I am logged into IPD as that user and trying to run an S3 update node. Heres the output.

    <_PDL>TEST<_TKN>AP150<_LFN>TRUE<_PRE>TRUE<_JOBTYPE>SIMPLEAP150 CSubmitReportsJob SchedPrint Mgr101EMP101EMPdomain\svcaccount000000000002101YN20170303N20170303NAP PaymentsNNo0101CSHCD0CHKNNIVENDRNN0Job 101EMP Not Found***001JOB-NAME
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 10:04 AM
    it appears that this website is dropping text enclosed in angle brackets. there are variable values for prodline and batchnumber in the "real" query
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 10:09 AM
    Ah.... I guess I have to escape out the brackets.
    More to come....
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 11:00 AM
    OK. I hope this is better...

    <_PDL>TEST<_TKN>AP150<_LFN>TRUE<_PRE>TRUE<_JOBTYPE>SIMPLEAP150 CSubmitReportsJob SchedPrint Mgr101EMP101EMPccmc\svclawfinbuser000000000002101YN20170303N20170303NAP PaymentsNNo0101CSHCD0CHKNNIVENDRNN0Job 101EMP Not Found***001JOB-NAME";


    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 11:15 AM
    OK. It doesn't like the xml format... Here's the actual query:
    _PDL=TEST&_TKN=AP150&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&ADDENDA-OPTION=N&CURRENCY-OPT=I&DISC-OPTION=N&JOB-DESCRIPTION=101EMP&JOB-NAME=101EMP&PAY-GROUP=999&PAY-INV-IMMED=N&PAY-THRU-DATE=20170101&_JOBTYPE=MULTISTEP&&_STEPNBR=1&PAYMENT-CODE=CHK&PAYMENT-DATE=20170101&PRINT-VOUCHER=N&RECONCILE-ADV-EXP=N&REPORT-SEQ=N&SEL-CASH-CODE=999&SPEC-HANDLING=N&UPDATE-OPTION=Y&USER-NAME=domain\serviceuser&VOUCHER-NBR-FLAG=N&_DELIM=%09&_OUT=XML&_EOT=TRUE
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 1:10 PM
    and why is this still multi-step?
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/23/2017 1:20 PM
    Because that's the way it was created. The error that I'm getting is "JOB #### NOT FOUND" when it clearly exists under the same domain service account that I'm logged into IPD as. Why is the job not being found?
    But, we did create another test simple job and still getting the error. We're at v10.
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/23/2017 2:13 PM
    so, if you are logged in to LID, TEST product line, logged in as "serviceuser", pull up the AP150, enter 101EMP as the jobname name and hit inquire, you don't get "job not found"?
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    02/24/2017 1:27 PM
    That's the oddity. It's absolutely there. It's a multi-step. So, I wonder if I'm missing something in the query string to identity the job/step...
    JimY
    Private
    Private
    Veteran Member
    (1162 points)
    Veteran Member
    Posts:416


    Send Message:

    --
    02/27/2017 5:31 AM
    I seem to remember someone mentioning that if the job is created using LID that it would not be available to a webrun. If it is created through Portal then it is. Not sure why.
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/27/2017 6:11 AM
    And why would that be? My mom told me when i was mere tadpole that if i swalllowed my gum, it would stay in my stomach for 7 years.

    I know from exerience that LID jobs can be used in a webrun. Just to make sure, i created a test this morning with a CU201 and ran it. IPAv10.1.1.43
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/27/2017 6:18 AM

    Because having multi-step jobs is an unnecessary complication in IPA, i've never had the need to do anything as a multi-step job...so i can't address the issue with experience backing me up.

    but before i'd bang my head against the wall for days trying to make it work, i'd take a few minutes and break it into separate jobs.

    David Williams
    Private
    Private
    Veteran Member
    (3061 points)
    Veteran Member
    Posts:1031


    Send Message:

    --
    02/27/2017 6:20 AM
    I was going off of my previous experience (where I couldn't see jobs created in LID within Portal) when I said I didn't think LID jobs could be executed via the Web Run and Steve corrected my misunderstanding.
    David Williams
    steve finger
    ICS - Senior Consultant
    Infor
    Advanced Member
    (94 points)
    Advanced Member
    Posts:32


    Send Message:

    --
    02/27/2017 6:40 AM

    Not trying to be "snarky"...just trying to point out with a little humor that we shouldn't believe everything we hear.... especially in a place where expert opinion is expected.

     

    plus it's early.....a lighter, kinder, gentler time and place for some folks

    Bob Canham
    Private
    Private
    Veteran Member
    (561 points)
    Veteran Member
    Posts:203


    Send Message:

    --
    02/27/2017 7:56 AM
    you can run multi-step jobs using webrun fine, there shouldn't be a problem with that. Where you'll run into issues is with trying to use a Lawson Transaction node to query and update the job parameters.

    When you create a job in jobdef, it is a multistep job. These cannot be opened on the program forms (i.e. AP150) because the forms don't have a mechanism to target a specific step. Because IPA uses the same API as portal, you're limited to only things that can be done in portal. So, any jobs that you want to update in IPA need to be created on the program form, not in jobdef.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    03/24/2017 3:00 PM
    Got the answer from Infor. ***********

    Fix:
    1. see KB1661080. You need to feed vars _f12-_f18 AND the _STEPNBR var is ZERO-based. So, the first step is _STEPNBR=0 and the 2nd step=1 and so on....

    Fix:
    A cool technique they gave me is to download Fiddler. www.Fiddler.com
    2 .Run Fidder with Capturing on (first panel in status bar at bottom left). Click on/off.
    type "cls" to clear the results in the black bar just above the status bar to the left
    3. Update the job in Mingle.
    4. Turn off capturing in Fidder
    5. Look at the results box and select the URL: 'servlet/Router/Transaction/Erp.
    That will display all the xml parameters you'll need in the transaction query.
    6. Create a LawsonQuery node for each step and pass in the appropriate parameters.
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    04/06/2017 7:59 AM
    OK. I got thru to INFOR. They helped me with the syntax of the Multi-step job. It requires _STEPNBR and several _f# values in order to update. They had me use Fiddler and turn on "Capturing", then hit the "Change" button in mingle to save the job parms. Then go back to fiddler and turn off Capturing. If you go back to the Results panel in Fiddler, and click one of the results, it will return the XML with _f12-_f18 values that need to be submitted. Also, the _STEPNBR parameter is 0-based. So, Step 1 is _STEPNBR 0 and so on. I just replaced some of the values with variables. You'll need a query for each step. So, I run the job via a WebRun node, then update the date parameters for the next time it's supposed to run. Some run all 5 biz days, some Tuesdays, some Thursdays, etc... I have a subflow that calc's the next dates based on today that returns payment and payThrough dates for the next ones coming up. Daily would be tmro, Next Tues, next thurs. I have javascript Assign node that receives the parameters, then also I have a custom database with holiday dates. It queries that and checks if the paymentDate is a holiday and adds a day if so. It returns the dates as a string "paymentDate:20170405|payThroughDate:20170406". it also doesn't seem to support returning that as a JSON structure {surrounded by braces}. So, I had to treat it as a string. No biggie.

    So, I appended this to the query and got it to run.
    &_STEPNBR=0&_f12=&_f13=.prt&_f14=&_f15=&_f16=1_f17=Yes&_f18=D:\Infortest\law/print///1
    TimC
    Systems Analyst
    Private
    Veteran Member
    (220 points)
    Veteran Member
    Posts:84


    Send Message:

    --
    04/06/2017 8:01 AM
    Ah.. this web site cut out the parameter values in the query string. So, I'll rewrite.

    &_STEPNBR=0&_f12=&_f13=.prt&_f14=&_f15=&_f16=1_f17=Yes&_f18=D:\Infortest\law/print/(!userName)/(!jobName)/1
    You are not authorized to post a reply.