The task after a multi-instance task runs several times

I have a multi-instance subprocess, and after it is a simple service task.

The ‘parallelTask’ calls a subprocess which is as the followings:

Which is weird is if the multi-instance ‘runFetchTTDataSql’ has four items, the ‘simpleTask’ will run four times.

Hello @AmberYoung ,

this sounds really interesting. Could you please share the .bpmn files with us? I would like to recreate this :slight_smile:

Jonathan

The not working .bpmn files are as the followings:
fetchTTData.bpmn (6.4 KB)
test_parallel_not_work.bpmn (3.8 KB)

And what’s more interesting is if I replace the call activity with the expanded subprocess, it works well.
test_parallel.bpmn (9.9 KB)

Hello @AmberYoung ,

I tested the behaviour and I was not able to reproduce the behaviour so far.

Which version of Camunda do you use?

Jonathan

Hello Jonathan, it’s 7.17.0.

Hello @AmberYoung ,

using mocked implementations, I cannot reproduce the behaviour atm. Are you doing anything special in your delegation code like modifying the process instance?

Jonathan

Hello @jonathan.lukas,
There is a receive task, waiting for a message to determine whether go on or not, and some Java codes call the task.

runtimeService.createMessageCorrelationAsync("remoteTaskCompleted")
                        .processInstanceQuery(runtimeService.createProcessInstanceQuery()
                            .activityIdIn("waitRemoteTaskComplete").variableValueEquals("remoteTaskId", remoteTaskId))

Hello @AmberYoung ,

thank you for providing more information. I am still not able to reproduce the behaviour. :frowning:

You could report the behaviour as a bug to our dev team: jira.camunda.com

Sorry I could not help you directly.

Jonathan

Hello @jonathan.lukas
It’s ok, thank you so much for your help.

1 Like