More about When Condition rules
When condition rules help you build application logic so that you can deliver software that dynamically responds to changing business scenarios. When condition rules compare the value of one property reference against a constant, or against the value of another property reference. If you define more than one comparison, you can combine the results with AND, OR, and NOT operations to determine the final true/false outcome.
Conditions in activity steps
Each activity step can reference one or several When condition rules, as preconditions for a method, or transitions between the completed method and the next step.
As a precondition, a When condition rule determines whether the method in the activity step runs or not. Referenced in a transition, a When condition determines what activity processing runs next after the completion of the current activity step.
For more information, see Creating an activity and Configuring steps in an activity.
Standard function
To run a When condition rule in an expression or in the context of Java code, call the standard function callwhen() in the Pega-RULES Default library.
You can view the generated Java code of a rule by clicking
. You can use this code to debug your application or to examine how rules are implemented.Previous topic Specifying pages and classes of a When rule Next topic Performing unit testing on a When rule