Closed alpesh-miles closed 10 years ago
This can be done within a NewFactHandler
in a binder: https://github.com/ddossot/NxBRE/blob/master/NxBRE3/Rulefiles/fraudcontrol.ruleml.ccb
Thanks David. I knew that I can do it from binder, but can I do that from RuleML(i.e.rulebase as a result of implication)?
No, you can't.
One of the design decision around the inference engine is that it deals with facts only and not with any kind of object, this to keep a clear separation between the application internals and the data the engine infers upon.
One common issue this approach avoids is rules having to change because a developer refactored an object and unconsciously broke them. Since rules execute out of band, this type of errors happen easily.
Is it possible to change property value or add new properties to business objects from RuleBase (as a part of Implication result)?
If yes, please provide sample code to achieve the same