Configuring ruleflow properties

You configure the properties of ruleflow elements in the Properties view of each element.

To display the Properties view below the editor, you must select a ruleflow element in the diagram. The Properties view opens, with a list of tabs where you set the properties for your ruleflow elements. When you add a node or a task to your ruleflow, you must set their properties.

To set the properties for the whole ruleflow, select an empty area in the diagram to open the Properties view.

Some properties, or tabs, are common to all ruleflow elements, and are described in the section Common properties for ruleflow elements.. Specific properties for each ruleflow element are detailed in the following sections:

Common properties for ruleflow elements

Some properties, or tabs, can be found in the Properties view for ruleflows, start nodes, end nodes, rule tasks, action tasks, subflows, branches, fork nodes, join nodes, and transitions.

Attention: A start node does not contain the Final action tab, and an end node does not contain the Initial action tab.
Table 1. Common properties in the tab corresponding to the ruleflow element name
Property Purpose

ID

An ID is the technical name for a ruleflow element. All ruleflow elements have an ID that identifies them in an XML schema.

In Rule Designer Java™ code, the ID of a ruleflow element generates the IRL code that runs at run time. To view this code, click the IRL tab under the Ruleflow Editor.

If you duplicate a ruleflow element in a ruleflow, it has a unique ID.

IDs are not locale-dependent. When you specify an ID, it is good practice to use only characters (a-z, A-Z) and numbers (0-9).

Label

You can specify a label for the ruleflow element that is shown in the Diagram page. A label has no impact on the IRL that is generated.

Labels are locale-dependent. You can specify different labels in a new locale and recover the labels in the original locale for elements that do not change. For example, if you change the ID of a ruleflow element, you lose the labels defined for this element in all other locales except the original.

When you specify a label, it is good practice to use only characters (a-z, A-Z) and numbers (0-9).

Table 2. Initial action tab
Property Purpose

Initial action

The action that launches before the task starts.

Select Use BAL for action to define the action in BAL, or enter IRL code.

Table 3. Final action tab
Property Purpose

Final action

The action that launches after the task ends.

Select Use BAL for action to define the action in BAL, or enter IRL code.

Table 4. Documentation tab
Property Purpose

Documentation

This property displays optional information about the start node. Use this property to provide notes, comments, and other useful information that open as a tooltip.

Ruleflow properties

Note: To show the properties, ensure that you click in an empty area of the Diagram page and do not select a ruleflow node.
Table 5. Properties tab
Property Purpose

locale

This property indicates the language setting of the ruleflow. The default setting is en_US. You cannot edit this field.

name

The name of the ruleflow.

tags

Use this property to view and edit the values used for the import tags. Click a field and Open dialog to open the Values for Tags dialog.

Important:

Tags are supported for compatibility purposes. Leave the tags empty.

Table 6. Category Filter tab
Property Purpose

Category Filter

Use this property to edit the rule category filter for the selected ruleflow.

Click Edit to open the Category Filter dialog.

Table 7. Imports tab
Property Purpose

View the imports used for BOM classes

This property displays the imports for BOM classes. You edit this list to manually add or delete imports.

The imported BOM or Java classes required by the IRL code in a ruleflow can be viewed and edited in the ruleflow Properties view. The list is populated automatically when you type in IRL code with Content Assist. Edit the list to remove unused imports, that is, the imports that were not removed automatically, or manually add classes if you have entered IRL code without Content Assist.

If a ruleflow in a rule package contains IRL code that references variables of the default package, you must import these variables with the use <variable> declaration.

Rule task properties

Table 8. Rule Task tab
Property Purpose

Algorithm

Use this section to specify the processing algorithm for the rule task:

  • RetePlus
  • Sequential
  • Fastpath

Exit Criteria

Use this section to specify whether all the rules, one rule, or one rule instance run:

  • None: The default setting that all rules are run until conditions terminate execution. The rules are run in a particular order determined by the selected ordering.
  • Rule: Execution terminates after the chosen rule is run, according to the selected algorithm.
  • RuleInstance: A single instance of one rule is run. This rule is determined by the selected ordering.

Ordering

Use this section to specify the order of rule execution in a rule task as follows:

  • Default: The algorithm determines the execution order.
  • Literal: The order of the rules in the rule task determines the order of rule execution
  • Priority: the rules are run following a static priority in decreasing order.

Advanced properties

The following table summarizes some features you can set by using advanced properties.

Table 8. Some features set by advanced properties
Advanced property Description
firinglimit = n; This property sets a specific number of rule executions. To use an execution limit, set exitCriteria to none and in Advanced Properties add firing = allrules|rule and firinglimit = n, n>0. For n = 0 use the Exit Criteria options.
Table 10. Rule Selection tab
Property Purpose

List the rules and rule packages in the rule task

Use this property to list the rules and rule packages that are considered when the rule task is run. To edit this list and reorder it, use the Up and Down buttons.

Dynamic BAL

Use this property to specify runtime rule selection by using a dynamic statement BAL. The property runs each time you call the task.

Static BAL

Use this property to specify runtime rule selection by using static statement in BAL. The property runs the first time that you call the task.

IRL

Use this property to specify runtime rule selection by using IRL.

Define a rule filter in IRL with "body = ...."

Action task properties

Table 11. Action Task tab
Property Purpose

Rule Execution

You can select the algorithm, exit criteria, and ordering for running the rule task.

Table 12. Rule Selection tab
Property Purpose

Edit

You list the rules and rule package that are used in the rule task.

Choose runtime rule selection

You select the runtime language for the rule: Dynamic BAL, Static BAL, or IRL.

Subflow properties

Table 13. Subflow Task tab
Property Purpose

Select a ruleflow

Click Edit to open the Select a ruleflow dialog.

Transition properties

Table 14. Condition tab
Property Purpose

Conditions

In the Conditions tab, you must first select the rule language you use to write the transition: BAL or IRL. In the rule language you chose, you write an expression whose return value must be true or false, for example:

  • BAL:
    'the loan' is approved
  • IRL:
    (bicycle.speed > 10) && (bicycle.speed <= 30) 

If you have several transitions originating from a task, there must be one (and only one) transition with no conditions, which is considered as the default transition, also called else transition. By default, if you do not specify a label, it is displayed as "else".

With several transitions, you must make sure that transitions do not overlap, which means that no more than one transition condition must return "true". Typically, you might want to use two transitions, to choose between one ruleflow path with a specific condition and one default else transition for the remaining cases.

If there is only one transition that links two tasks, you must not specify any conditions.