[jboss-user] [jBPM] - Re: Process variables rules template relationship

Maciej Swiderski do-not-reply at jboss.com
Tue Mar 20 03:34:09 EDT 2012


Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Process variables rules template relationship"

To view the discussion, visit: https://community.jboss.org/message/724924#724924

--------------------------------------------------------------
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
[https://community.jboss.org/message/724924#724924]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

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


More information about the jboss-user mailing list