JBoss Community

Re: getProcess in ProcessInstanceImpl throws a NullPointerException

created by Sandra Renaud in jBPM - View the full discussion

Hello,

 

Thank you for the link. Indeed, when I don't use persistence I just used the workflowProcessInstance and it works great. And the NullPointerException apear after changing to persistent session.

 

But, I already try the command base approach and in my case it doesn't change anything. 

 

My conclusion that seams to work for now is :

WorkflowProcessInstance wpi = (WorkflowProcessInstance)kSession.getProcessInstance(processInstanceId);
 wpi.getVariable(key);

to access variables even if I use persistent session.

 

and define output parameters mapped to process variables directly inside the process and pass a map of results to the complete task method to dynamically change process variables.

Reply to this message by going to Community

Start a new discussion in jBPM at Community