Entity rule sets are the most commonly used of the three rule set types. The associated entity establishes the authoring and execution context for the rule set to operate against, essentially defining which fields are available to the rule set. One goal when authoring rules is to keep the logic in a rule set as atomic as possible without having to reach across contexts; an entity rule set lends itself to this approach as it defines a limited and relevant logical context for the rules. Entity rule sets are typically the recommended authoring model for new users.
Entity rule sets include the following features
- Access to both auto and explicit fire modes
- Rule execution in the context of the associated entity
- Access to related entities in the hierarchy (parent access is optional and set in the Entity definition)
- Most versatile – recommended for the majority of rule authoring
The below example shows a rule set "PaymentSummaryRules" authored in the context of the "Mortgage" entity. The rule set has access to all of the fields in the "Mortgage" entity as well as child entities and collections. For example, rules authored in the "Mortgage" entity context have access to the "LoanInfo" child entity (it's fields and children), "Payment Summary" child entity (it's fields and children), and the "Payments" collection.
Creating Entity Rule Sets
An entity rule set can be created from the navigation tree under the Rules folder or from the Entity Definition pane (Edit Rules for this Entity section). From the navigation tree, right click on the "Rules" folder and select "Insert -> Rule Set", which triggers the a popup window asking the user to select the context for the rule set.
Specifies the name of the Rule Set. This name is used when explicitly executing or activating the rule set from either an Execute Rule Set Action, Activate Rule Set Action, or from irSDK.
Available only in the explicit fire mode. Specifies decimal, Boolean, date, datetime, integer, text, and entity values to act as the inputs for the execution of the rule set. The "Auto Create" checkbox is enabled for entity parameters only. With "Auto Create" checked, an instance of the specified entity type is created automatically when the rule set is executed.
Note: Parameters are optional and not required for basic Rule Set execution.
Activated by Default
Designates whether or not this Rule Set will be considered in the initial rule dependency network during rule execution. Rule Sets CAN be re-activated during rule processing at runtime using various Activate Rule Set actions.
Specifies the list of Rules and Actions that will be executed for this Rule Set.
Please sign in to leave a comment.