[jboss-user] [jBPM] - Re: getProcess in ProcessInstanceImpl throws a NullPointerException

Sandra Renaud do-not-reply at jboss.com
Thu Apr 4 08:58:55 EDT 2013


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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130404/fb0441ff/attachment-0001.html 


More information about the jboss-user mailing list