3 Replies Latest reply on Feb 7, 2007 10:12 AM by webjavier

    Is possible that various users can do the same task parallel

    webjavier

      I can create the same task to various users(ex 3 users'bert, cookie monster y grover') but when they close all task (task1 of the example)only one task submit to the next node(task2 of the example).(i tried with signal=last, lastwait, first wait,never and unsync) and nothing.
      The user of the follow task only view one task (of the last who closed the task). Him should view all task submited(ex of the 3 users).
      In the table JBPM_TASKINSTANCE only be had created one task Instance, when should create 3 taskinstance to the next node task2 of the example.

      My code:

      
      
      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="DefPruebaAjax">
       <swimlane name="rol1">
       <assignment expression="user(ernie)"></assignment>
       </swimlane>
       <swimlane name="rh">
       <assignment expression="group(sales)"></assignment>
       </swimlane>
       <start-state name="inicio" >
       <task name="tarea" swimlane="rol1">
       </task>
       <transition name="t1" to="task1"></transition>
       </start-state>
       <task-node name="task1" create-tasks="false" >
       <event type="node-enter">
       <action name="action1" class="com.sample.action.Asignacion">
       <grupo>JP</grupo>
       </action>
       </event>
       <task name="tarea1">
       </task>
       <transition name="t2" to="task2"></transition>
       </task-node>
       <task-node name="task2" >
       <task name="tarea2">
       <assignment expression="user(bert)"></assignment>
       </task>
       <transition name="ss2" to="end1"></transition>
       </task-node>
       <end-state name="end1"></end-state>
      </process-definition>
      
      
      public class Asignacion implements ActionHandler {
       public String grupo;
       public void execute(ExecutionContext executionContext) throws Exception {
       // TODO Auto-generated method stub
       Token token = executionContext.getToken();
       TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
       TaskNode taskNode = (TaskNode) executionContext.getNode();
       Task task= taskNode.getTask("tarea1");
       //task.set
       tmi.createTaskInstance(task, token).setActorId("bert");
       tmi.createTaskInstance(task, token).setActorId("cookie monster");
       tmi.createTaskInstance(task, token).setActorId("grover");
      
       }
       private static final Log log = LogFactory.getLog(Asignacion.class);
      }
      


      Sorry with my english....