roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: NullPointerException while executing knowledgeSession.getProcessInstance"

To view the discussion, visit: https://community.jboss.org/message/799376#799376

--------------------------------------------------------------
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();
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799376#799376]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to