Amin MC [http://community.jboss.org/people/aminmc] created the discussion
"Process Instance Variable within WorkItemHandler" To view the discussion, visit: http://community.jboss.org/message/602066#602066 -------------------------------------------------------------- Hi I have a custom work item handler and I would like to load the value of a process instance variable while executing the work item handler. Basically I have a service method which does the following: public String getValue(Long processId, String variableName) { session.getProcessInstance(..); instance.getVariable(variableName); //do something with the value...but not modify } When i call this service method within the execute method of the work item handler I get a nullpointerexception and the stacktrace indicates that the processinstancebytearray value of ProcessInstanceInfo is null. I guess this is because the process has not reached a safe point to persist. Is there another way to get the value of a variable defined in the process within the execution of the work item handler? This is the final part of a POC I am currently working on demonstrating the use of JBPM 5 so any help on this would be extremely grateful. Cheers -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/602066#602066] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user