cancel
Showing results for 
Search instead for 
Did you mean: 

Observed Issue with Multiple End Events

ryanj1
Champ in-the-making
Champ in-the-making
I've observed what appears to be an issue with multiple End Events within certain Activiti process model designs (using version 5.15). Since it doesn't appear that I can upload images, I'll try to describe them using text below:

Start Event–AND–User Task 1–Script Task 1–End Event 1
                           –User Task 2–Script Task 2–End Event 2

In the above case, when the process instance has completed, the "ACT_RU_EXECUTION" table shows "Script Task 2" (or the last Script Task to finish) as active, even though the diagram shows that both End Events have been reached. For this reason, the process instance itself shows up as active and never completes.

Start Event–AND–User Task 1–Script Task 1–AND–End Event 1
                           –User Taks 2–Script Task 2–

In the above case, the process instance completes as desired.

I've seen comments that multiple End Events are in fact supported, though the observed behavior in this case indicates that either I'm misunderstanding the extent of the support for multiple End Events or that there is a bug in the support thereof.

Thanks in advance for your help.

-Ryan
7 REPLIES 7

frederikherema1
Star Contributor
Star Contributor
Ryan,

By the "AND" you mean a parallel gateway, I suppose?

ryanj1
Champ in-the-making
Champ in-the-making
Yes, that's correct. Too many different BPM tools and too much different terminology, sorry. Smiley Happy

Also, in both examples, the first Parallel Gateway (and the only one in the first example) forks into User Task 1 and User Task 2. In the second example, the second Parallel Gateway joins the two threads from Script Task 1 and Script Task 2. I had it nicely spaced so that this was obvious, but the spacing was lost in the translation when I hit Save.

If you have additional questions or if anything isn't clear, please let me know.

-Ryan

jbarrez
Star Contributor
Star Contributor
It's clear. And multiple end events are supported, this should just work. If not, it is a bug that needs fixing.

Could you upload your xml that demonstrates this issue, so we can exactly reproduce it?

ryanj1
Champ in-the-making
Champ in-the-making
Joram/All,

I'm going to upload four BPMN files (with ".txt" appended to appease the site Smiley Happy 😞

1) ForkedProcess_OneEndEvent: This process leverages a Parallel Gateway as a join and ends as expected.
2) ForkedProcess_TwoEndEvents: This process leverages two separate End Events and ends as expected.
3) Cancel_Tasks_ByScript: This process leverages a Parallel Gateway as a join and ends as expected.
4) Cancel_Tasks_ByScript2EE: This process leverages two separate End Events but does not end as expected, despite the flow indicating that both End Events have been reached.

The fact that the behaviors of #2 and #4 are different seems to suggest that this is a bit of a corner case. Note that I have a similar pair of examples to #'s 3 and 4 that leverage a JavaDelegate to cancel the tasks vs Groovy scripts, so it doesn't appear to have anything to do with the use of a Groovy script.

I'm using Activiti 5.15.

If you have additional questions, please let me know.

-Ryan

trademak
Star Contributor
Star Contributor
Hi Ryan,

Excuse us for the delay in answering. I've tested the Cancel_Tasks_ByScript2EE.bpmn process definition and it ends just fine in my test. Could you share how you are testing this process definition?

Best regards,

ryanj1
Champ in-the-making
Champ in-the-making
Tijs,

I'm running it within Activiti Explorer in Activiti 5.15. No errors occur within the process instance, but the Script Task entitled "Cancel Order Task" never ends despite the process instance image showing that both End Events have been reached… The process instance remains in my "My instances" list within Activiti Explorer, and the execution remains in the ACT_RU_EXECUTION table.

You aren't seeing that same behavior?

-Ryan

trademak
Star Contributor
Star Contributor
Ryan,

I didn't test in the Activiti Explorer, but in a unit test. And it works fine there. But I'll give it a try in the Activiti Explorer to see if I can reproduce the issue there.

Best regards,