Skip to main content

Getting Started

Each business rule in InterSystems IRIS is part of a rule set. In turn, each rule set is part of a larger rule definition. Sometimes, the terms rule and rule definition are used interchangeably, but each individual rule is ultimately grouped under a rule definition.

Rule definitions, rules sets, and rules are edited using the Rule Editor, which is accessed in the Management Portal by navigating to Interoperability > Build > Business Rules.

You can open existing rules in the Rule Editor by navigating to Interoperability > List > Business Rules.

Important:

The Rule Editor includes two web applications: /ui/interop/rule-editor and /api/interop-editors. The /api/interop-editors/ web application can be configured to use the same authentication methods as the Management Portal. If an alternative authentication method is not configured for the web application, users will need to re-authenticate as an InterSystems IRIS user upon opening the Rule Editor. The /ui/interop/rule-editor web application should remain unauthenticated.

Using the Old Zen Rule Editor

The Zen based Rule Editor has been replaced with a new Rule Editor. The new Rule Editor maintains the same functionality, but with an updated user interface.

The old Rule Editor is still accessible from the new Rule Editor. To access it, open the new Rule Editor, click on the menu in the upper right (identified by the username of the current user and a profile icon), then click Open in Zen Rule Editor.

You can also set the old Rule Editor to be used as the default editor. To do this:

  1. In the Management Portal, navigate to System Administration > Security > Applications > Web Applications.

  2. Select the /ui/interop/rule-editor web application.

  3. Clear the Enable Application checkbox.

  4. Click Save.

Disabling this web application will cause the Management Portal link to open the old Rule Editor. If you disable the /ui/interop/rule-editor web application, in order to access the new Rule Editor, you will have to re-enable the application.

About Rule Definitions

Individual business rules are grouped under a rule definition, which is built and edited using the Rule Editor. A rule definition includes the following settings:

Package

Package for the rule definition class.

Name

Name of the rule definition class.

Description

User-specified description of the rule definition and its purpose.

Rule Type

Type of rule definition, which determines valid actions when defining rules that belong to the rule definition.

Context Class

Class that determines which object properties you can modify when you edit a rule. For general business rules, the context class is generated from the business process class associated with the BPL process and ends in .Context. For routing rules that are not associated with a BPL process, the context class is usually the business process class used by the routing engine.

When creating the rule definition, you can use the Filters options to shrink the list of classes that appears in the Context Class drop-down list.

Production Name

(Optional) For routing rules, provides the name of the production where the rule will be used so the Rule Editor can offer predefined options when editing the rule. For example, if you specify a production and then modify a constraint, the configuration items in the production appear as options for the Source field of the constraint.

The routing rule is not automatically used in the production unless you specify the rule when you configure the production.

Exporting and Importing Rules

A rule definition, including its rule sets and rules, can be exported by navigating to Interoperability > List > Business Rules, and selecting Export. You can import a previously exported rule definition using the Import option.

Alternatively, you can also export and import rule classes from the System Explorer > Globals page of the Management Portal or via your IDEOpens in a new tab.

About Rule Sets

When you create a new rule definition, a new rule set is created automatically. To define the rule set name and effective date range, or to create new rules sets, select the editing pencil icon next to the rule set name.

In general, there are two types of rule sets:

  • General business rule sets—A list of rules that are evaluated sequentially until one of them is found to be true. The rule that is found to be true determines the next action of the business process that invoked the rule. If none of the rules are true, the rule set returns a default value. You invoke this type of rule set using the BPL <rule> element.

  • Routing rule sets—A rule set for use in message routing productions. Based on the types and contents of incoming messages (which you specify as constraints), the routing rule set determines the correct destination for each message and how to transform the message contents prior to transmission. You use a routing engine business process to invoke this type of rule set.

All rule sets have two properties:

  • Rule Set Name—Identifier for the rule set.

  • Effective Range—Defines the time during which the rule set is effective, that is, when its rules will be executed.

Typically, a rule definition includes only one rule set that is always in effect. However, a rule definition can include multiple rule sets as long as they are in effect at different times. Each time a business process invokes a rule, one and only one rule set is executed.

FeedbackOpens in a new tab