Back Forward More about Decision Trees
 

  1. About 
  2. New 
  3. Decision 
  4. Input 
  5. Results 
  6. Parameters 
  7. Pages & Classes 
  1. Test Cases 
  2. History 
  3. More... 

Overriding the property

Decision tree evaluation may be based on a known property identified on the Input tab, or on a parameter supplied in the Property-Map-DecisionTree method, or both.

If you leave the Property field blank, evaluation is always based on the parameter. If a parameter is supplied, the parameter value is used even when the Property field is not blank.

Standard functions

As an alternative to the Property-Map-DecisionTree method, you can use these standard functions to evaluate a decision tree:

@(Pega-RULES:DecisionTree).ObtainValue(tools, myStepPage, decisiontree, inputproperty)

@(Pega-RULES:DecisionTree).ObtainValue(tools, myStepPage, decisiontree, inputproperty, bAllowMissingProperties)

Decision tree rules can also be evaluated as part of a collection rule (Rule-Declare-Collection rule type). C-2547

PDN note

See PDN article How to evaluate a decision tree and handle errors for an example.

Uploading a text file to start

You can create a decision tree by importing (or "harvesting) a specially formatted text file. This capability lets others not familiar with PRPC create decision trees. See About the Rule from File wizard.

Performance

TipPRPC does not limit the number of nodes in a decision tree. However, as a best practice to avoid slow performance when updating the form and also avoid the Java 64KB code maximum, limit your decision trees to no more than 300 to 500 rows. MARTT 6/21/07 clinic

Java code display

When you save a decision tree, the system converts the rule to Java source code. As a learning or debugging aid, you can review this Java code.

C-1665Click the Show Java toolbar button (Show Java) to see the system-generated Java code that implements the rule. 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 is executed at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's RuleSet list.

Special processing with Declare Expression calls

When a Declare Expression rule has Result of decision tree for the Set Property To field, special processing occurs at runtime when a property referenced in the decision table is not present on the clipboard. Ordinarily such decision rules fail with an error message; in this case the Otherwise value is returned instead. For details, see PDN article Troubleshooting: Declarative Expression does not execute when a decision rule provides no return value.B-18749

Not declarative

Despite the class name, the Rule-Declare-DecisionTable rule type does not produce forward or backward chaining. Technically, it is not a declarative rule type.

Definitions decision shape
Related topics Property-Map-DecisionTree method
Debugging with the Tracer

UpAbout Decision Trees