Skip to main content


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

Branch merge process customization

Updated on January 14, 2022

You can enhance the merge process for your development team in various ways to comply with your organization's policies and procedures. By using extension points, you customize the standard branch merge process. For example, you can add postprocessing behavior that sends an email notification to the project lead with the status of the merge process.

The merge process and its extension points

When development in a branch is complete and stable, you can use the Merge Branches wizard to merge the changes in one or more branches to the base rulesets.
Tip: As a best practice, use the customizable and model-driven pipelines of Deployment Manager to validate a branch before a merge. For more information, see Using Deployment Manager for model-driven DevOps and Start a Deployment Manager deployment in a distributed, branch-based environment by using the Merge Branches wizard.

The merge process is defined by the standard flow rule pzMergeInstances in the PegaAccel-Management-Refactor-Instances-Merge class.

pzMergeInstances process
Process diagram of the pzMergeInstances process

For preprocessing and postprocessing behavior, the process has two extension points (as subprocesses), to which you can add custom steps.

By saving a copy of the standard rule and customizing your copy, you can override the generic behavior. For more information about making a copy of the standard rule, see the Creating a class to organize your customizations section.

The standard merge process provides extension points, at which you can provide new behavior:

pyPreMergeInstances (subprocess)
To add preprocessing behavior. By customizing a copy of pyPreMergeInstances, you can provide processing that occurs before the Merge Branches wizard starts, such as verifying that a user's operator ID is performing the merge instead of a generic account ID.
pyPostMergeInstances (subprocess)
To add postprocessing behavior. By customizing a copy of pyPostMergeInstances, you can provide processing that occurs after the Merge Branches wizard completes, such as sending an email notifying the team about the status of the merge.
pyValidateMergeOptions (activity)
To customize validation on the inputs into the user interface of the Merge Branches wizard.

You can also modify the UI for the merge process by overriding the following sections and when rules in the Merge Branches wizard:

pyMergeInstancesRuleSetListFooter (section)
To customize the pre-merge screen by adding fields or information to the bottom of the merge wizard.
pyConfirmContent (section)
To customize the confirmation screen. You can modify this section to show a message to the user after the user submits the merge or when a user returns the merge work object to review.
pyRestrictedTargetOptions (when rule)
To apply custom logic for merge options, such as Hide Merge Options, which determines which target rulesets and passwords are visible.
pyMergeButtonDisabled (when rule)
To apply custom logic for when the merge is enabled on the UI, such as the Disable Merge Button option.

Creating a class to organize your customizations

The recommended action before extending the merge wizard is to create a class to store all your extensions. By creating a class to add your customizations, you can expose different merge behaviors and enable users to fall back to an existing behavior.

Tip: You can create a new component to expose your merge wizard customizations, which provides a way to package and share your customization between different applications. For more information, see Components.

To safely organize your customizations in a class in which you can override the extension points, ensure that:

  • The class is a child of the PegaAccel-Management-Refactor-Instances-Merge class.
  • You update the pySetCustomMergeExperience activity to conditionally set the class of the primary page by using the page-set-class method.
  • If multiple merge wizard implementations are required, include this logic in the highest ruleset version available.

For more training materials, see the Merging a development branch in 8.6 challenge on Pega Academy.

For an example of the enhancements that you can make in the branch merge process by customizing this process, see Modifying postprocessing behavior in the branch merge process.

  • Modifying postprocessing behavior in the branch merge process

    Enhance the branch merge process by customizing the postprocessing behavior in the Merge Branches wizard. For example, you can configure the wizard to send an email notification with the status of the merge process, to keep stakeholders in the case automatically informed about the merge status.

  • Previous topic Addressing warnings in the Merge Branches wizard
  • Next topic Modifying postprocessing behavior in the branch merge process

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.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us