cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Process Instance of Sub Process does not mark the parent call activity as Complete

rishiraj_kalla
Champ in-the-making
Champ in-the-making
Hi,

I noticed that on deleting process instance of a sub process(through runtimeService.deleteProcessInstance) does not marks the parent call activity as complete, I am using Activiti 5.13 with SpringProcessEngineConfiguration embedded in web server.

I have developed a unit test case with sample process xml to reproduce this, but not sure if this is a bug to report it on JIRA or this is the expected behavior by design.

Also noticed that when delete process instance (through runtimeService.deleteProcessInstance) is called it does not triggers the END EVENT for the sub process.

My understanding was that deleting a sub process instance should achieve the following things:

1. Complete all the tasks of sub process
2. End the sub process by triggering end event . (so that if any process end event listener is configured it can be invoked)
3. Marks the parent call activity as complete

Sorry about the long description but just wanted to provide all details that I have.

Appreciate any help on this.

With Regards,
Rishi
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi Rishi,

When you delete a process instance, the current active tasks are terminated and eventually the process instance is deleted. So the end event is not triggered. To trigger the parent process, you would have to complete the sub process in a normal way.

Best regards,

srinivasulumuna
Champ in-the-making
Champ in-the-making
Hi,

I noticed that on Terminating process instance of a sub process does not marks the parent call activity as complete, and when i terminate main process also manually in this case End event listener is calling twice.  Can any please help me about this issue. i am using activiti 5.17 version.

Here i have three levels sub process process. Parent process is calling to another subprocess, again this subprocess is calling another.
i am jest terminating last level sub process. and again terminating next two level too. See the below log from tomcat server.

process execution listener called ========>: Start ## INSTANCE ID :: 85001
sub process execution listener called ========>: Start ## INSTANCE ID :: 85015
sub process execution listener called ========>: Start ## INSTANCE ID :: 85025
A job has terminated: PROCESS_CANCELLED
Process instance id: 85025

A job has terminated: ACTIVITY_CANCELLED
Process instance id: 85025

sub process execution listener called ========>: End ## INSTANCE ID :: 85025
A job has terminated: PROCESS_CANCELLED
Process instance id: 85015


sub process execution listener called ========>: End ## INSTANCE ID :: 85015
sub process execution listener called ========>: End ## INSTANCE ID :: 85015
A job has terminated: PROCESS_CANCELLED
Process instance id: 85001


process execution listener called ========>: End ## INSTANCE ID :: 85001
process execution listener called ========>: End ## INSTANCE ID :: 85001

jbarrez
Star Contributor
Star Contributor
Hmm if so, that is a bug. Can you upload a failing process xml so we can verify?

deign
Champ in-the-making
Champ in-the-making

Hey Guys,

are there any adjustments done?

Maybe anybody know something about it. We think we have a similar Problem...

With best regards,

Dominik