我在地图中插入了一些键和值,并试图以drools的形式获取这些地图值。我需要知道如何从Drools中的map获取值
在Java中
Map<String,String>mapTest = new HashMap<String,String>();
mapTest.put("name","John Doe");
mapTest.put("id","123");
在Drools
rule "when id equals 1000"
when
$obj1 :Map(this["id"] == "1000");
then
System.out.println("ID is equal to 1000" + $obj1);
//this $obj1 prints map values in console
//but i need to print only value of name (Print "John Doe")
end