[rules-users] Calling a rule within a rule

Dinesh kumar dinp87 at gmail.com
Tue Jun 1 21:30:08 EDT 2010


Hi All,

I am new to Drools and I need a help.

Is it possible to call a rule within a rule.
i.e., only when rule1 condition is true , my rule2 should execute

rule1 
when a!=null 
then
...

rule2
when a.toString() !=""
then
...

Though i can write both the conditions in the same rule, its not a feasible
solution as my business rules are much complicated. I am expecting to write
something like this..


rule1 
when a!=null 
then

when a.toString() !=""
then
...

end
end

But this is not working out. It would be great if someone can help me out..
Also I understood that variables cannot be declared in guvnor.. Is this
true..? If true then what is an alternative. Kindly help me








Regards,
Dinesh
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Calling-a-rule-within-a-rule-tp863409p863409.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list