cancel
Showing results for 
Search instead for 
Did you mean: 

Error/Signal in Multi-Instance CallActivity buggy?

thilka
Champ in-the-making
Champ in-the-making
Hello,

I try to implement a process where a certain process is started for all elements contained in a collection.
The "outer" process just contains a call activity (multiinstance configuration (parallel) for the collection) and an error boundary event.
The "inner" process executes some functionality and in some cases, the inner process ends in an error event, which is caught in the outer process by the boundary error event.

No problem if everything goes right in all subprocesses. The process instance is ended properly.
However if I one of the inner processes ends in the error event, the path attached to the boundary error event is executed but the process instance does not come to an end. (Several executions still active for the process instance). I tried to change cancelActivity=true/false, but no changes in process execution.
Is this the proper way to do error handling? Alternatives?

Another thing: How can I cancel the execution of the parallel callActivity instances? I tried to use a signal as boundary event (cancelActivity=true) to the callActivity, but if I try to signal the process, an exception occurrs. (See http://jira.codehaus.org/browse/ACT-1389). But in general: Is this the proper way to cancel the execution of the "subprocesses"? Having a Completion Condition for the multiinstance callActiviti works, but then I cannot react on the cancel operation (e.g. write the information about the cancel operation in a log table).

I think this situation is quite common and hopefully Activiti supports it.

Thanks,
Tobias
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
Hi there,

Is it possible to create a minimal version of the process you describe and create a unit-test for it? See the sticky in the forums on how to create a unit-test.

thilka
Champ in-the-making
Champ in-the-making
I created a project with both problems, the error handling and the signal processing.
The javadoc for the test cases contains the expectations I have about what should happen in activiti.

Thanks for your help.

Tobias

thilka
Champ in-the-making
Champ in-the-making
Cannot upload the file. Can I send it via email?

frederikherema1
Star Contributor
Star Contributor
Sure, I'll PM you the details

frederikherema1
Star Contributor
Star Contributor
Thanks for reporting, will take that on myself: https://jira.codehaus.org/browse/ACT-1402

frederikherema1
Star Contributor
Star Contributor
1. Error-boundary event was used using "cancelActivity=false". Against 5.11-SNAPSHOT, the test succeeds because the cancelActivity is forced on boundary error-events.
2. Signal-test was using the event-id instead of the name of the event to call signalEventReceived(), use runtimeService.signalEventReceived("mySignalName") instead!
Closing issue, not a bug…