Creating a variable set

To define a ruleset variable, you first need to create a variable set in which to group your ruleset variables.

About this task

Ruleset variables are variables that you can use in all the business rules of the ruleset. You can also use ruleset variables to pass data between tasks in a ruleflow. Ruleset variables are accessible from business rules only if you verbalize them.

Procedure

To create a variable set:

  1. Select your rule project.
  2. On the File menu, click New  > Variable Set.

    The New Variable Set wizard opens.

  3. If you want to select a rule package, click Browse next to the Package field.
  4. In the Name field, type the name of your variable set.
  5. Click Finish.

    The new variable set is shown in the Rule Explorer view and the Variable Set Editor opens.

    Tip: When using variables, they must be listed in the order of dependencies. For example:
    borrower b = new Borrower() 

    must be followed by String name = b.name , as b is otherwise unknown.

Results

You can now define your ruleset variables.