Multi-step Job Execution in IPD

Author
Messages
TimC
Veteran Member
Posts: 84
Veteran Member

    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
    Veteran Member
    Posts: 84
    Veteran Member
      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
      Veteran Member
      Posts: 217
      Veteran Member
        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
        Veteran Member
        Posts: 84
        Veteran Member
          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
          Veteran Member
          Posts: 84
          Veteran Member
            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
            Veteran Member
            Posts: 84
            Veteran Member
              The job has 3 steps. So, how do you define each step update in query nodes?
              TimC
              Veteran Member
              Posts: 84
              Veteran Member
                Hi there. Any thoughts folks?
                Woozy
                Veteran Member
                Posts: 709
                Veteran Member
                  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
                  Veteran Member
                  Posts: 84
                  Veteran Member
                    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
                    Veteran Member
                    Posts: 1127
                    Veteran Member
                      I think the job has to be defined in Portal, not LID, in order for the Web Run to 'see' it.
                      David Williams
                      TimC
                      Veteran Member
                      Posts: 84
                      Veteran Member
                        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
                        Veteran Member
                        Posts: 47
                        Veteran Member

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

                          steve finger
                          Veteran Member
                          Posts: 47
                          Veteran Member
                            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
                            Veteran Member
                            Posts: 217
                            Veteran Member
                              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
                              Veteran Member
                              Posts: 84
                              Veteran Member
                                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
                                Veteran Member
                                Posts: 217
                                Veteran Member
                                  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
                                  Veteran Member
                                  Posts: 84
                                  Veteran Member
                                    we have a service account that IPA is running as, and, I'm logged into IPD as that same user.
                                    TimC
                                    Veteran Member
                                    Posts: 84
                                    Veteran Member
                                      We tested this by creating a single step job and I received the same error.
                                      steve finger
                                      Veteran Member
                                      Posts: 47
                                      Veteran Member
                                        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
                                        Veteran Member
                                        Posts: 47
                                        Veteran Member
                                          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
                                          Veteran Member
                                          Posts: 84
                                          Veteran Member
                                            "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
                                            Veteran Member
                                            Posts: 47
                                            Veteran Member
                                              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
                                              Veteran Member
                                              Posts: 84
                                              Veteran Member
                                                Ah.... I guess I have to escape out the brackets.
                                                More to come....
                                                TimC
                                                Veteran Member
                                                Posts: 84
                                                Veteran Member
                                                  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
                                                  Veteran Member
                                                  Posts: 84
                                                  Veteran Member
                                                    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
                                                    Veteran Member
                                                    Posts: 47
                                                    Veteran Member
                                                      and why is this still multi-step?
                                                      TimC
                                                      Veteran Member
                                                      Posts: 84
                                                      Veteran Member
                                                        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
                                                        Veteran Member
                                                        Posts: 47
                                                        Veteran Member
                                                          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
                                                          Veteran Member
                                                          Posts: 84
                                                          Veteran Member
                                                            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
                                                            Veteran Member
                                                            Posts: 510
                                                            Veteran Member
                                                              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
                                                              Veteran Member
                                                              Posts: 47
                                                              Veteran Member
                                                                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
                                                                Veteran Member
                                                                Posts: 47
                                                                Veteran Member

                                                                  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
                                                                  Veteran Member
                                                                  Posts: 1127
                                                                  Veteran Member
                                                                    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
                                                                    Veteran Member
                                                                    Posts: 47
                                                                    Veteran Member

                                                                      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
                                                                      Veteran Member
                                                                      Posts: 217
                                                                      Veteran Member
                                                                        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
                                                                        Veteran Member
                                                                        Posts: 84
                                                                        Veteran Member
                                                                          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
                                                                          Veteran Member
                                                                          Posts: 84
                                                                          Veteran Member
                                                                            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
                                                                            Veteran Member
                                                                            Posts: 84
                                                                            Veteran Member
                                                                              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
                                                                              ---