This content has been marked as final.
Show 1 reply
-
1. Re: Identifying one of several Send tasks of a business process in a Work Item handler
chadiem Nov 23, 2016 11:42 AM (in response to chadiem)ProcessInstance processInstance = kieSession.getProcessInstance(workItem.getProcessInstanceId()); RuleFlowProcessInstance ruleFlowProcessInstance = (RuleFlowProcessInstance) processInstance; Collection<NodeInstance> processNodeInstances = ruleFlowProcessInstance.getNodeInstances(); for (NodeInstance nodeInstance : processNodeInstances) { if (nodeInstance.getNodeId() == ((WorkItemImpl) workItem).getNodeId()) { return ruleFlowProcessInstance.getRuleFlowProcess().getNode(nodeInstance.getNodeId()).getName(); } } return null;
This should do it.