JBoss Community

Re: calling the setVariable on reloaded ProcessInstance leads to NullPointerException

created by amadets in jBPM - View the full discussion

I don't know that is a bug or not, but this not work properly.

Try this:

Map<String, Object> parameters = new HashMap<String, Object>();

parameters.add(varName, varValue);

org.drools.runtime.process.ProcessInstance processInstance = ksession.createProcessInstance(processId, parameters);

ksession.startProcessInstance(processInstance.getId());   

WorkflowProcessInstance wpi = (WorkflowProcessInstance) processInstance;

 

ts

Reply to this message by going to Community

Start a new discussion in jBPM at Community