Any suggestions as to how to trigger the IPA after PR140? I could add a WebRun node with PR140 submission, but wanted to see if you all know of other options. No Design Studio, and we are on a Single Tenant, Hybrid instance of S3
Posted By Ragu Raghavan on 07/13/2020 4:07 PM If you are looking for options.....are you able to customize PR140? There are APIs available to trigger flows from 4GL code.
customizing PR140 is not a good solution, since it is frequently patched and customizations would have to be retrofitted to newer versions.
Posted By Preston Burdwell on 07/13/2020 4:24 PM Could the API to call Processflow be wrapped in a Custom 4GL Program just for this purpose?
WFWK requires a service to be defined, whereas if you want to just call a flow without the overhead of setting up a service, you have to use a COBOL API like SEND-TO-BCI (BCI is the very old predecessor to PFI then IPA). You could then have a two-step job that runs PR140 and then your custom program to invoke the BCI/PFI/IPA flow. Another option is to use IPA File Channel to monitor a PR140 print folder and trigger a flow when a file is created (include a Wait node in the flow to wait a reasonable amount of time for PR140 to finish). Kinda clunky but i've used that approach and it does the trick....
Its very simple to create a cobol program that starts a processflow, and nothing else. I often do that to create lookup/email/extract flows and give the users access to running a pflow.
You have to be able to:
1)write cobol
2)add processflow service in pflow admin
3)tie the service to a flow
4)have access to pflow designer and create the pflowrun and or final flow.
cobol pd:
000300****************************************************************** 050-EDIT-PARAMETERS SECTION 10. GO TO 050-END. 050-END. EXIT. 000400****************************************************************** 000500 100-PROGRAM-CONTROL SECTION 10. 000600****************************************************************** DISPLAY "PROGRAM BEGINS". PERFORM 1000-OPEN-WORKFLOW-DB. MOVE "FLOWRUN" TO CRT-TOKEN. MOVE "UPDATE" TO WFAPI-I-VARIABLE-NAME (1). MOVE PRM-INPUTPARAM TO WFAPI-I-VARIABLE-VAL (1). MOVE "EMAILTO" TO WFAPI-I-VARIABLE-NAME (2). MOVE PRM-INPUTEMAIL TO WFAPI-I-VARIABLE-VAL (2). MOVE "FLOWNAME" TO WFAPI-I-VARIABLE-NAME(3). MOVE PRM-INPUTFLOW TO WFAPI-I-VARIABLE-VAL (3). PERFORM 1000-PROCESS-FLOW. DISPLAY "PFLOW RETURN MSG -" WFAPI-O-RET-MSG. 001500 DISPLAY "PROGRAM ENDS". GO TO 900-DONE. 01700 100-END. EXIT. *************************************************************** 900-DONE. EXIT.
This batch program starts a service called 'flowrun'. Service must be defined with an underscore after the name - flowrun_
Service must also be tied to a processflow, also called flowrun.
It passes flowrun 3 parameters. Update flag, email address to send results to, pflow number to run. Options are 1,2,3
Service flowrun starts up. It receives the pflow number to run. if 1 it async runs flow1, if 2 it async runs flow 2. if 3 it async runs flow 3.
If you choose to, flowrun can just singly run the final flow you need without the multiple choice option. I just wanted an easy way to run multiple flows from a single program.
So you don't touch PR140, you just ADD another batch program in the job stream.
You can also create an end user exit for PR140 that will accomplish the same function.
Questions welcome.