Asynchonous Before in Start Event

616 views
Skip to first unread message

d200...@yahoo.com

unread,
Oct 27, 2015, 11:01:52 AM10/27/15
to camunda BPM users
Hi,

i tried to configure the start event in my process with the option Asynchronous Before but it didn't work. When i looked in the source code of the BPMN-model, i found out that when i marked the Asynchronous Before, it turned to camunda:async="true" in source code, not camunda:asyncBefore="true" like i expected. I have already tried both camunda modeler standalone and camunda modeler plugin for eclipse, both of them didn't work. Is it a bug in the modeler? Or camunda does not support asynchronous before for start event anymore? According to the documentation, it should work:
https://docs.camunda.org/manual/7.3/guides/user-guide/#process-engine-transactions-in-processes-asynchronous-continuations
Thanks you in advance

Best Regard,

Nam

thorben....@camunda.com

unread,
Oct 27, 2015, 1:46:40 PM10/27/15
to camunda BPM users, d200...@yahoo.com
Hi Nam,

camunda:asyncBefore and camunda:async are equivalent. The latter was the original attribute but when we added asyncAfter we deprecated it. Nevertheless, it should still work in the process engine. How do you determine that async for the start event does not work when executing the process model?

Cheers,
Thorben

d200...@yahoo.com

unread,
Oct 28, 2015, 9:15:04 AM10/28/15
to camunda BPM users, d200...@yahoo.com
Hi Thorben,

thanks for your prompt reply. I have a process A which has a service task ST1. This service task use an array of events as input and starts for each event in this array a process instance of process B . So i marked the start event of process B with asynchronous before and hoped that the process instances of B will be processed by the job executor but it didn't work like i expected. And now i have an additional question regarding the job executor. I used the Tomcat distribution version, so according documentation i can configure the maxJobsPerAcquisition of job executor in the bpm-platform.xml file. The default value is 5, i have increased it to 10. But it didn't have any effect at all. Did i use the right approach to configure it or is there any other ways? Thank you in advance.

Best Regard,

Nam

d200...@yahoo.com

unread,
Oct 28, 2015, 10:07:53 AM10/28/15
to camunda BPM users, d200...@yahoo.com
Hi Thorben,

does asynchronous option also apply for call activity? or only for service task?

Best Regard

Nam

thorben....@camunda.com

unread,
Oct 28, 2015, 1:09:31 PM10/28/15
to camunda BPM users, d200...@yahoo.com
Hi Nam,


So i marked the start event of process B with asynchronous before and hoped that the process instances of B will be processed by the job executor but it didn't work like i expected.

This sounds as if it should work, so unless you shed some more light into how what behavior you see it is really hard to help you. Perhaps a test project that reproduces the issue would help. You could use the unit testing template [1].


I used the Tomcat distribution version, so according documentation i can configure the maxJobsPerAcquisition of job executor in the bpm-platform.xml file.

That is correct, changing the value there should have an effect. Again, please try to be more precise on what is going on when you change the value. Note that this has to be set as a property of the acquistion element,  like

<bpm-platform xmlns="http://www.camunda.org/schema/1.0/BpmPlatform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:schemaLocation="http://www.camunda.org/schema/1.0/BpmPlatform http://www.camunda.org/schema/1.0/BpmPlatform ">

 
<job-executor>
   
<job-acquisition name="default">
     
<properties>
       
<property name="maxJobsPerAcquisition">48</property>
     
</properties>
   
</job-acquisition>
 
</job-executor>

...

 

does asynchronous option also apply for call activity? or only for service task?


You can set asyncBefore and asyncAfter for any activity, gateway, and event (with some exceptions like asyncBefore for boundary events).

Cheers,
Thorben

[1] https://github.com/camunda/camunda-engine-unittest

d200...@yahoo.com

unread,
Nov 2, 2015, 3:22:47 AM11/2/15
to camunda BPM users, d200...@yahoo.com
Hi Thorben,

thanks for your suggestions. I will give it a try.

Best Regard,

Nam

Reply all
Reply to author
Forward
0 new messages