[jboss-user] [jBPM] - retrive process variables at runtime

Jose Miguel Loor do-not-reply at jboss.com
Mon Apr 19 18:06:08 EDT 2010

Jose Miguel Loor [http://community.jboss.org/people/jmiguel77] created the discussion

"retrive process variables at runtime"

To view the discussion, visit: http://community.jboss.org/message/538391#538391


I start a process with variables like this

Map<String, Object> variables = new HashMap<String, Object>();
variables.put("logNumber", logNumber);

ProcessInstance processInstance = ProcessEngine.getExecutionService().startProcessInstanceByKey("myProcess", variables,businessKey);

after that, at some other point of my application i want to find if there is any execution that is running and has a specific value in some of the variables; ritght now i have this:

List<ProcessInstance> instances = ProcessEngineProxy.getExecutionService().createProcessInstanceQuery().processDefinitionId("myProcess").notSuspended().list();
if ((instances != null) && (!instances.isEmpty())) {
     for (ProcessInstance processInstance : instances) {

but i am at a lost here; how do i retrieve the variables from each processInstance object ?? there seems to be no method to recover that map

please help, i am really new to this jbpm stuff



Reply to this message by going to Community

Start a new discussion in jBPM at Community

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

More information about the jboss-user mailing list