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?
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.