Chaining Decision Tables in a Ruleflow Using a Parameter
|
PREVIOUS
NEXT
|
You can chain decision tables in a ruleflow by using a parameter added to the rule package. You need to start with a repository that contains functions and two decision tables. Then perform the following procedure:
-
Add a parameter to the rule package. In the Project Explorer right-click the package and click Add Parameter on the shortcut menu.
-
Name the parameter and set its
type
in the Property Sheet.
- You now edit the decision tables to incorporate the parameter as a chaining mechanism.
-
In the decision table that will come first in the ruleflow, add an action column and edit the new column to set the Action to
set <attribute> to <value>
, as shown in Figure 12.77.
-
Figure 12.77 Selecting `set <attribute> to <value>'
-
In the
<select an attribute>
list, select the parameter you just created and click OK. The action will now set your parameter to the value you enter in the action cell.
-
In the decision table that will come second in the ruleflow, add a condition column and edit the new column to set the Test condition to the new parameter and the operator to the desired operator that you want to use for the test (see Figure 12.78). Click OK.
-
Figure 12.78 Selecting a Test Condition
-
Finally, to chain the decision tables, create two rule tasks and deploy the decision tables in them.
Tip |
The decision table setting the parameter should come first in the ruleflow, then the decision table featuring the condition on the parameter. Make sure each rule task uses the sequential algorithm and literal ordering. |
See Also
Ruleset Parameters | Creating a Ruleflow
|