JBoss Community

Re: Process variables rules template relationship

created by Maciej Swiderski in jBPM - View the full discussion

You can access process variables from rules so I believe that would work for your case. Just make sure you insert process instance as a fact into the session so you can then access it and its variables.

 

import org.drools.runtime.process.WorkflowProcessInstance
 
rule "your rule"
    when
        p: WorkflowProcessInstance()
      then
        System.out.println("Variable is " + p.getVariable("yourVar"));
 end
 

HTH



Reply to this message by going to Community

Start a new discussion in jBPM at Community