Skip to main content

Automating actions when a property value changes

3 Tasks

15 mins

Visible to: All users Applies to: Pega Platform '25
Intermediate
Enterprise Application Development
Dev/Designer Studio
Low-Code App Development
User Experience
Constellation
English

Scenario

The Payroll Department at TGB reports that some employees enter an incorrect bank name when enrolling in direct deposit. The payroll department requests that the bank name populate based on the routing number entered to avoid errors in Payroll setup cases.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Senior System Architect SSA@TGB pega123!
Note: This challenge does not have a demo video. Please refer to the Detailed Tasks for step-by-step instructions to complete the challenge.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Configure the Bank information Flow Action.

  1. In the Pega instance for the challenge, enter the following credentials:
    1. In the User name field, enter SSA@TGB.
    2. In the Password field, enter pega123!.
  2. In Dev Studio, from the App Explorer, Expand TGB-HRApps-Work-PayrollSetup > Process > Flow Action.
  3. Click ProvideBankInformation.
  4. In Edit Flow Action: Prove bank information, in the Form fresh settings section, click Add condition.
  5. In the When Property change field, enter .RoutingNumber.
  6. In the then run Data Transform field, select UpdateBankName.
    Form set to refresh when Routing number changes
  7. Click Save.

2 Create the Declare OnChange and Activity Rules

  1. In Dev Studio, open the Records Explorer.
  2. In the Records Explorer, click Decision > Declare OnChange to open the list of current OnChange instances in the application.
  3. Click Create to create a new Declare OnChange Rule.
  4. On the new Declare OnChange Rule, in the Label field, enter UpdateBankName.
  5. In the Apply to field, enter TGB-HRApps-Work-PayrollSetup to apply the Declare OnChange Rule to the PayrollSetup Case Type.
  6. Click Create and open to create the Declare Onchange Rule.
    Note: The system displays a warning that the use of Activity Rules should be limited. The need for activities can be reduced by using Data Transforms, as well as techniques such as Case Management, the Engine API, and Declaratives. To stay in line with best practices, limit the use of Activities. 
  7. In the Properties To Watch field, enter or select.RoutingNumber as the property to watch for changes.
  8. In the When field, enter or select Always to run the specified Activity every time the routing number changes.
  9. In the When True Run section, enter the Activity name UpdateBankName.
    declare-onchange-configuration
  10. Next to the Activity UpdateBankName field, click the open icon to open the Create Activity form.
  11. Click Create and open to save the new Activity Rule as UpdateBankName.
  12. On the Security tab of the Activity Rule, in the Activity type list, select Onchange.
  13. On the Steps tab, configure the Activity to apply the UpdateBankName Data Transform.
    Activity configuration
    Note: In this scenario, the UpdateBankName Data Transform uses the routing numbers specific to the United States to identify the financial institution with which the account is associated. To learn more about routing numbers in the United States, see List of routing numbers.
  14. Save the Activity Rule UpdateBankName and click the Declare OnChange Rule tab.
  15. Save the Declare OnChange Rule UpdateBankName.

3 Configure Provide Bank Information View

  1. In the navigation pane of App Studio, click Case Types > Payroll Setup to access the Payroll Setup Case Type.
  2. In the Configuration pane of the Provide bank information Step, click Configure user action.
  3. In the Bank name field row, click the Gear icon to configure the field.
  4. In the Edit mode field, select Read-only (Custom Condition) and click the Gear icon.
  5. In the Condition Builder window, set Field to Routing number, and then set Conditional operator to is not null.
  6. Save the configuration.


Available in the following mission:

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