Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to customize the merge branch RuleSets process

Updated on September 10, 2021


You can use extension points to customize the standard merge branch RuleSets process; for example, add behavior that enforces compliance with your organization's policies and procedures. This article describes the steps for adding pre-processing behavior, post-processing behavior, and customizing input validation in the wizard's user interface.

Suggested Approach

The article Using branch RuleSets and merging for parallel development describes how to use branch RuleSets for parallel development situations. The Merge Branch RuleSet wizard is used to merge the changes in a branch to the base RuleSets when development in the branch is complete and stable.

The standard Merge Branch RuleSets process provides extension points at which you can provide customized behavior. You can:

  • Add pre-processing behavior
  • Add post-processing behavior
  • Customize validation on the inputs in the Merge Branch RuleSets wizard user interface

Flow for the Merge Branch RuleSets process

The Merge Branch RuleSets process is defined by the standard flow rule PegaAccel-Management-Refactor-Instances-Merge.pzMergeInstances.

pzMergeInstances flow

For pre- and post-processing behavior, the flow has two extension points (as subprocesses) to which you can add custom steps: pyPreMergeInstances and pyPostMergeInstances. By saving a copy of the standard rule and customizing your copy, you can override the standard behavior with custom behavior; for example:

  • Pre-processing: Customize a copy of pyPreMergeInstances to provide processing that occurs before the wizard starts, such as verifying that a person's operator ID is performing the merge instead of a generic account.
  • Post-processing: Customize a copy of pyPostMergeInstances to provide processing that occurs after the wizard completes, such as sending an email notifying the team about the status of the merge.

Example of providing post-processing behavior: Send an email notification with status of the merge process

To provide processing that occurs after the wizard completes:

  1. Save a copy of the standard pyPostMergeInstances to a RuleSet available to your application.
  2. Add the steps you want the system to perform to that copy.

In this example, the project lead wants the system to send him an email notification that lets him know the status of the merge process. This example uses a Utility shape and the CorrNew activity; however, you are not limited to this method. For information about other ways to send correspondence and notifications from this flow, see How to configure flows that automatically generate correspondence.

  1. Locate and open the standard pyPostMergeInstances flow by using the Designer Studio's Search field and clicking the flow name to open the rule.
  2. Click SaveAs () to save a copy of pyPostMergeInstances into a RuleSet available to your application. In this example, the copy is saved to the organization's RuleSet (GLBX).
  3. In the rule form for the saved copy of pyPostMergeInstances, check out the rule and then update the process diagram to add a Utility shape to implement the email notification to the project lead.
  4. Update the properties for the Utility shape to specify the CorrNew activity for the Rule (use the SmartPrompt list under the Work class to select Notify), and to give the shape a specific name (Send email to PL).
  5. After selecting CorrNew for the rule, entry fields for the parameters related to that CorrNew activity are displayed. In this example, values that are unique to this team's application and that are defined in their system are specified: a correspondence rule named MergeRuleSetsStatus is selected (this correspondence rule already exists in this system), and the PartyRole is set to ProjectLead. Because this correspondence rule is an Email type, additional fields are displayed after the MergeRuleSetsStatus correspondence rule is specified. Here, the team sets an email subject of Status of Merge Branch RuleSets operation.
  6. Save the updated utility properties, and then save the flow.
  7. Create a work parties rule in the PegaAccel-Management-Refactor-Instances-MergeApplies To class to define the parties to receive the email. Specify the Project Lead role as is set in the Utility shape properties.

    When the Merge Branch RuleSets process completes, the system performs the post-processing step and an email is sent to the project leader via the work parties rule.

Customizing input validation in the wizard user interface

For customized validation on inputs into the wizard user interface, override the extension point activity pyValidateMergeOptions.

Additional Information

Using branch RuleSets and merging for parallel development


Pega Platform 7.1.1 - 8.3.1 System Architect System/Cloud Ops Administrator

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us