Join us on May 14-15, 2019 at Forrester Digital Transformation & Innovation 2019 in Chicago, USA.
I have a simple Async Subflow that accepts in a couple workflow variables using the "In and Out" option. The Variable values are successfully passed to the SubFlow, but when the Subflow finishes, the updated values are not passed back to the parent process.
Attached you will find a simple application to demonstrate the issue. APP_testSubFlow-1-20171113221419.jwa
Is there a way to make this work?
As Anders mentioned, this doesn't work with Async subflows. If anyone is interested, I was able to accomplish this with a combination of Async subflows and Bean Tools. I have a Bean Tool in the parent flow that puts the parent ProcessId in a workflow variable:
The `wfProcessId` is passed into the subflow as an IN variable.
Then I have a Bean Tool as the last step in the Async SubFlow that passes the workflow variables that were set in the subflow, back up to the parent flow.
If there's an easier way to do this, please let me know.
Hi, found a working example at Sample Application with Subflow. I think it could be because your subflow execution is asynchronous, in which case the process continues without waiting for the results of the subflow.
Thanks Anders . That's what I found as well. I should have mentioned that switching it to Synchronous works fine. The problem is that I need an async subflow. Is there a way for an async subflow to interact with the workflow variables of the parent process? I guess I could do this with something like the [Multiple Approval](https://dev.joget.org/community/display/KBv6/Multiple+Approval) example, but I was hoping to be able to use the subflow framework. Thanks