cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate End Event in Call Activity

foranc
Champ in-the-making
Champ in-the-making
Hi! We are attempting to terminate the entire process from within a Call Activity using Activiti 5.17.

It appears that Terminate End Events within Call Activities are not yet supported, as rather than the parent process ending, it simply continues as usual (acting like there was a normal End Event within the Call Activity). We've tried running TerminateEndEventTest.testTerminateInCallActivity.bpmn and found the same result. Is there any chance of this getting supported in future releases?

We've also tried calling deleteProcessInstance from within the child Call Activity. This results in the bug seen here:
http://forums.activiti.org/content/npe-511-when-deleting-process-service-task
Once again, is there any chance of this error getting resolved?

If neither of these fixes are on the horizon, do you have any additional suggestions to implement this behavior (other than overriding the engine ourselves).

Thank you so much!
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
The TerminateEndEventTest.testTerminateInCallActivity runs green on 5.18.
Or do you mean you have done changes to that process to make it fail?

foranc
Champ in-the-making
Champ in-the-making
Looking at TerminateEndEventTest.testTerminateInCallActivity, it appears that it is demonstrating that Terminate End Events terminate the Call Activity and continue the parent. Our understanding was that Terminate End Events should terminate the entire process, including the parent. If this is not the case, is there another type of event or task we can use to do the above? Thanks!

jbarrez
Star Contributor
Star Contributor
It's been a while since I've looked at the terminate event, but if that's the test then i assume it's according to the spec. One option could be to set a variable in the called process and use that variable to route to another terminate end event?

foranc
Champ in-the-making
Champ in-the-making
Alright. It was our understanding from the second post (the first by martin.grofcik) here:
https://forums.activiti.org/content/runtimeservicedeleteprocessinstance-causing-activitioptimisticlo...
that this was a bug and that parents should be terminated by a terminate end event in a child Call Activity, but I may have misread the post.

Any updates on the deleteProcessInstance bug mentioned in my first post?

Thanks for the suggestion! We're trying to avoid adding additional end events to parent processes, but will certainly consider it.

jbarrez
Star Contributor
Star Contributor
"that this was a bug and that parents should be terminated by a terminate end event in a child Call Activity, but I may have misread the post."

My take is always that the unit tests reflect the truth. At least, the current truth.

"Any updates on the deleteProcessInstance bug mentioned in my first post?"

Calling that service API from within a service task probably will not work indeed. It probably needs quite a bit of work to make that happen.

foranc
Champ in-the-making
Champ in-the-making
Alright, thank you for your help!

jbarrez
Star Contributor
Star Contributor
@foranc: fyi: we'll look at it in more detail soon. We've got other users saying the opposite thing (the whole parent _is_ killed when using terminate end event with call activities). We'll dig into it and see what's up.