I was trying to write a dynamic rule engine through Drools. Means, if a new property/attribute is added to the object which will be used for evaluation, i should not need to code a new field in that DTO, and redeploy that code.
Found something trait close to that. I find 2 issues in it. Can somebody help?
1. knowledgeSession.fireAllRules() returns the number of matches to the provided object. Here it returns more than the number of rules documented in the drl.
2. whatever i do my insert (new PolypathSystem()) does not work. It keeps saying org/drools/core/factmodel/traits/test/Rule_PolyPathSystem11121790227.java (9:566) : Cannot instantiate the type PolypathSystem
my java code looks like below. As its a test code and so the content of the drl file is hardcoded here itself
Thanks and Regards,
Software developer (Apps),
My, my, aren't you a big fella. Here, have a tiny ad: