camunda:asyncBefore="true" in startEvent & ExecutionListeners

Asynchronous instantiation of a process instance is set using the camunda:asyncBefore for startEvent, then the ExecutionListeners configured in the startEvent will be executed before sending rest api call response to client?

<bpmn:startEvent id="StartEvent" name="Start" camunda:asyncBefore="true" camunda:jobPriority="1">
      <bpmn:extensionElements>
        <camunda:executionListener class="com.camunda.listeners.ProcessInstanceChecker" event="start" />
      </bpmn:extensionElements>
      <bpmn:outgoing>SequenceFlow_1yqytc7</bpmn:outgoing>
</bpmn:startEvent>

Hi @aravindhrs,

no: https://docs.camunda.org/manual/7.10/user-guide/process-engine/transactions-in-processes/#understand-asynchronous-continuations.

Execution listener is invoked after the response from the startProcessInstance call.

Cheers, Ingo

1 Like

I have some doubts on below highlighted identifiers from very long time in the below diagram:

"TAKE", “START”, “END” : these three markers how could i understand it, what was the purpose/behaviour/implementation of these identifiers?

TAKE, START, END these are referring to Execution listeners or Task Listeners?

Hi @aravindhrs,

that are the events. TAKE is the event on a sequence flow, START and END are the events on the activity or event.

You can listen to each with an execution listener. Task listener have different events and are only available on user tasks.

Cheers, Ingo

But when we design bpmn model, we are able to configure execution listener only to Start or End events.

Didn’t find the event called TAKE. is this implicit event for execution listener itself? If yes, what was the execution context in that?

Hi @aravindhrs,

TAKE is on the sequence flow:

But it’s rarely used…

Cheers, Ingo

1 Like

@Ingo_Richtsmeier Great :slight_smile:

Do we have any use case for configuring Listener on take event in sequence flow like when to use it?

Any examples would be fine for learning. :slight_smile:

Again thanks.

Hi @aravindhrs,

To be honest I havn’t passed a real use case for a TAKE listener in my career. Even if I get the request to create one, I would try to avoid it as it is information hiding to bring code execution on a sequence flow. I consider it as a theoretical option, created for completeness.

An explicit task is my preferred alternative.

Cheers, Ingo

Thanks @Ingo_Richtsmeier