[rules-users] Iterative diagnosis - how to determine what is the next best fact?

2011-08-20 Thread Kal
Hi, I am new to Drools. I read the documentation and I looked at the examples, but I still not sure how to solve this problem: 1) Kind: iterative diagnosis Rules: if (A, B and C) then print ("Solution 1") if (A, B and not C) then print ("Solution 2") if (A, D and E) then print ("Solution 3") and

Re: [rules-users] Rule(s) based on different (fact) dates (date-effective/date-expired?)

2011-08-20 Thread Wolfgang Laun
Where do you have problems? date-effective and date-expired simply delimit the time interval when a rule is capable of firing. If you have a field of type Date in a fact you can base your rule on this value being before, equal to or after some other Date value in another fact, or a literal, writte

Re: [rules-users] Do really support the containsKey() function on maps?

2011-08-20 Thread Wolfgang Laun
What is the class of $ldapResponseMap.get("zimbraDomainName")? Is it really an InputKey? And if so, how is equals() defined in this class? Does it return true for two different objects, one inserted in Working Memory and another one in the Map()? Did you explore the truth of the eval expression co

Re: [rules-users] Do really support the containsKey() function on maps?

2011-08-20 Thread dvsnmurty
Hello Edson/Wolfgang, Thanks for the reply. I am stuck with 5.0.1 in our company. Would the map expression that you gave work with 5.0.1? I tried to reason it out if there is anything wrong with my logic itself, but can think of any. Essentially, I have a map of Map type, where

Re: [rules-users] Do really support the containsKey() function on maps?

2011-08-20 Thread Edson Tirelli
I think your data is somehow not matching, but you can try to simplify your rule like this (assuming Drools 5.2): rule "transport" when $pfMapType : MapType( name == "transport" ) $inputKey : InputKey( email == true ) $ldapResponseMap : Map( this["zimbraMailDeliveryAdd

Re: [rules-users] Do really support the containsKey() function on maps?

2011-08-20 Thread dvsnmurty
Hello Wolfgang, Thanks for the quick reply. So if equals($inputKey) is the culprit, how can I modify the rule to make it work? My best guess is to do something like this: rule "transport" when $pfMapType : MapType( name == "transport" ) $inputKey : InputKey( email == tru