> 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