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
--------------------------------------------------------------
Hi
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) {
processInstance.???????
}
}
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
thanks
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/538391#538391]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]