Back Forward More about Case Match rules

About Case Match rules

Results

A case match rule returns the results to the pxResults property of a Code-Pega-List page on the clipboard. The results can be examined and then displayed, perhaps in a report, or used in an executing application. The results page also includes the following properties:

On each embedded page, the pxMatchScore property holds the score of the case.

Planning and developing a case match rule

Complete two basic steps to specify and use a case match rule.

First, write two activities that interact with the case match rule you create; a content activity to select cases, and a calling activity to evaluate the case match rule. Then complete the Case Match rule form, which references the content activity.

The high-level steps are:

  1. Write a calling activity that calls the standard activity SeekCases or SeekFirstCase, depending on which type of rule you want to use. (These activities are in @baseclass.)
  2. The SeekFirstCase or SeekCases activity calls the case match rule you specify.
  3. The case match rule references the Content Activity. You write this activity to select the cases you want to evaluate and score and retrieves the properties needed for the computation.
  4. If you specified When conditions on the Retrieval tab, the SeekCases or SeekFirstCase activity then carries out the filtering. For case match rules called with SeekFirstCase, surviving cases are next sorted by the properties listed on the Retrieval tab.
  5. The SeekCases or SeekFirstCase activity then evaluates each case according to the scoring formulas on the Evaluation tab, to obtain a score for each case.
  6. The SeekFirstCase activity returns the first case it finds that has a score equal to or higher than the cutoff score specified in on the Evaluation tab.
  7. The SeekCases activity returns all the cases with a score equal to or higher than the cut off score specified in the case match rule.
  8. The results are placed in the pxResults property of a page of class Code-Pega-List in the clipboard.
  9. You can use the results in your application.

NoteDon't forget to anticipate and handle in your application the possibility that no cases meet the retrieval criteria, or that none of the retrieved cases meet the cutoff score.

Example

A case match rule can combine multiple factors into a single numeric score. The full power of Process Commander expressions and functions can compute factors that add into the score. For example, when a customer (or other party) identifier isn't known but the ZIP code is available, a case match rule can retrieve all the customers in that ZIP code and score those who:

and so on.

Java code display

When you save a case match rule, the system converts the rule to pro forma Java source code. As a learning or debugging aid, you can review this Java code.

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

zzz About Case Match rules