Using the Rule instruction to support a custom rule type
Rule instruction is deprecated. Instead, call the evaluateRule
activity (for example, Call Rule-MyCo-Loan.evaluateRule)
.
Use the Rule instruction to cause the current activity to find another activity named evaluateRule that implements a custom rule type. When this instruction executes, control transfers to that activity.
For many rule types, a rule execution — excluding those rule types assembled directly as Java — is implemented as an activity call. That is, the instruction
Rule Rule-MyCo-Loan
is exactly equivalent internally to
>Call Rule-MyCo-Loan.evaluateRule
where (by convention) the first parameter of evaluateRule is a handle to the rule to be evaluated.
You can pass parameters to the target activity, or you can share the current activity parameter page with the target activity.
Optionally, you can
identify pages that the called activity uses indirectly, through the prompt mode on the
Pages & Classes tab of the calling activity. Each page
identified as a prompt page is treated as an additional parameter to the called activity,
and appears in the parameter list for the Rule instruction. The value supplied for the
prompt page must not be blank and must evaluate to a clipboard page name (top-level or
embedded). The keywords primary
, top
, and
parent
are not valid with prompt pages; the param
keyword is valid.
Parameters
The Rule instruction requires the name of the target class and parameters for the evaluateRule activity.
Parameter | Description |
---|---|
Activity (entered in the Method field) | Type Rule followed by one space and the name (second key
part) of the class which implements the new rule type, and contains the
evaluateRule activity to be run. |
Pass current parameter page? | Select if you want the current activity's parameter page to be passed to
(shared with) the activity, which can alter its contents in any way. Clear this check box to use the array that appears below the check box to pass parameters to the branch activity, on its own parameter page. If you select this box, make sure that input parameter values needed by the target activity are present on the parameter page before the Rule instruction. |
Value | Complete values for parameters of the activity, if you did not check the
Pass current parameter page? box. Enter literal or property reference values for each parameter that you want to have a value. The system creates a parameter page for the target activity that is unrelated to the calling activity's parameter page. |
Results
At runtime, the system uses rule resolution to locate the activity identified. It transfers control to the activity and passes the parameters supplied. The step page of this step becomes the primary page of the target activity.
Checking the method status
This method updates the pxMethodStatus property only if it fails. See How to test method results using a transition.