Replies: 3 comments 2 replies
-
Interested on this subject, too. Did you manage to find a solution to this? |
Beta Was this translation helpful? Give feedback.
-
To close the loop on this, it's not possible to access previous value of a fact. The reason for this is that it's actually pretty hard to do in a general case. For example, imagine that you insert a fact as a mutable object, then update the state of that object and update it in the rules engine. The before and after are actually the same object in memory, so they would be identical. To support this type of thing, the engine would have to somehow clone the fact. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your extensive reply, I understand your considerations. For now, I have resolved it with a status property on a second object. Not ideal, but it will do. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm new to NRules so bear with me, but I'm somehow missing how to access the previous value of an attribute. Say I want to define a rule that only should fire if Status specifically has changed from "Processing" to "Done".
Beta Was this translation helpful? Give feedback.
All reactions