[rules-users] Using constants in drools flow

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Mon Aug 24 22:05:59 EDT 2009


The Drools Flow XSD can be found in the drools-compiler jar.
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-5.0.xsd
You can define globals in the header section like this:
<header>
  <globals>
    <global identifier="list" type="java.util.List" />
  </globals>
</header>

Kris

Quoting kothvandir kothvandir <kothvandir at gmail.com>:

> Hello,
> 
> How can I define a constant in en jboss flow process so I can use it
> in a
> flow-group rules?
> I have defined it in the .drl that contains the ruleflow-group but
> when i
> try to set the constant with my service object using:
> 
> ksession.setGlobal("myService", serviceObject);
> an Exception is thrown
>                        java.lang.RuntimeException: Unexpected global
> [myService]
> 
> 
> Is there any way to define globals in the .rf file within <head> tag?
> anyone
> knows where can i find the xsd description for .tf files?
> 
> Thanks
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the rules-users mailing list