[rules-users] Re: Mixing dsl language and regular rule syntax in arule file

Quinn, Dan dequinn at fedex.com
Fri Mar 20 14:36:13 EDT 2009


 
Thanks for the response. As I am sure you expected it worked!

Daniel Quinn
Fedex - Custom Critical
Software Specialist I
234.310.4090(x2586)

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Matt Geis
Sent: Friday, March 20, 2009 12:34 PM
To: rules-users at lists.jboss.org
Subject: [rules-users] Re: Mixing dsl language and regular rule syntax
in arule file




>>  Is it possible to mix dsl language and regular rule syntax in a rule
file? 

Absolutely.  Last I checked, it was not documented, but you can see it
in the samples that ship with Drools.  Your dslr file below has been
rewritten to support what you want to do.  (The '>' character tells the
parser to not perform DSL expansion on a given line)

animal.dslr file
#created on: Mar 12, 2009
package com.fedex.cc.expertsystem.test
import com.fedex.cc.expertsystem.fact.*

expander animal.dsl

rule "Set dog's ownership"
no-loop
    when
        There is an animal lover and dog in the system
    then 
        The person owns the dog
end

rule "Tell us person doesnt like dogs"
    when 
>        person : Person(animalLover == false)
    then 
>        System.out.println("Person does not like dog");
end


      
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list