cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Behaviour in Some Situations

gokceng1
Champ in-the-making
Champ in-the-making
Hi,
I don't know whether it is right place to post this but I need some guidance about some points.

1. I have 2 callactivities in parallel, let's say A and B. In each there are some various tasks(service, receive, user etc tasks). Because Activiti processes parallel executions in order, it may be possible that execution on A can wait at some point and execution on B starts to execute until a wait point(user task, receive task etc). While executing the flow on B I faced with an unexpected situation and I need to stop whatever waiting/going on A. Also I may need to compensate whatever is done in A and then terminate it. How can I use Activiti in that situation?

2. Independent of 1, in serial execution I still may want to stop the execution at some arbitrary point and take other actions(bpmn process again) according to the reason which caused this termination need. What does Activiti offer me in this situation?

Thanks in advance.
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
1. You should try to play with event handlers on the boundary of the call activity or wrap the called process in an embedded subprocess with a boundary error event on. Altough it ight be tricky to get it right, because errors are handled by scope, and you have two clear different scopes here. It might be good to check out if you can solve your problem using a signal throw and catch on the boundary event.

For compensation, you can design it yourself out of the boundary event. Activiti does support a compensation handler, but I don't know if you will be able to model it correctly in this case.

2. In general, BPMN has the notion of events for this. An event is interrupting (can be non-interrupting too).