Calling AP190 from PFI

 6 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Ludy
Basic Member Send Private Message
Posts: 21
Basic Member
Hi,
I have a flow, PF1, that gets triggered when a user voids a check in CB80.  This flow captures key data info and writes it to a csv file.  This csv file serves as input to another flow, PF2, which puts the invoices associated with this check on hold.  Between PF1 and PF2, AP190 needs to run to reinstate the invoices before they can be put on hold.

My question is:  how do I call AP190 from PF1?

Thanks,
Ludy
Bob Canham
Veteran Member Send Private Message
Posts: 217
Veteran Member
Hi Ludy,

You can execute jobs by using the WebRun node using these parameters: FUNC=run&USER=&JOB=&OUT=xml&WAIT=true. By using the WAIT=true parameter, it will wait for the job to complete before returning to the next step in the flow.

Also, since you will probably need to update the AP190 parameters, you can do that using transaction nodes. The catch is that you have to pass all parameters to the update node, so doing a Node to inquire on AP190 first will get you most of your values that you can just pass to the update node.

Hope this helps.

Bob
Ludy
Basic Member Send Private Message
Posts: 21
Basic Member
Bob, thank you for that quick reply. I'll try what you suggested.

Thanks again,
Ludy
Ludy
Basic Member Send Private Message
Posts: 21
Basic Member
Hi Bob,
I added a web run node to my flow defined as follows –
uses IOS host
web program = cgi-lawson/jobrun.exe
post string = FUNC=run&USER=mdulatas&JOB=AP190CTS&PAY-GROUP=&CASH-CODE=&OUT=xml&WAIT=true

After I voided a check, I looked at the log and it said "“Executed WebRun Activity AP190CTS Found success string " . My question is : If AP190CTS run successfully, where do I find the report for this? I did a wrkjob on AP190CTS but didn’t find it. Also, I didnt create a AP190CTS job on portal so shouldn't the run have failed because there is no defined AP190CTS job?
Thanks,
Ludy
Bob Canham
Veteran Member Send Private Message
Posts: 217
Veteran Member
Hi Ludy, glad that seems to be working. The somewhat screwy thing about how it works is that the print file ends up in the print manager of the user who executed the job, not the one who owns it. Similar to if you inquired on another user's job in portal and submitted it. So if your processflow is running as lawson, then the print files will be in Lawson's print manager. Also, you don't need the pay group and cash code parameters in your post string, though it doesn't seem to be hurting anything.
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
If you didn't actually build what the success string should have returned you won't get an actual success or fail message back. The "AP190CTS Found success string " is misleading since what it's actually telling you is that the success string was blank and it couldn't correctly report back.

If you don't have an AP190 job defined for user mdulatas then it would not have run and you couldn't retrieve the report. Keep in mind when the ProcessFlow user (either Lawson or PFUser) runs the job, it will more than likely be sitting in that user's print queue.
David Williams
Ludy
Basic Member Send Private Message
Posts: 21
Basic Member
Thanks, Bob and David for the quick reply.

-- Ludy