JBoss Community

Re: How to get current node instance in a workitem handler?

created by Igor Kuzminskyy in jBPM - View the full discussion

Hi Kris,

 

Thank you a lot for your suggestion but I found one problem:

The work item currently has access to the process instance id, so you could just retrieve the process instance from the session and find the node instance that references this work item. 

I don't understand how can I find node instance 'that references this work item'. I went through documentation and sources with no result: NodeInstance doesn't seem to have Work Item reference, createWorkItem in WorkItemNodeInstance also doens't give any hints on how corresponding Node can be found by WorkItem.

I'm very interested in this problem partially because I need to get use of proposed workaround in https://issues.jboss.org/browse/JBPM-3618

I would be very thankful if you can help

Reply to this message by going to Community

Start a new discussion in jBPM at Community