5.25 Globals Tab and Edit Global Name Dialog

Use to create a global variable for use with a rule or a ruleset. An Oracle Business Rules global is similar to a public static variable in Java. You can specify that a global is a constant or modifiable.

To add a global, click Create... this creates a global in the Globals table and shows the Edit Global Name dialog. Select a global in the Globals table and click Edit... to edit a global. Select a global and click Delete to delete a global. Click Refresh to refresh the global table.

Element Description

Name

.Specifies the name for the global.

Description

Enter a description for the global.

Type

Shows the global type. Use the dropdown list to select a type. The value specified must match the type if you want the global to validate without warnings or errors.

Value Set

Specifies the value set associated with the global.

Value

Use the text area to enter the value for the global. Click the Expression Builder icon to enter a global using the expression builder.

Constant

Specifies if the global is a constant. Selecting Constant specifies that the global is a constant. A constant is a string or numeric literal, a final whose value is a constant, or a simple expression involving constants and +, -, *, and /. Selecting Constant for a global optional. Note that values, value range endpoints, and ruleset filter values are always constant. This option is not shown in the Globals table. This option is shown in the Edit Global Name Dialog.

Selecting Constant has three effects:

  • You do not have to surround string literals with double quotes.

  • Only constants appear in the expression value choice list.

  • The expression value must be a constant to be valid.

Final

Specifies if the global is modifiable.

  • When you select Final the global is initialized once at runtime and cannot be changed. Also, you can use the global in a test in a rule (nonfinal globals cannot be used in a test in a rule).

  • When you deselect Final, this specifies that the global is modifiable, for instance, in an assign action.

Related Topics

Working with Globals in Designing Business Rules with Oracle Business Process Management.