InRule Help Reference


Entity Rule Sets

Previous  Next

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.

 

Name

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.

Parameters

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 run-time using various Activate Rule Set actions.

Rules

Specifies the list of Rules and Actions that will be executed for this Rule Set.