Skip to main content
Previous sectionNext section

Introduction to the Rule Editor

This chapter introduces the Rule Editor in the Management Portal.

Business Rule List

The Interoperability > List > Business Rules (or Business Rule List) page displays a list of the business rule classes defined in the current interoperability-enabled namespace.

From the Business Rule List page, you can select a business rule definition and click the following buttons to perform actions on it:

  • Open — Change or view the rule definition using the Business Rule Editor.

  • Delete — Permanently delete the rule definition class.

  • Export — Export the selected rule class as an XML file.

  • Import — Import an XML file into a rule class.

Note:

You can export and import rule classes from the System Explorer > Globals page of the Management Portal or the Tools menu in Studio as well.

Business Rule Editor

The Interoperability > Build > Business Rules (or Rule Editor) page enables you to create and edit business rule class definitions for all types of business rules. When you open the page for the first time in a namespace, the work area is empty. When you reopen the page, the last rule that you viewed in the namespace appears.

At the top of the page, you can see the name of the rule as well as the following buttons:

  • New — Launch the Business Rule Wizard to create a new business rule definition.

  • Open — Launch the Finder Dialog to choose an existing business rule definition to edit.

  • Save — Save and compile any changes you have made to the rule definition.

  • Save As — Save your changes to an existing rule definition as a new business rule class.

  • Contract — Collapse all the rules in the open rule set so that only the identifier, name, and disabled field appear for each rule. You can use this option to save vertical space or declutter your screen as you work.

  • Expand — Expand all the rules in the open rule set.

Additionally, the following elements appear:

  • Open new windows check box — Indicates whether rules that you navigate to using the New and Open buttons appear in a new window or browser tab.

  • Zoom drop-down list — Increase or decrease the scale of the elements on the page.

After you create a rule definition, you can manage the definition on the following tabs:

  • general

  • ruleSet

  • test

On both the general and ruleSet tabs, the Rule Assistant and Rule Editor page icons facilitate the creation of rule sets.

General Tab

The general tab on the Rule Editor page displays the following information about a rule definition:

Description

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

Rule Type

Type of rule definition, which determines valid actions in the ruleSet tab.

Rule Assist Class

Rule assist class associated with the rule. Each type of rule definition is associated with one rule assist class, which specifies constraints for the rule definition and controls the functioning of the Rule Assistant pane.

The following table lists the supported rule types and corresponding rule assist classes:

Rule Type Rule Assist Class
General Business Rule Ens.Rule.GeneralBusinessRuleAssist
General Message Routing Rule EnsLib.MsgRouter.RuleAssist
Virtual Document Message Routing Rule EnsLib.MsgRouter.VDocRuleAssist
Segmented Virtual Document Message Routing Rule EnsLib.EDI.MsgRouter.SegmentedRuleAssist
HL7 Message Routing Rule (for InterSystems IRIS for Health) EnsLib.HL7.MsgRouter.RoutingEngine
Extended Business Rule Ens.Rule.ExtensionAssist
Creation Rule for Managed Alerts Ens.Alerting.Rule.CreateAlertAssist
Overdue Rule for Managed Alerts Ens.Alerting.Rule.OverdueAlertAssist
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.

Rule Alias

Deprecated. Do not use.

Temporary Variables

User-specified temporary variables, which you can use in the rule definition. The variables must be separated by commas, for example:

FreeShippingValue,ShipMethod,PremierMember
Copy code to clipboard

You can reference a temporary variable in a rule definition by preceding the variable name with the @ (at sign) character, for example, @FreeShippingValue. You cannot use temporary variables outside the rule definition. To pass information to a transformation, you can instead use the RuleUserData property. For more information, see “Selecting the Transformation and Target of a Send Action” for details.

Production Name

(Optional) Name of the production that includes the configuration items to display when you edit a routing rule definition. For example, if you specify a production and then modify a constraint on the ruleSet tab, the configuration items in the production appear as options for the Source field of the constraint:

Options for Source field in Routing Rule Constraint Editor limited to configuration items from the specified production

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

Rule Set List

List of rule sets associated with the rule definition. Recall that when a business process invokes a rule definition, one and only one rule set in the definition is executed. For each rule set, the following information appears:

  • Rule Set Name

  • Beginning Date and Time

  • Ending Date and Time

For a description of these properties, see Creating and Editing Rule Sets.

Rule Set Tabs

You edit the rule sets that you add to the rule definition in the ruleSet tab. Each rule set corresponds to a separate tab.

The green square in the top right corner of the ruleSet tab enables you to hide and show property names. As you become familiar with the Rule Editor page, you may find it unnecessary to view these.

The tab also provides some in-progress validation. For example, if you specify an invalid value for a property, a small red circle containing an exclamation point appears at the top right corner of the property node. You can double-click the warning icon to display an error message.

For information about adding rule sets, see Creating and Editing Rule Sets.

Test Tab

The test tab of the Rule Editor page enables you to test the rules that you create without using a production. For example, see Debugging Routing Rules.

Rule Assistant

The Rule Assistant pane provides contextual help as you edit a rule definition. For example, the pane describes the items that you select and provides a list of supported actions. The supported actions are determined by the Rule Assist Class associated with the rule definition. The Rule Assistant pane appears on the right side of the Rule Editor page. You can collapse it by clicking the double-arrow icon.

Rule Editor Icons

On both the general and ruleSet tabs, the following icons enable you to edit the rule definition and the rule sets, rules, and clauses in the rule definition:

Icon Action
Up icon
Move the selected item up.
Down icon
Move the selected item down.
Add icon
Add an item to the rule set.
Delete icon
Delete the selected item.
Undo icon
Undo your last change.
Redo icon
Redo the last change that you undid.
Function icon
Open the editor associated with the selected action.

When a given action is not supported for the selected item, the corresponding icon is grayed out.

Feedback