Community

Need help with workflow in Alfresco

reply from Scott Gartner in jBPM - View the full discussion

So, it turned out that my problem was misunderstanding how to do multiple assignees while allowing the workflow to transition with any one of those assignees.  It turns out that jBPM doesn't support this in a simple model, you have to do a lot more work than just assigning multiple assignees.I had followed a bad example that I found on the Internet and had made  an incorrect assumption about how this works.

 

jBPM does have a concept of parallel tasks (using forks), but the normal action  requires all assignees to complete their tasks before the workflow will  transition.  It turns out that the right way to solve this is to fork the task to all of the assignees, but when any of the assignees completes their task we patch up the variable that stores how many assignees must complete their tasks (node.nOutOfM) to fool jBPM into finishing the task before all assignees have completed it (this can also allow only x out of y assignees to have to complete the task).

 

Rather than posting updated code, here are the articles that I used to solve this problem:

 

http://forums.alfresco.com/en/viewtopic.php?f=30&t=8691

http://forums.alfresco.com/en/viewtopic.php?f=34&t=5189

http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/workflow/jbpm/ForEachFork.html

http://wiki.alfresco.com/wiki/WorkflowAdministration#For_Each_Fork

 

Scott

Reply to this message by going to Community

Start a new discussion in jBPM at Community