Difference between async before and async after

1,067 views
Skip to first unread message

Ingo Richtsmeier

unread,
Sep 2, 2015, 8:13:16 AM9/2/15
to camunda BPM users
Hi,

we found a difference between asyncBefore and asyncAfter and we are wondering, if it is expected behavior or an error:

This process is configured with asyncAfter on the start event:



This process is configured with asyncBefore on the first service task:



In both processes there is a transaction boundary between the start event and the first service task and in both cases the error was thrown in the first service task. We expected, that in both cases the incident should appear on the first task.

What do you think?

Kind Regards, Ingo

thorben....@camunda.com

unread,
Sep 2, 2015, 9:14:18 AM9/2/15
to camunda BPM users
Hi Ingo,

Sounds like a bug, I'll try to reproduce it.

Cheers,
Thorben

thorben....@camunda.com

unread,
Sep 2, 2015, 9:29:57 AM9/2/15
to camunda BPM users
Hi Ingo,

Nevermind, currently this is the expected behavior. When an exception is thrown in "do something", the executing transaction rolls back. In a second transaction, the incident is created. Since this transaction accesses the rolled back job state to determine the activity id for the incident, the incident ends up at the start event.

This is not a specific between asyncAfter/asyncBefore. If you have asyncBefore on the start event, the incident ends up at the start event as well.

Cheers,
Thorben
Reply all
Reply to author
Forward
0 new messages