What is Declarative Rule and How to work with Declarative Constraint in PEGA?
- January 28, 2021
- Posted by: AtoZ Trainings
- Category: PEGA Technology

Declarative Processing: Automatic calling and execution of rules by process commander.
We create declarative rule and leave them without referring from any other rule.
These rules gets auto executed when we used the properties which are involved in declarative rules.
Below are declarative rule
- Constraints
- Declare expression
- Declare on change
- Declare Trigger – This gets auto executed when DB table Action performed
- Declare index – This gets auto executed when DB table Action performed
- Declare Pages (Data Pages).
Working with Declare Constraint
Creating Declare Constraint for age validation based on gender.




Click on plus icon

Save.
We are not required to call this rule anywhere in the application, because it’s a declarative rule.
Now, create a case and test it.



Save. Done.
Declare Expression
This is used to assign a target property when source properties or input properties values changes.
Anywhere throughout the application, input properties values gets updated declare expression gets executes.
Eg : A = B+C
Here B and C are input properties
A is Target Property.
*This target property can never be used anywhere on the left side of assignment.
Declare On Change
The purpose of Declare on change is to execute activities automatically whenever there is a change in property value.

Done.
DONE.
Author:Yoktha
Leave a Reply Cancel reply
You must be logged in to post a comment.