Multi instance Parallel not working as expected

Call activity for parallel multi instance is not working , each instance is waiting for the previous instance to get close.

It is supposed to started all the instance one by one, regardless of the status. i believe.

Any can can you please help me out

Can you upload your model ?

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

Can you pls check

What is in the called service.

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

Inside callactivity i am calling sub workflows


searchTypeList is a collection of subworkflows.

I want to initiate subworkflows in parallel

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.

Thanks, i tried but its not working.

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.

@jase52476 concurrent/parallel is the Vertical lines. Horizontal lines are sequential.

parallel-process-test.bpmn (12.2 KB)

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.

Still hoping for the solution

Thanks, Vertical means it executes in parallel right?.

Yes, it is vertical. I just checked.

For our process it’s working and we have only the following fields filled out:

Id, Name, CallActivity Type, Binding (latest), Collection (hard-coded value of the variable name for a list) and the element variable name.

(all of the async before/after for both Multi Instance and the Async Continuations are all unchecked).

On the Variables tab, we entered the same In Mapping variable name as the item on the previous tab for Element Variable:

Type = Source
Source = element name
Target = Element type

For Out Mapping:

Type = Source
Source = Response variable name
Target = “myResponseVariable”

I’m not sure we’re even doing anything with the response variable though in our code.

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<>();
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