1 Reply Latest reply: Mar 29, 2012 6:48 AM by Maciej Swiderski RSS

    How can I find GroupId

    luke Tang Newbie

      Hello everyboby:

                    

                I want to get next HumanTask's actorId or groupId .


                I used ProcessEventListener to monitor the task flow,  in the beforeNodeTriggered method I can get the node(Human Task) which I'm going to arrive in the next,throw this method I can get the node's Id, name, metaData... but there's no actorId or groupId,

       

      How can I get the HumanTask'actorId or  groupId I'm going to arrive ?!

       

       


      public void beforeNodeTriggered(ProcessNodeTriggeredEvent nodeEvt) {


      NodeInstance nodeInstance = (NodeInstance)nodeEvt.getNodeInstance();


      nodeInstance.getNodeId();


      nodeInstance.getNodeName();


      nodeInstance.getProcessInstance();

      }
        • 1. Re: How can I find GroupId
          Maciej Swiderski Master

          You can try to cast it to HumanTaskNodeInstance if you're sure it is a HumanTask and get a work item out of it. Next, access parameters of work item to get actor id and group id.

           

           

          String actorId = ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getParameter("ActorId");
          
          String groupId = ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getParameter("GroupId");
          

           

           

          HTH