1 Reply Latest reply on Aug 1, 2006 9:08 AM by Olivier Debels

    Assigning users to task

    Daniel Lipski Newbie

      Hi again ;)
      I have problem with assigning group of users to task.
      I have task which can be performed by some group of users calculated in AssignmentHandler and some users which perform some process role(swimlane).

      Example:
      Order is created by shop manager, after that order can be modified by grou pof users called 'order validators' and shop manager who created the order. Shop managers dosn't belong to this group. I have one idea how to realize this but I need some help:

      At process start (creation of order) i have task in start-node and swimlane called orderCreator. This swimlane remebers a shop manager. Then after order is created I have task node with task : 'modify order'. This task have assignment handler where i set pooled actors - 'order validators'. I don't know how to add to this actors shop manager who created order. I don't know do i have to assign some swimlane to 'modify order' task ? If so, I don't know if I have to use the same swimlane as in start-node task, or maybe some other ?

      This is fragment of my process definition:

      <process-definition name="orderManagement">
       <swimlane name="creator"/>
      
       <start-state name="start">
       <task swimlane="creator"/>
       <transition name="init" to="proposed"></transition>
       </start-state>
      
       <task-node name="proposed" end-tasks="true" signal="never">
       <task name="modify">
       <assignment class="OrdersAssignmentHandler"></assignment>
       </task>
      
       <transition name="goToModified" to="modified"></transition>
       </task-node>
      


      I'm not sure is it clear ? Can anybody help me ?
      How to get orderCreator in OrdersAssignmentHandler ?

      Regards

        • 1. Re: Assigning users to task
          Olivier Debels Newbie

          A possibility is:

          You could use executionContext.getProcessInstance().getTaskMgmtInstance().getTaskInstances() in your assignmentHandler. This gives you all task instances of the current process instance. Then you can look up the start task, find the swimlane instance and its actorid and add this to the group of users.

          Maybe there are better solutions...