[rules-users] Rewriting rules

jwillans2 james.willans at ceteva.com
Wed Feb 9 10:49:49 EST 2011


Hi Wolfgang,

For example, the user may specify something along the lines of:

rule "example"
  when
    Object(slot = "value")
  then
    ..
end

Minimally we might want to rewrite the rule to strengthen the condition:

rule "example"
  when
    Object(slot = "value", id = 125)
  then
    ..
end

Where 125 is not known until runtime.  We may want to handle more complex
cases where the user refers to "facts" that are conceptually scoped, but we
may want to rewrite using "from":

rule "example"
  when
    $op : ObjectProvider()
    Object(slot = "value") from op.eval()
  then
    ..
end

Thanks,

James

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rewriting-rules-tp2458626p2459318.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list