when callService invoked, i want like 10 instance to initiated, one after the other. What is happening is to start second instance its waiting 1st instance to get finished
If it’s just one or more service tasks then it will run in a single thread one at a time.
You can change that by adding an async-before on the multi instance or on the start event of the called process instance
basically this is the work flow, all the sub workflows under callSearchTypeProcess should be invoked and before calling the callPackageAdjudicationProcess , all the subworkflows shld be completed
I think if you add the async-before tickbox’s on the start event of the sub process i showed above then it should then start each sub process in parallel.
For what it’s worth, I’ve used this pattern quite a lot without problems and didn’t need to tick the async-before checkbox. So it seems baffling to me.
What is inside the sub process? Could this be affecting the outcome you expect?
inside call activity- i will be calling sub work flows, basically i my input to call activity is list of PROCESS DEFINITION KEY. i see the behaviour is like it is waiting each subworkflow to start until next subworkflow is invoked
Those 3 lines on the activity should be horizontal, not vertical, if I’m not mistaken. Vertical means they will be run subsequently and horizontal means concurrently.
I’d tell you the setting, but I don’t have time at the moment. Look through the properties and see if there’s a setting. I’ll come back in a few hours and look at our code and post if you don’t find it in the meantime.
Hopefully I’ve attached one of my test flows to this message.
I’ve used this to play around with parallel subprocesses to see how they work. In this example a service task queries the backend for a list of users in a group called “deptHeads” and then assigns a task to each of them.
Thanks, but i am using call activity, collection contains list of process definition key, so at run time based on list. sub work flows will be instantiated.
my properties is also same for call activity, for testing purpose i took sample sub work flows where in one sub workflow in one of the service delegate , i am waiting for 1 min. so practically the one in the list should initiate next sub workflow but it is not happening. the process is waiting for 1 min once this is completed next work flow is called.
Just to verify, you are initializing the Collection right? Our collection is a java.util.ArrayList with a serializable POJO as its list element. Just before the Parallel Call activity, I’m making sure that the list is initialized in the execution and I’m adding elements to it, using a JavaDelegate.
yes before calling CallActivity, in a java delegate i m intializing
List searchWorkflowList = new ArrayList<>();
searchWorkflowList.add(“A_SEARCH_WORKFLOW”);
searchWorkflowList.add(“B_SEARCH_WORKFLOW”);
execution.setVariable(“searchTypeList”, searchWorkflowList);
As we see in the list, first A is added, so B workflow is initiated only after A is completed ,
Practically B should have been started without waiting for A to complete