Branch merge process customization
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.The merge process is defined by the standard flow rule pzMergeInstances in the PegaAccel-Management-Refactor-Instances-Merge class.
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.
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.
Previous topic Addressing warnings in the Merge Branches wizard Next topic Branches and unlocked rulesets