Hi all,
Im using an object called ‘Fact’ this object has
one attribute that is a hashmap ‘details’
I know there are several ways to access the parameters in
the hashmap
$f : Fact()
eval ($f.getDetails().get("END_MATCH").toString()
== "true" &&
$f.getDetails().get("WINNER").toString() == "HOME")
$f : Fact(details.END_MATCH ==
true,details.WINNER == "AWAY")
$f : Fact()
details(fact == $f, name == "END_MATCH",
value == true)
I was told the third option works but it doesn’t for
me!
Anyway my question is: Is there anyway for these sort of
rules to not through an exception if any of the named parameters aren’t
on the hashmap ‘details’?
Ideally the rule would simply not fire if it looked for a
key that wasn’t there!
Any info much appreciated
Alex