JBoss Community

Re: Accessing process variables in rule-task

created by Esteban Aliverti in jBPM - View the full discussion

I'm not sure if I understood the question, but if what you need is to access process variables inside your rules, you can use something like this:

 

 

rule A
ruleflow-group "ABC"
when
$process: WorkflowProcessInstance()
then
Map variable = (Map)((WorkflowProcessInstance)kcontext.getKnowledgeRuntime().getProcessInstance($process.getId())).getVariable("variableName");

end

Reply to this message by going to Community

Start a new discussion in jBPM at Community