-
1. Re: How to read return-variable from bpmn files to java file?
milhaim Jun 18, 2012 5:54 AM (in response to mutou)Hi,
you can get the new value by : ret = instance.getVariable(variableName);
you just need to be sure that your java code is executed after your ret variable was updated (after the exeution of your script).
HTH.
-
2. Re: How to read return-variable from bpmn files to java file?
mutou Jun 18, 2012 6:02 AM (in response to milhaim)I am sorry that it can't work.
the varible instance of Class ProcessInstance hava no such functions as getVarible(). So this is not a good approach.
I am sure that ret was updated after the execution of my script. I print out the result in my script and it is 2.
Thank you anyway.
-
3. Re: How to read return-variable from bpmn files to java file?
milhaim Jun 18, 2012 6:24 AM (in response to mutou)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
-
4. Re: How to read return-variable from bpmn files to java file?
mutou Jun 18, 2012 6:36 AM (in response to milhaim)That's a good idea!
It's right!
Thank you very much!!
-
5. Re: How to read return-variable from bpmn files to java file?
milhaim Jun 18, 2012 6:53 AM (in response to mutou)you're welcome.
miloud