Sandra Renaud [
https://community.jboss.org/people/joploya] created the discussion
"Re: getProcess in ProcessInstanceImpl throws a NullPointerException"
To view the discussion, visit:
https://community.jboss.org/message/806458#806458
--------------------------------------------------------------
Sorry but I don't understand your answer.
I recurrently throws this error when I work with WorkflowProcessInstance.
This is the code that failed :
WorkflowProcessInstance wpi =
(WorkflowProcessInstance)kSession.getProcessInstance(processInstanceId);
*wpi.setVariable(key, object);*
or
WorkflowProcessInstance wpi =
(WorkflowProcessInstance)kSession.getProcessInstance(processInstanceId);
if((wpi == null) || (wpi.getVariable(key) == null)){
//This case never appears because of persistent sessions
System.out.println("workflow process instance is
null :-(");
}else{
System.out.println("workflow process instance is
NOT null :-)");
retObj = wpi.getVariable(key);
//node info
System.out.println("list of node instance :
");
for(NodeInstance iNode : wpi.getNodeInstances()){
*Node node = iNode.getNode();*
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/806458#806458]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]