Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
IPA/ProcessFlow
Process Flow trigger in a batch file
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
BDell92
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5275
People Online:
Visitors:
262
Members:
0
Total:
262
Online Now:
New Topics
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
S3 Customization/Development
JUSTIFIED RIGHT
1/15/2025 7:41 PM
Is there a way in Lawson COBOL to make a character
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1375
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Integration / Customization
IPA/ProcessFlow
Process Flow trigger in a batch file
Please
login
to post a reply.
11 Replies
1
Subscribed to this topic
52 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
M Graham
Veteran Member
Posts: 32
8/12/2009 5:12 AM
Has anyone created a Process Flow trigger in a batch program, such as PA102 (Position Update) ? I need a work unit created when a PA102 job is submitted and when "Update"=Y.
David Williams
Veteran Member
Posts: 1127
8/12/2009 10:30 AM
Split
Design Studio solution:
I recently revised a PO190 Close PO form by removing the default action from the Submit button and adding a script to trigger ProcessFlow (via WFWK) to run the job and then run a query of which PO's closed that day for an interface to an external system.
You could do something like: when the Submit button is clicked, use an AGS call to Submit the job and if Update=Y also trigger ProcessFlow.
M Graham
Veteran Member
Posts: 32
8/17/2009 5:59 PM
Split
Thanks for the tip David! I did some more research and found a post in the "Design Studio" forum with sample javascript code that I'm looking for, that creates a Process Flow workunit when a batch job has been submitted:
https://www.lawsonguru.co...v/topic/Default.aspx
--Marcy
--------Here is the Design Studio javascript code -------------------
function FORM_OnBeforeTransaction(fc)
{
var vCompany=lawForm.getDataValueById("text4")
var vUpdate=lawForm.getDataValueById("select3")
if (vCompany == "1234" || vCompany == "0987" && vUpdate == "Y")
{
if (fc == "S")
{
var s = portalWnd.AGSPath+"?_PDL=TEST"+
"&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=Add&SERVICE=test100&WORK-TITLE=test100email"+
"&_DELIM=%09&_OUT=TEXT&_EOT=TRUE";
portalWnd.httpRequest(s);
}
}
return true;
}
David Williams
Veteran Member
Posts: 1127
8/17/2009 6:33 PM
Split
No problem. I took the route I did because I wanted ProcessFlow to actually run the job and for the flow to wait until the job completed in Lawson before moving forward. I added &WAIT=TRUE to the end of the parameters of my WebCall jobrun.exe command to make this happen.
M Graham
Veteran Member
Posts: 32
8/17/2009 11:09 PM
Split
Good idea to wait until the batch job has completed before moving forward - I'll give that a try.
-------------------------
On a related topic...Even though I got a Process Flow workunit to be created when a PA102 batch job is submitted in "Update" mode, no workunit variables are created. Is there a way to create workunit variables in Design Studio? Do I get values from the form and create an AGS command in Design Studio to store the values in the WFVARIABLE table?
--Marcy
David Williams
Veteran Member
Posts: 1127
8/18/2009 9:04 AM
Split
// Trigger ProcessFlow
var s = portalWnd.AGSPath + "?_PDL=" + vProd +
"&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE"+
"&FC=Add&SERVICE=Batch Notify" +
"&WORK-TITLE=Batch Notification" +
"&VARIABLE-NAMEr0=Batch" +
"&VARIABLE-VALUEr0=" + bBatch +
"&VARIABLE-NAMEr1=Company" +
"&VARIABLE-VALUEr1=" + bCompany +
"&VARIABLE-NAMEr2=Operator" +
"&VARIABLE-VALUEr2=" + pOperator +
"&_DELIM=%09&_OUT=TEXT&_EOT=TRUE"
// submit ags call to server
var sAGSInfo=portalWnd.httpRequest(s)
John Cunningham
Advanced Member
Posts: 31
7/20/2010 5:56 PM
Split
Is there a limit on the number of variables that you can send to the ags call. I am trying to send 13 and it seems like it will only get 10.
Marc Burnes
Basic Member
Posts: 14
7/21/2010 1:21 PM
Split
John,
Are you using an older version of ProcessFlow? I am not aware of a limit on the number of arguments that can be passed.
Can you post your AGS call?
Deleted User
New Member
Posts: 0
7/21/2010 1:43 PM
Split
The limit for WFWK is 15. If you want to do more you have to use the COBOL api in the 4GL rather than Design Studio, which allows you to create an unlimited number of variables (10 at a time, calling the api)
John Henley
Posts: 3351
7/21/2010 2:55 PM
Split
There is actually an "impedance mismatch" between the screen definition and the logic in WFWK. The screen allows for 15 variables, but the logic in the COBOL code only passes 10 variables. Go figure. Depending on what you're doing (you mentioned ags, so are you using PF or DS?), you can also call /bpm/xml/workUnitVariablesForm.do to add the variables individually once the workunit is created. It's a lot more work, but might be your only workaround. Again, depending on what you're doing, another option might be to string together some of the variables to stay within the limit of 10.
Deleted User
New Member
Posts: 0
7/21/2010 3:30 PM
Split
Thanks John, forgot about that little "glitch"
You can patch WFWKPD to add an additional call to 1000-ADD-VAR-SETUP if there are values in 11 thru 15.
The only problem with using the bpm form is that depending on how the flow is designed, there is no guarentee that the variables will be added in time for when they are to be used because they are created after the workunit has already been triggered. Also if for some reason the call to the bpm form failes they never get added. Slim but still possible.
I am not a big fan of using WFWK, because you have to expose the form in security to users so in theory they can trigger any flow if they have any knowledge of AGS. I rather create the trigger in the COBOL (in user exits for online forms) when I can.
John Cunningham
Advanced Member
Posts: 31
7/27/2010 6:04 PM
Split
Thanks Gary.. I was able to concatenate some of the variables in order to get it to work this time. I will probably try cobol triggers next time, there is just a lot of overhead in trying to create a lawson screen for every design studio/processflow you want to create. Might be worth it to design a generic form.
Please
login
to post a reply.