Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
Undefined
-
NEW
-
NEW
Description
This test fails
@Test public void testBetaMap() { String str = "import " + Result.class.getCanonicalName() + ";" + "import " + Map.class.getCanonicalName() + ";" + "rule R when\n" + " $r : Result()\n" + " $markV : Map(this['name'] == 'Mark')\n" + " $olderV : Map(this['name'] != 'Mark', this['age'] > $markV['age'])\n" + "then\n" + " $r.setValue($olderV.get(\"name\") + \" is older than \" + $markV.get(\"name\"));\n" + "end"; KieSession ksession = getKieSession( str ); Result result = new Result(); ksession.insert( result ); Map mark = mapPerson("Mark", 37); Map edson = mapPerson("Edson", 35); Map mario = mapPerson("Mario", 40); FactHandle markFH = ksession.insert(mark); FactHandle edsonFH = ksession.insert(edson); FactHandle marioFH = ksession.insert(mario); ksession.fireAllRules(); assertEquals("Mario is older than Mark", result.getValue()); result.setValue( null ); ksession.delete( marioFH ); ksession.fireAllRules(); assertNull(result.getValue()); mark.put("age", 34 ); // ksession.update( markFH, mark, "age" ); }