Maciej Swiderski [
https://community.jboss.org/people/swiderski.maciej] created the
discussion
"Re: Getting process instance variables"
To view the discussion, visit:
https://community.jboss.org/message/754272#754272
--------------------------------------------------------------
alright, kind of expected this error, you should run command in this case, something like
this:
Map<String, Object> variables = ksession.execute(new
GenericCommand<Map<String, Object>>() {
public Map<String, Object> execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext)
context).getStatefulKnowledgesession();
ProcessInstance processInstance = (ProcessInstance)
ksession.getProcessInstance(piId);
VariableScopeInstance variableScope = (VariableScopeInstance)
processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE);
Map<String, Object> variables = variableScope.getVariables();
return variables;
}
});
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/754272#754272]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]