AnsweredAssumed Answered

How do we handle outcomes and transitions in Activiti

Question asked by rmoskal on Feb 24, 2011
Latest reply on Feb 25, 2011 by rmoskal
I am porting an app from jbpm 4.  In jpdl we had the notion of different transitions for tasks.  It would be super helpful to me if I could understand how this notion translates to Activiti and BPMN.

In jpdl each task had a notion of different outcomes or transitions.  You could control flow by completing a task with a particular outcome.  In activity your only option is to complete a task.

I see how the gateways and conditional statements in conjunction with setting variables accomplish much the same thing.  But the old way seemed better in that outgoing transitions were self describing.  I could create a task node that lets a manager "approve" or "disapprove" a piece of work by creating those transitions.  I could read these transitions right off the task and create a UI that presented a choice of approve or disapprove. 

Can I do something like this in Activiti?  Looking at the docs it seems that one solution is to use a form enum variable.  Within an app one could perhaps  adopt a convention per human task to specify a variable called "outcomes" and to use it to hold a list of outgoing transitions. 

What I'd like to know is if this is the right way to go about thinking this sort issue.  Is the above a reasonable solution to the problem?  Is it even a problem? Perhaps I am stuck in a old way of thinking.

Any insight would be greatly appreciated.

Thanks for all the hard work!

Robert Moskal
Brooklyn, USA