<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:18pt"><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;">Sorry for posting this question here but the jbpm forum has been down for a long time.</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;"><br></div><div style="background-color: transparent;"><font size="5">I am interested in getting access through the api to the Input and Output parameters of a Human Task service in a process</font><br></div><div style="background-color: transparent;"><font size="5">I see that this information lies in WorkItem if im not mistaken using getParameters() and getResults() <br></font></div><div style="background-color: transparent;"><font size="5">However how do I get access to the work item for a particular ProcessInstance pi?<br></font></div><div
style="background-color: transparent;"><font size="5">I tried the following </font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5">Collection<org.drools.runtime.process.NodeInstance> nodeInstances = ((RuleFlowProcessInstance)pInstance).getNodeInstances(); From the node instances i tried to get the Work item: </font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5">WorkItem workItem = nodeInstance.getWorkItem(); </font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5"><br></font></div><div style="background-color: transparent; color:
rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5">but got a NPE since it seems the InternalKnowledgeRuntime is null in WorkItemNodeInstance getWorkItem()<br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5">Can anyone please help?</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style', 'new york', times, serif; font-style: normal;"><font size="5"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 24px; font-family: 'bookman old style',
'new york', times, serif; font-style: normal;"><font size="5">Thank you,</font></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;"></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;"> </div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;">Afshad Dinshaw</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 18pt;">afshadd@yahoo.com</div></div></body></html>