JBoss Community

Re: How to get the Task instance id ?

created by Kris Verlaenen in jBPM - View the full discussion

Hi,

 

You can cast kcontext.getNodeInstance() to WorkItemNodeInstance and use getWorkItemId() to get the id of the work item.

You can then get the Task instance itself from the TaskServiceSession using getTaskByWorkItemId(..).

 

Could you maybe share your use case why you need access to the task instance id?  Maybe there is another workaround as well.  It's for example easy to pass the task instance itself as a result parameter of the human task.

 

Kris

Reply to this message by going to Community

Start a new discussion in jBPM at Community