More about Map Value rules |
Map value rules can be updated as needed to reflect changing business conditions, without the need to ask a skilled developer to modify complex activities or other rules.
If you have in advance an Excel spreadsheet (XLS file) that contains useful starting information for a map value rule, you can incorporate (or "harvest") the XLS file and the information it contains directly into the new rule. See About the Rule from File wizard.
Both rows and columns contain a Type field (set on the Headers tab). The system makes comparisons according to the data type you recorded on the Headers tab, converting both the input and the conditions to the specified data type.
At runtime, the system evaluates row conditions first from top to bottom, until one is found to be true. It then evaluates column conditions for that row, left to right, until one is found to be true. It returns the value computed from that matrix cell.
You can reference map value rules in five places:
Call
keyword in a cell.If a map value rule is evaluated through a decision shape on a flow, or one of the two methods noted above, the input value or values may be literal constants or may be property references, recorded in the flow or in the method parameters.
However, if a map value rule is evaluated by a Call from a cell in another map value rule, the evaluation always uses the Input Property on the Header tab. Nothing in the Call can override this source.
When a Declare Expression rule has Result of map
value
for the Set Property To field,
special processing occurs at runtime when a property referenced
in the decision table rule is not present on the clipboard.
Ordinarily such decision rules fail with an error message; in
this case the Default value is returned
instead. For details, see Pega Developer Network article
PRKB-20805 Troubleshooting:
declarative expression does not execute when a decision rule
provides no return value.
Process Commander does not limit the number of nodes in a map value rule. However, as a best practice to avoid slow performance when updating the form and also avoid the Java 64KB code maximum, limit your decision tree rules to no more than 300 to 500 rows.
When you save a map value rule, the system converts the rule to Java source code. As a learning or debugging aid, you can review this Java code.
Click the Show Java toolbar button () to see the system-generated Java code that implements the map value logic. The window presents a read-only preview of the Java that implements this rule instance. This Java code is not identical to the Java that executes at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's RuleSet list.
Through directed inheritance, the immediate parent of the Rule-Obj-MapValue class is the Rule-Declare- class. However, despite the class structure, this rule type does not produce forward or backward chaining. Technically, it is not a declarative rule type.
decision task | |
Property-Map-Value method
Property-Map-Value-Pair method |
|
Atlas — Standard Map View rules |