2 Replies Latest reply on May 9, 2011 2:00 AM by janani anbarasan

    SEAM-jBPM : Assigning actor-id dynamically at each task node.

    Ambrish Singh Newbie
      Hi All,

      How can I assign actor-id dynamically (from drop-down of username) before processing any task node defined in process definition.

      For example,

      If first task node is applicable for actor-id "a1", then i want that second or third task nodes are applicable for the actor-id that is selected from some drop down. Consider the code given below, after approving the Inventory order, it is assigned to actor, which is selected from drop-down.

      What should be the expression for actor-id in
      <assignment pooled-actors="#{taskApplicableFor.assignActors}" actor-id="#{actor.id}"/>.

      where #{actor.id} represents the current user logged in.


           xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd"

          <start-state name="start">
              <transition to="approval"/>

           <task-node name="approval">
              <task name="approval" description="Review Inventory">
                  <assignment pooled-actors="#{taskApplicableFor.creatorActors}" actor-id="#{actor.id}"/>
              <transition name="approve" to="assign"/>
              <transition name="reject"  to="cancelled"/>
          <task-node name="assign">
              <task name="assign" description="Assign">
                  <assignment pooled-actors="#{taskApplicableFor.assignActors}" actor-id="#{actor.id}"/>
          <transition name="closed"  to="complete"/>
          <end-state name="complete"/>
          <end-state name="cancelled"/>