5 Replies Latest reply on Jan 11, 2009 11:37 AM by Ronald van Kuijk

    pooled-actors vs actor-id

    Farid Shahy Newbie

      Hi
      I have created a business process and started my tasks using actor-id in process definition
      and setting actor ID in my authenticator method.


      public boolean authenticate()
      {
      .
      .
      .
      if (customerManager.loginCustomer(credentials.getUsername(), credentials.getPassword()))
      {
      .
      .
      .
      actor.setId(credentials.getUsername());
      .
      .
      .
      }
      .
      .
      .
      


      in process definition I have:


           <task-node name="submit-number">
                <task name="submit-number">
                     <assignment actor-id="#{actor.id}" />
                </task>
                <transition to="check-number" name="next"/>
           </task-node>
      


      The problem is how to prevent a user from starting a specific task which
      must be started by admin, so I tried pooled-actors.
      I changed actor-id to pooled-actors in process definition


           <task-node name="submit-number">
                <task name="submit-number">
                     <assignment pooled-actors="customer" />
                </task>
                <transition to="check-number" name="next"/>
           </task-node>
      
           <task-node name="check-number">
                <task name="check-number">
                     <assignment pooled-actors="admin" />
                </task>
                <transition to="end-state1" name="complete"/>
           </task-node>
      



      and in my authenticator method:


      actor.getGroupActorIds().add("customer");
      .
      .
      .
      actor.getGroupActorIds().add("admin");
      


      having this, my process starts bu none of users can see their processes.


      Can anybody help please.