cancel
Showing results for 
Search instead for 
Did you mean: 

ActivityBehavior

sapra
Champ in-the-making
Champ in-the-making
Hi,
I notice that when I added a service task that implements ActivityBehavior, the process from then on is not behaving as expected.

I need to implement exception handling in my process and I am trying to control the flow by using AB implementation.
The process takes the proper flow identified by the code, but, it appears to run through the rest of the process steps without waiting at the user task.

I see the following in the Activiti user guide:
Note however that this is not a very good practice, and should be avoided as much as possible. So, it is advised to use the ActivityBehavior interface only for advanced use cases and if you know exactly what you're doing.

In my process , I have a java service task  implementing AB and other service tasks which are spring beans.
What exactly I should be taking care of in my AB implementation ?

appreciate any pointers.
thanks
Saprar
3 REPLIES 3

sapra
Champ in-the-making
Champ in-the-making
I tried with 5.9 release too.
Same problem.

trademak
Star Contributor
Star Contributor
Hi,

You should make sure you explicitly take a transition at the end of the ActivityBehavior implementation.

Best regards,

sapra
Champ in-the-making
Champ in-the-making
thanks Tijs.

I did handle the out going transition as you explained in your book.

I get the correct transition and do a "take" on it.
execution.take(transition);

I see the following in the log :
Mar 4, 2012 8:19:58 PM org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior performOutgoingBehavior
FINE: Leaving activity 'usertask1'

and when the task was a spring bean [ not implementing AB] , I see the following
FINEST: loaded object 'ProcessDefinitionEntity[createsomething_wf:2:810]' was not updated
Mar 4, 2012 8:41:12 PM org.activiti.engine.impl.db.DbSqlSession flush