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:
- pxHighestScore — Highest score among the
matching cases
- pxRuleUsed — Key of the case match rule
used
- pxTotalDiscarded — Number of cases that were
discarded because their score was lower than the cutoff score (not
counting those eliminated by When conditions in the Retrieval tab)
- pxResultCount — The number of matching cases
found
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:
- 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.)
- The SeekFirstCase or SeekCases activity
calls the case match rule you specify.
- 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.
- 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.
- 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.
- 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.
- 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. WRONG: REMOVED ?It then sorts the cases in order, with
the highest scoring case as the top.
- The results are placed in the pxResults property of a
page of class Code-Pega-List in the clipboard.
- You can use the results in your application.
Don'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:
- Have gold or platinum status
- Are a participant in one or more open work objects
- Are a participant in one or more recently resolved work
objects
- Have a recent address change and moved into that ZIP code
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.
C-1665Click the Show Java toolbar button () 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.
About Case Match rules