-
1. Re: NullPointerException while executing knowledgeSession.getProcessInstance
roxy1987 Feb 22, 2013 2:13 PM (in response to sc_boss)What do you want to achieve by the code?
-
2. Re: NullPointerException while executing knowledgeSession.getProcessInstance
sc_boss Feb 22, 2013 3:26 PM (in response to roxy1987)i want to get the process instance that i created in a session.
-
3. Re: NullPointerException while executing knowledgeSession.getProcessInstance
roxy1987 Feb 25, 2013 9:33 AM (in response to sc_boss)I dont know about the question you raised but I can give you other alternatives to get process related details. But it all depends on why you want the process instance object.
If you are creating the process in the same session then you can get the instance while starting the process.
ProcessInstance processInstance = ksession.startProcess(processDefId);
If you are saving the session then I believe you can save the process instance object too.
On the other hand if your Session is killed, and if you have the process instance id, which I believe you do have as I see the hardcoded value 16 in the code, you could use the following code to get process instance related details :
JPAProcessInstanceDbLog.findProcessInstance(id);
Regards.
Another way is to connect to the taskclient and getting the TaskSummary List object.
client.getTasksByStatusByProcessId(processInstanceId,statusList, "en-UK", responseHandler); taskSummaryList = responseHandler.getResults();