-
1. Re: How to get BPMN node id using API?
swiderski.maciej Jan 7, 2014 2:31 AM (in response to ghollins)from NodeInstance you can get access to Node which then has map of metadata and one of the metadata is the id of the node, it is stored under UniqueId key in the meta data map.
HTH
-
2. Re: Re: How to get BPMN node id using API?
ghollins Jan 7, 2014 11:24 AM (in response to swiderski.maciej)Hi Maciej,
Thanks for the pointer. However, I'm unable to get a NodeInstance. Perhaps I'm using the wrong ID? Here is code I have tried:
org.kie.api.runtime.process.NodeInstance ni = processInstance.getNodeInstance(workItem.getProcessInstanceId());
org.kie.api.runtime.process.NodeInstance ni2 = processInstance.getNodeInstance(workItem.getId());
log.info("NODE INSTANCE: "+ni+" (for workItem.getProcessInstanceId() = "+workItem.getProcessInstanceId()+")");
log.info("NODE INSTANCE: "+ni2+" (for workItem.getId() = "+workItem.getId()+")");
And this is the output:
NODE INSTANCE: null (for workItem.getProcessInstanceId() = 196)
NODE INSTANCE: null (for workItem.getId() = 1019)
As you can see, I'm getting null for the NodeInstance variables. How do I get the nodeInstanceId from the workItem?
Thanks,
Galen
-
3. Re: How to get BPMN node id using API?
swiderski.maciej Jan 8, 2014 4:07 AM (in response to ghollins)