Imagine a scenario where you're buying a property. Buying a property involves many people to approve and adjust the total cost. Broker can set the cost to 10 Lakhs, but this amount can be adjusted by owner and any other parties involved. If we have the requirement to update the total cost at each stage and who has updated the case, then we go with declare trigger.
In Pega, we can create a case and the case gets routed to multiple assignee. Assignee can update the case with different values. To resolve this, we can create a declare trigger and track the property (cost) changed in the work history audit trial.
Declare On change:
Imagine a shopping cart in a website, Whenever we add some products, the business policy may involve some complex calcultation to calculate the sub-total and may add a gift voucher. This complex may involve some java steps and functions which can be acheived through activities. In such cases, we go with declare on change.
To resolve this requirement, you can create a declare on change to monitor the properties and execute an activity when the property changes.
In short, Declare Trigger fires when creation of a case/updation or deletion of the case. Declare on change fires when a change in a property value.
Related content has not currently been identified for this post.
We'd prefer it if you saw us at our best.
Pega Collaboration Center 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.