This may be an easy question since I am new to Lawson and still don't know my way around, but, I ask it anyway: I have created some Process Flows (load AP invoices from custom input, load bankrec tape file from bank, etc) and created a Design Studio custom from with buttons to "call/trigger" the flows. I throw an alert message to the user that the flow is triggered, but is there a way to tell the user that it processed successfully? I cannot seem to retrieve the Workunit #, but thought if I could, perhaps there is a way for code to parse the log file and give the user a hint about success or failure.
I know they can look to whatever file should have been created, but I am looking for a better way. Anyone written any code (in DS, in Lawson, in .Net) to parse the log file, if I could know the Workunit #?
If you created the trigger using an ags call to WFWK, it returns with a success message with the workunit number assigned.
If you want to look it up, the WFVARIABLE record is probably a better choice, for example invoice approval query for the WFVARIABLE record where VARIABLE-NAME = "API_INVOICE" and VARIABLE-VALUE = the invoice and WORKUNIT.SERVICE = "InvApproval". The WORKUNIT field returned would then be the workunit number.
Thanks for all your replies. I will see if I understand enough to try them. I do have an email notification in the Process Flows, it is just that I am used to showing the user immediately that something is successful or not. I build a message based on whether records already exist in APCINVOICE. I really do not want them to have to check an email for the status. I would like to display the message with "alert" or something like "MessageBox.Show" in .net.
The challenge to what you want to accomplish is the there is a "disconnect" between the Portal and ProcessFlow from when you initiate the flow to when it completes. There is the possibility becuase of traffic on the ProcessFlow server that it will not process immediately.
Depending on what your flow does, a possible alternative would be have the code to update in the actual Design Studio form instead of calling a flow, maybe still call the flow but to do everything that does not require the user be notified. Calls to Tables, Forms, and Web cgi programs in ProcessFlow can also be done in Design Studio, it is just that you have to write it in Javascript.