I have a requirement of run rules on dynamic map instead of POJO, for
example:
*when
Map(* TransCode == "LOGIN" , userName == "wangzx", password ==
"123456"
)
*then
doSth1()
when
Map( *TransCode = "SaveOrder" userName == "wangzx" category ==
"Book")
*then
doSth2()
*
the Fact is not a Java Bean, but a dynamic map<String, Object>, so the
TransCode == "Login" is what we means map("TransCode") ==
"Login".
By using map insteam of POJO, we can build a rules run on the message
dispatch, since there is a lot of Message Types, and each message type has
different schema, so using dynamic types is more flexible than POJO.
Can someone tell me how can it be supported in drools? Very thanks.