Ending event sub-process instances

751 views
Skip to first unread message

Bart Brandhoff

unread,
Apr 18, 2014, 10:39:33 AM4/18/14
to camunda-...@googlegroups.com
Hi guys,

In one of our process diagrams we want to have an optional (multi instance) sub-process that stops when the parent (sub)process ends. We were trying to use the event sub-process to achieve this, but just found out that the event sub-process has to end before the process can complete. This is the construction we were trying to use:


​Is it right that this will not work for our purposes? And if so, any suggestions as to how we might otherwise approach it? Thanks a lot.

Regards.
Bart

Daniel Meyer

unread,
Apr 18, 2014, 12:54:10 PM4/18/14
to camunda-...@googlegroups.com, bart.br...@globalorange.nl
Hi Bart,

Maybe you can use a terminate end event in combination with a non-interrupting event subprocess?


I am not 100% whether I understood the part about multi instance correctly. Which task should be made multi instance?

Cheers,
Daniel

Daniel Meyer

unread,
Apr 22, 2014, 10:40:39 AM4/22/14
to camunda-...@googlegroups.com, Bart Brandhoff
Hi Bart,

You have sent this to me directly instead of the forum list. I have re-added the mailing list so that your reply is posted there:

Hi Daniel,

Sorry for the confusion, with the multi instance note I meant that we are starting multiple instances of the event sub-process. We tried using the terminate end event, but this doesn't seem to work. When we for instance have 3 unfinished event sub processes, the end event terminates only one.

cheers,
Bart

Daniel Meyer

unread,
Apr 22, 2014, 10:44:44 AM4/22/14
to camunda-...@googlegroups.com, Bart Brandhoff
Hi Bart,

I am so sorry but I am still unable to understand your use case fully. Maybe you can provide another example? Maybe with "real world" activity names?

Sorry for not being more helpful.

Cheers,
Daniel

Bart Brandhoff

unread,
Apr 23, 2014, 3:35:16 AM4/23/14
to Daniel Meyer, camunda-...@googlegroups.com
Hi Daniel,

Thanks for being patient, let me try to be a little less vague :) We are trying to model a process for a roster planning application. At the end of this process an employee will be rostered to work on a specific day. The planner has the choice of performing one of two tasks. He can either connect an employee to the duty, or ask the employee whether he's available (this would be the event sub-process). We would like that the terminate end event would also terminate any not completed 'return availability' task, however currently we see that if there are more than one (event) sub-processes, they are not all killed.





--
Kind regards,
Bart Brandhoff
____________________
GlobalOrange BV
Haarlemmerstraat 124E
1013EX Amsterdam
The Netherlands
(t) +31(0)20 420 4193

(skype) bart.brandhoff.globalorange
(e) bart.br...@globalorange.nl
(i) http://www.GlobalOrange.nl
(twitter) @GlobalOrangeNL




Daniel Meyer

unread,
Apr 23, 2014, 1:27:25 PM4/23/14
to camunda-...@googlegroups.com, Daniel Meyer, bart.br...@globalorange.nl
Hi Bart,

ahh OK, now I think I unerstand what you are getting at. So if the message arrives multiple times, the non-interrupting event subprocess is started multiple times (correct) but when the terminate end event is triggered, these instances are not all ended. If that is true it would be a bug :)

Could you maybe provide a small self-contained testcase of this? You can use the following project template: https://github.com/camunda/camunda-engine-unittest

Thanks a lot!
Daniel Meyer

Bart Brandhoff

unread,
Apr 24, 2014, 6:12:12 AM4/24/14
to Daniel Meyer, camunda-...@googlegroups.com
Hi Daniel,

I forked the project template and made a small test case:

https://github.com/BartBrandhoff/camunda-engine-unittest

Unless I missed something, it seems that the terminate end event in this case does not terminate all event sub-processes.

cheers,
Bart

Sebastian Menski

unread,
Apr 25, 2014, 7:00:09 AM4/25/14
to camunda-...@googlegroups.com, Daniel Meyer, bart.br...@globalorange.nl
Hi Bart,

thank you for the test case. I looked into it and can confirm that there exists a bug in the creation of the tasks inside the event subprocess. They are
added to the wrong parent execution and therefore cannot be terminated by the terminating end event of the subprocess.

I created a ticket CAM-2155 for this bug and commited your failing test case to the engine repository. We will work on a fix for this bug in the next week.

Thanks again for your contribution.

Cheers
Sebastian

Daniel Meyer

unread,
May 5, 2014, 4:14:07 AM5/5/14
to camunda-...@googlegroups.com, Daniel Meyer, bart.br...@globalorange.nl
This issue has been fixed.

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