3 Replies Latest reply on Jan 8, 2014 4:07 AM by Maciej Swiderski

    How to get BPMN node id using API?

    Galen Hollins Newbie

      Hi,

       

         In a WorkItemHandler, I need to get the a node's ID.  For example in the following example I would want to get "_86409638-AE00-4A3C-BE97-32E1E8108BF4"

       

       

      <bpmn2:serviceTask id="_86409638-AE00-4A3C-BE97-32E1E8108BF4" name="foo" ...

      ...

      </bpmn2:serviceTask>

       

      I have access to WorkItem and WorkItemManager:

       

      public void executeWorkItem(WorkItem workItem, WorkItemManager manager)


      However, workItem, only has access to an "id" that is a long value.. 

      I even tried getting access via the NodeInstance, but I don't see any methods that help me.  For example:

       

      org.kie.api.runtime.process.NodeInstance ni = processInstance.getNodeInstance(workItem.getId());


      Any ideas?


      Thanks,

      Galen