JBoss Community

Re: How to read return-variable from bpmn files to java file?

created by Miloud Haimoune in jBPM - View the full discussion

you have to cast the processInstance to WorkflowProcessInstanceImpl:

use :

WorkflowProcessInstanceImpl processInstance = (WorkflowProcessInstanceImpl) ksession.getProcessInstance(processInstanceId)

or

WorkflowProcessInstanceImpl instance=(WorkflowProcessInstanceImpl) ksession.startProcess("org.jbpm.sample.hello",paras);

 

and  processInstance.getVariable("ret");

 

this is working from me

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community