Starting the workflow process

When we start the workflow using java API.

processEngine.getRuntimeService().startProcessInstanceByKey(processDefinitionKey,BusinessKey, variables);

The workflow starts but the response is given when the workflow gets stuck in some user task.
Why is the response not sent out immediately as soon as the workflow gets started. Is there a way to achieve it ?

Yes you can achieve it by configuring the save point(asynchronous continuations) like below:

I have configured the property async-after:true for the start event, in that case once process is started successfully, the activity state will be persisted and api will return response immediately.

diagram_2.bpmn (4.2 KB)

1 Like

Hi @aravindhrs,
Thanks that worked.

But after the workflow starts it gets stuck at the start event. It doesn’t move forward.
Is there some configuration along with making it asynchronous to do it.
am using spring boot with camunda 7.11.0

Thanks,
Anirudh

@Anirudh is there any incidents raised? can you upload your bpmn model?