There are ways, but its always a compromise. To work directly with pojos you need to retract the value before modification and then assert it after modification. We can possibly instrument the drl to do an auto retract and assert on using a setter, but it means you cannot modify a fact external, without manually retracting and asserting it. This would also deprecate modify() in the drl. Over time we'll try and provide several ways to slice and dice this, as I don't think there is one clear answer for everyone.

Mark
Michael Suzio wrote:
Hmm... shadow facts are going to mess up quite a bit of my code, then.  I have several classes which subclass a base class with several final methods (to ensure that the contract of these classes cannot accidently be broken -- so, we have a few final methods in an abstract base class and several methods subclasses defined to customize the behaviors).

Is there a way to get around this?  I'm reluctant to muck up my POJO logic, but I do understand the advantages of shadow facts.

  --- Michael

_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users