Edson Tirelli schrieb:
Btw, this brings me to a new syntax question for the default Drools rule
> when
> Customer( $custId : id )
> DailyOrders( count[$custId] == 1 )
> then
syntax. Is this possible:
when
m:Map()
eval( m.get("type") == "Point", $x : m.get("x") )
...
Circle( x == $x )
then
...
or, an alternative which may be clearer:
when
m:Map()
eval( m.get("type") == "Point" )
$x : m.get("x")
...
then
...
So, what I would like to have is:
1) looking at all Maps which have the value "Point" under the key "type"
2) of all those Maps: store in a var what value they have under key "x"
3) reuse the var, here $x instead of having an expensive lookup over and
over again.
Is that possible? Or would I have to write my example above as
...
c:Circle()
eval(c.getX() == m.get("x"))
André
--
Lisp is not dead. It’s just the URL that has changed:
http://clojure.org/
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users