About the Merge Branch RuleSets wizard |
After development in a branch RuleSet has reached a stable state, use the Merge Branch RuleSets wizard to move the branch's contents into the base RuleSets. Because other teams might have branched the same base RuleSets to enhance the same rules, or modified the core rules at the same time as work was done in your own branch, you need to identify any conflicts between your changes and theirs before moving your changes into the base RuleSet.
The Merge Branch RuleSets wizard helps identify potential conflicts, so that you can address them before moving your changes. For an example, see PDN article 26427 Using branch RuleSets and merging for parallel development.
The development environment that would typically use branches and branch RuleSets is a multi-team development organization, where multiple teams contribute to a single application. The following steps outline the overall approach for each team:
Make sure the order of the branches as listed in the Branch list matches the order in which the rules should be resolved for this development application's users (the developers on the team). When a developer logs into this development application, the system assembles the developer's RuleSet list, and the branch RuleSets according to the sequence in which the branches are listed in the Branch list.
The branch RuleSet is associated with a branch based on your selections in the New form for creating a RuleSet. The branch must already be listed in the application rule, and the application rule saved, before you can create branch RuleSets for the branch. To make a branch RuleSet, in the New form for creating the new RuleSet, select the Branch RuleSet checkbox and select the branch name. Then save the new rule. When you save the rule for the branch RuleSet, the system associates the RuleSet with the identified branch, and you can expand the Branch array on the application rule's General tab to see the branch RuleSet.
When you have a record in a locked RuleSet displayed in the Designer Studio, you can click Check out to branch on the record form to save a copy to the branch RuleSet and check out the record in one step.
Working with rules in the branch RuleSet is the same as in a standard RuleSet, except for the following differences:
Note: You cannot define new Utility Library instances in branch RuleSets.
The branch's contents (the new and updated rules) are usually moved into the base RuleSets when development activity in the branch has reached a stable point, to make the newest updates available to the wider development team.
To move a branch's contents into the base RuleSets:
Because these multi-team development environments often have teams working on the same rules concurrently, more than one team might have branched the same RuleSets, and introduced changes to rules that conflict with one another. Conflicts are considered "blockers". You must take the appropriate actions to resolve all conflicts in a branch before completing the merge of that branch.
The Merge Branch RuleSets wizard identifies conflicts and warnings, and gives you information to help you resolve the conflicts.
When the merge process is complete, the team's work in that branch is moved into the base RuleSets. Unless the team specified to retain the branch and its RuleSets after the merge, the branch and its associated branch RuleSets are removed from the system.
The branch identifiers (their names) are system-wide. They can be used by anyone that has a compatibly configured application. However, if another team creates a branch RuleSet based on a RuleSet that's not in your application or one of its parents, and selects a branch identifier that you're using in your development application, the system does not associate that branch RuleSet with the branch. and associates a RuleSet that only they can see in their application. The system displays a warning in the application rule. In this situation, you can either add the missing dependency RuleSet to the correct location in your application stack, or negotiate with the other team to have them move their work into a new branch for their own use.
Preparation and prerequisites before merging a branch
Before merging a branch, it is a best practice to determine your answers to the following questions:
The best practice is to lock the branch RuleSets as a signal to others working in the same branch environment that the development in the branch is complete to that point in time, and should not be altered using that branch.
The best practice is to always create a new RuleSet version in the base RuleSet to contain the rules from the corresponding branch RuleSet, because doing so makes it easy to deliver enhancements in a precise, modular way.
The best practice is to lock the new RuleSet version in the base RuleSet, because in the multi-team environment that typically uses branches, locking the RuleSet version alerts other teams that the features in that version are complete as of the point in time the version was created.
If the Merge Branch RuleSets wizard encounters checked-out rules in the to-be-merged branch RuleSets, it displays a warning and provides a report of the checked-out rules. All rules must be checked in before you can complete the merge. If you exit the wizard to complete steps to check in the rules, you must restart the Merge Branch RuleSets wizard from the beginning.
Initiating the merge of a branch
To begin merging a branch:
The system starts the Merge Branch RuleSets Wizard in a new tab in the Designer Studio. See Help: Merge Branch RuleSets wizard for detailed information about using the Merge Branch RuleSets wizard.
Customizing the merge branch RuleSets process
You can enhance this process for your development team in various ways, to comply with your organization's policies and procedures. You can:
For pre- and post-processing behavior, the flow rule that governs this process has two extension points (as subprocesses) at 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 generic behavior with custom behavior; for example:
For customized validation on inputs into the wizard user interface, override the extension point activity pyValidateMergeOptions.