cancel
Showing results for 
Search instead for 
Did you mean: 

TerminateEndEvent terminates the whole process tree (since 5.18/5.17)

benpr
Champ in-the-making
Champ in-the-making
Hello,

with the activiti engine 5.16.1 the terminateEndEvent terminates only the current process. Since 5.18 (or 5.17) this event terminates all processes in the whole tree.

Exists a new (or other) endEvent to normally end only the current process?
The normal endEvent doesn't work in my use case because there are catchEvents in the current process. In 5.16 the terminateEndEvent works fine for this.
Or exists another best practice way for this use case?


Thanks for your answer,

Ben
12 REPLIES 12

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

In the case when you cancel process instance A (parent for the process instance B) what should happen  with the process instance B?

Regards
Martin

benpr
Champ in-the-making
Champ in-the-making
Manually Cancel: The parent process waits for the other childs.
Or do you mean cancelation with the cancelEndEvent?

martin_grofcik
Confirmed Champ
Confirmed Champ

benpr
Champ in-the-making
Champ in-the-making
Hi Martin,

in my case I don't won't to end other subprocesses. I just need to normally end a child process.
My Child process arrives the endEvent but it doesn't end/stop. There's another path with a signalCatchEvent.

In 5.16 I've used the terminateEndEvent. The process arrives the terminateEndEevent and cancel it's own signalCatchEvent and the process is stopped. Now in 5.18 the terminateEndEvent not only stopps the current child process but also the whole tree with the parent and all other childs.

I need a way to normally stop one process with all it's own paths without waiting for SignalCatchEvents.

Sample:
<code>
Process –> parallelGateway –> SignalCatchEvent –> …
                 |——-> Usertask…           –> EndEvent (or in 5.16 TerminateEndEvent)
</code>
When the process arrives the EndEvent it should stop and don't wait for the SignalCatchEvent.
See the TestEndEvents.bpmn.txt.

regards,

Ben

benpr
Champ in-the-making
Champ in-the-making
See my sample process from the other post.
I deploy this in the activiti explorer with the demo project. The timer should pause the process one minute. After this the endEvent arrives.
But the process is still running after 2 minutes and so on.

Can you give me a sample how to redesign this process to end/stop this process after arriving the endEvent?

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

I do not have a working sample, I have a suggestion.
Instead of end event use throw (e.g. message, signal) an event. Catch this event in the parent process call activity boundary event and terminate the step.

Regards
Martin

benpr
Champ in-the-making
Champ in-the-making
Hi Martin,

thanks for your reply.

> Catch this event in the parent process call activity boundary event and terminate the step.
Can I use this in a multi instance call activity?
In my test the child processes can successful finished with "runtimeService.deleteProcessInstance" called from the "call activity boundary event". But the "call activity" doesn't see that the child is finished. So it waits for the child's and the parent process hangs.
See sample in attachment.

What is the best practice or normal way to end a _single_ process (no parent) with waiting catch events?

Is it planned to re enable the old terminate end event functionality (terminate only the current process) as option in an end event?

Theres another problem:
Since 5.17/5.18 "call activity" don't see the end state then the child process is deleted programmatically. It waits for the child although the child is finished.


Regards, Ben

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Ben,

Can I use this in a multi instance call activity?
Try.

Since 5.17/5.18 "call activity" don't see the end state then the child process is deleted programmatically. It waits for the child although the child is finished.
Because you have deleted child process you have to take care of the parent execution. (e.g. you can signal execution to continue….)

Regards
Martin
Try.

benpr
Champ in-the-making
Champ in-the-making
Hi,

> Try.
Don't work.
In my test the child processes can successful finished with "runtimeService.deleteProcessInstance" called from the "call activity boundary event". But the "call activity" doesn't see that the child is finished. So it waits for the child's and the parent process hangs.
See sample in attachment.

What is the best practice or normal way to end a _single_ process (no parent) with waiting catch events?

Is it planned to re enable the old terminate end event functionality (terminate only the current process) as option in an end event?

> Because you have deleted child process you have to take care of the parent execution. (e.g. you can signal execution to continue….)
In 5.16 it worked. How can I manual signal the multi instance "call activity" element that one instance has finished?


Regards,

Ben