Regarding inclusion of data processing as part of the rule #223
Replies: 1 comment 1 reply
-
The answer will depend on the nature of your ruleset and your own personally preference. For me personally, I would do any calculations requiring a lot of processing outside fo the rule engine and limit any heavy processing to the You should keep in mind that if you calculate D1 inside of the when condition, the engine may end up having to calculate the value more than once if you reference D1 in multiple places. In most cases the engine will cache the results of a calculation, but depending on your exact rules and how you are using them you could still end up calculating the value of an expression more times than necessary. For instance, if you run the engine multiple times or through multiple cycles, it may have to re-calculate D1, in which case it is better to calculate D1 in your own code before calling the engine. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I have a clarification that when we verify a data against a particular value as part of a rule, let us say
When
D1 == 10
Then
Do something
Assume that to derive the final value for D1 there is a lot processing is done. Should this be included as part of the
When
OR should this be computed outside When
Please clarify
Thanks
Nagaraj
Beta Was this translation helpful? Give feedback.
All reactions