Skip to main content

Conditional execution

Business processes rarely follow a simple, straightforward path to resolution, which is why it is incumbent for the Pega Business Architect to understand, and plan for, any variations and exceptions along the way to resolution.  For example, the path of a Case might depend on the evaluation of a condition, such as the value of a credit score to determine the interest rate on a loan, or a simple decision by the user, such as enrolling in a frequent-shopper program.

Having the flexibility to follow alternate paths in a workflow is the cornerstone of business process management (BPM). As a Pega Business Architect (BA), the business process you participate in transforming must take into account the different paths a Case takes based on the the evaluation of one or several conditions.

In this topic, you examine Pega's feature for conditional execution, the When Condition Rule.

The When Condition Rule

A When Condition Rule evaluates a Boolean logic statement that involves comparisons among field values, to return true or false. When Condition Rules can be configured to evaluate a single field or several fields. For example, a When Condition Rule returns True if a job applicant has more than ten years of experience and is fluent in French.

Each When Condition Rule consists of three elements: 

  • An input value to compare at run time, for example, the value of a field that a user completes.
  • A comparator, for example is greater than or is equal to.
  • A value to compare against the input value from the condition. This value can be a constant that you enter or a reference to another field.

In the following image, click the + icons to learn more about configuring When Condition Rules in Pega Platform™:

 

Implementing When Condition Rules

When Condition Rules can be implemented in several places throughout an application. In general, When Condition Rules are used to determine:

  • When a Stage is skipped
  • When a Process is skipped
  • Which Steps in a Process are executed

A When Condition Rule can be created directly in App Studio for use in the context of a single context within a Case Type. In this instance, you would create a custom When Condition Rule to control Case behavior at runtime.

Alternately, When Condition Rules can be created in Dev Studio by System Architects, allowing the When Condition Rule to be implemented in multiple places in a single Case Type or reused across multiple Case Types associated with an Application. To implement a When Condition Rule that has been configured in Dev Studio, you would select an Existing condition and then choose the When Condition Rule by name. 

Creating and grouping When Rules throughout your application allows you to create sophisticated application logic that supports even the most complex of business workflows.

Note: For more information about configuring When Condition Rules, see When Condition Rules.

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice