When a rule application schema is bound to a .NET assembly and the instance methods from the bound classes are being called from within rules, there is a setting available that can improve performance in certain situations. By default, all bound fields must be refreshed in order to ensure the dependency network is aware of the changes that occurred within the method. Minimizing the fields that are refreshed after the call can reduce overall processing time, especially for large bound schemas or when instance methods are called often. The following directions will explain the process of telling the rules engine to only update specific fields specified by the user.
By double-clicking the method name in the .NET assembly schema import pane, a "RuleWrite Information" dialog appears which allows the user to control whether or not the method call action in InRule needs to refresh the working memory state with the updated object memory state. The setting "Enable full refresh of all bound objects "(which is enabled by default) will refresh the entire object state to working memory after each method invocation. This setting may be unchecked when it is known that the method will not result in underlying state changes that need to be refreshed. In situations where the refresh is warranted, but performance is still of utmost consideration, individual fields can be designated for refresh rather than the entire object. Within the "RuleWrite Information" dialog, with "Enable full refresh of all bound objects" unchecked, one can explicitly list the fields that are to be refreshed when the method is called. Checking the "Enable Recursion" checkbox for an entity field will recursively refresh all of the entity's children.
These optimizations are also obtainable by decorating your classes and/or methods with "InRuleImport*" attributes.
The Refresh Fields Action is also available in rule authoring and can be used to selectively refresh field values to working memory.
Comments
0 comments
Please sign in to leave a comment.