Something confuse with service task between Parallel Gateway

I have something that I can’t understand , so I came to here and need your kindly help~
My process XML is below and my question is:


When I used service task between Parallel Gateway , my process instance just finish one of the services task , that means I used Parallel Gateway , but actually it finished only one task . Finding our docs , I found that a single process instance are never executed concurrently and we have Optimistic Locking . So I configured service task like this
image
and I think that before task1 start , task2 start , but the result is unexcepted . So I want to know what “Asynchronous Before” means . And another question is that if I meet OptimisticLockingException , when the other service task will execute ?

@GaoxiaoyuVV Did you setup the external task workers?

Refer the external task examples from here,

You can refer this docs related to external tasks, asynchronous-continuations & Optimistic locking exception.

https://docs.camunda.org/manual/7.11/user-guide/process-engine/external-tasks/

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

https://blog.camunda.com/post/2015/11/external-tasks/

Maybe that I misunderstand it and if there are two services in series , I configured Asynchronous : Before that means they won’t complete at the same time … Am I right ?

@GaoxiaoyuVV if you mark the service tasks asyncBefore:true, by default the property isExclusive:true also been set. So this will cause the execution of the tasks in sequence.

If you wanted to execute it in parallel set asyncBefore:true, isExclusive:false. From the docs,

Exclusive Jobs are the default configuration . All asynchronous continuations and timer events are thus exclusive by default. In addition, if you want a job to be non-exclusive, you can configure it as such using camunda:exclusive="false" .

Read this part in the docs about exclusive jobs: The Job Executor | docs.camunda.org

Really thank you for your kindly help ~ I will read it and have a try :slight_smile: