Table of Contents

Article

How to direct a percentage of work to a specified processing path

Summary

In Pega 7, you can use a condition in a Fork connector to direct a percentage of total throughput — based on random selection — along a specific processing path. The system makes the decision by comparing the percentage setting you define for each connector with a randomly generated number; a case's properties or transaction data are not factors in the decision.

This article describes how to take advantage of Fork connector percentage conditions in a typical implementation. 

Example

Management wants to re-configure an expense report approval process so a small sampling (about 5%) of the total are audited before they are finalized and paid. The process must be automated to enforce the quantity and randomness of the sample.

Currently, a manager manually directs cases to auditing at their discretion by invoking a flow action on the user form. Although the flow action has a Likelihood setting of 5%, the system cannot control whether the manager selected the cases at random, or confirm the actual percentage.

Here is the diagram of the current process:

f.png

Add a Fork shape that will conditionalize the process so the system diverts 5% of reports to the auditing assignment before the reports are approved for payment. Using fork connectors that rely on decision logic such as when conditions, map values, or decision trees are not applicable.

Adding the percentage connectors

To add the connectors:

  1. Open the process in the Process Outline view.
  2. Disconnect the "Approve" and "Audit" connectors from the "Manager Approval" Assignment shape.
    Currently, the Approve connector has a likelihood of 85% and the Audit connector likelihood is 5% for a combined likelihood of 90% (the Reject likelihood is 10%).
    e.png
  3. Select the "Select a Decision" shape from the Shape palette.
    16.png
  4. Place the Select a Decision shape to the right of the assignment.
    d.png
  5. Select the Decision shape and open its properties panel.
  6. Enter Finalize or Audit in the Step Name field.
  7. Select Fork in the Type field.
     01b.png
  8. Click OK to close the panel.
  9. Reattach the connectors to the Decision shape. By default, they employ a Result condition; [Status] labels appear on the connectors.
    c.png
  10. Select the Approve (top) connector and open its Properties panel.
    • Select Percentage in the Condition type field
    • Enter 95 in the Percentage field
      03.png
  11. Click OK to close the dialog.
  12. Select the Audit connector (bottom) connector and open its Properties panel.
    • Select Percentage in the Condition type field
    • Enter 5 in the Percentage field
  13. Click OK to close the dialog.
    The connectors use the percentage values as the default connector labels as shown here:
    b.png
  14. Add an Approve flow action connector between the Manager Approval assignment and the Decision shape. Assign a likelihood of 90% to the flow action.
    13.png
    When finished, the process looks like this:
    a.png
  15. Save the flow.

As a result of your reconfiguration, the probability is that of 100 approved reports, 5% of them will be audited, and the rest will go directly to the Finalize utility.

Behind the scenes 

When you specify percentages, the system creates numerically-sequential "buckets" that are based on increments of 1. 

  • For instance, if you specify percentages of 80% and 20%, the system creates two buckets; one for 1 to 80, and another for 81 to 100.
  • If the percentages are 50% each, the buckets are 1 through 50, and 51 through 100. 
  • In designs where there are For 10%/10%/80%, the system creates three buckets - 1 through 80, 81 through 90, and 91 through 100.

During processing, when a case reaches the fork, the system randomly generates a number of between 1 and 100, evaluates it against the conditions, and advances the flow to the appropriate action.

What's the difference between likelihood percentages and Percentage conditions?

In general, likelihood percentages available on some connector condition properties panels are informational labels based on historical or projected throughput patterns, and are commonly used for estimating resource requirements. In contrast, Percentage fork connector conditions actively control the case's direction when the system performs the decision at the Fork shape.

Things to remember

When using fork connector Percentage conditions, keep in mind:

  • You can only use them in combination with other Percentage conditions or an Else condition.
  • The sum of percentages cannot be greater than 100.
  • If the sum is less than 100, always include a connector with an Else condition. Otherwise, the flow might become stuck.

Tags:

Published February 28, 2014 — Updated October 7, 2014


100% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.