0 Replies Latest reply on Mar 30, 2007 9:46 AM by Siraj Mohamed

    How to assign multiple actors to a task

    Siraj Mohamed Newbie

      Hi All,

      I am newbie to jbpm and use jbpm 3.1.2 version.

      This is my requirement: I want to assign a task to multiple actors so that any of assinged actor can perform the task. In the following example, when process reaches 'test' task, i want to assing this task to two users.

      This is my sample prcessdefinition.xml

      <?xml version="1.0" encoding="UTF-8"?>
       xmlns="urn:jbpm.org:jpdl-3.1" name="ORPG_Dummy">
       <start-state name="start">
       <transition name="t1" to="Test"></transition>
       <task-node name="Test">
       <task name="task1">
       <assignment class="com.sample.action.MyAssignHandlerAction" config-type="bean"></assignment>
       <transition name="t2" to="end1"></transition>
       <end-state name="end1"></end-state>

      And this is my assign handler class
      public class MyAssignHandlerAction implements AssignmentHandler {
       private static final long serialVersionUID = 1L;
       public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception {
       String[] pooledActors = new String[] {"user1", "user2"};

      When i deploy and test above sample, the task is not assinged to given actors and am I doing wrong or missing some thing else here?

      I appriciate your answer.