Camunda does not return an InstanceId, until all service tasks completes

Hi,


When I start process, Camunda does not return an InstanceId, until all service tasks completes.
Only when Camunda reaches UserTask “Письма кончились”, it will return instanceId.

This process moves Emails at Exchange Server depends on Sender. I have to wait until all service tasks are completed.

Maybe I designed the process incorrectly?

Thanks.

Hi @godzilla65536,

have a look at the transactions in processes (https://docs.camunda.org/manual/7.10/user-guide/process-engine/transactions-in-processes/) to get an idea how to control the sequence of service tasks.

You can explicitly model wait states by checking the async before checkboxes in the Camunda modeler.

Hope this helps, Ingo

2 Likes

@godzilla65536 while designing bpmn model, you have to mark asyncBefore:true for the service task “Get Message Ids” , so once process started right away you’ll get the process instance id and no need to wait till the service task completion.

You can configure it from modeler in the Property panel section like below:

image