cancel
Showing results for 
Search instead for 
Did you mean: 

activiti engine problem

whdwsl
Champ in-the-making
Champ in-the-making
hi all:
i encount a problem:

when activity B choose arriving to endEvent, in activity C there is also a task instance, and  the process instance is not ended.
this is not what i want .
what i wanted is when activity B choosing arriving to endEvent, i hope this process intance is ended, and there is no task instance could be found.
what can i do?
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
See this post: http://forums.activiti.org/en/viewtopic.php?f=6&t=4301&start=10

Use throwing-message events and wrap your paths that need to be cancelled when one of the reaches the end, in a subprocess. Each path thows a message-event when it ends, causing the boundary-event to catch it and cancel all other flows.

whdwsl
Champ in-the-making
Champ in-the-making
thanks for  frederikheremans's help,it's helpful.

but is there a api to cancel a path?

frederikherema1
Star Contributor
Star Contributor
There is no way to cancel a "single" path, you can only cancel (delete) a full process-instance, using runtimeService.deleteProcessInstance(..)

whdwsl
Champ in-the-making
Champ in-the-making
have tried it , the result is i wanted,  thank you very much!