Branch & Merge in Pega
Branch & Merge
Suppose you
are working in large development team that is building a Web application for a
Client. There are multiple team developing each components of an application.
All the developers are using the same distributed environment. There are
chances of conflicts when multiple team are making change in the same rule. So,
this would cause unnecessary confusion and also delay the project completion.
So, in
order to avoid this, you can use “Branches” in pega to support parallel
development. By Creating Branches each team can work independently and merge
the branch to application ruleset once the changes are stable and conflicts are
resolved.
What is
a Branch?
It is just
container for rulesets to hold the rules that undergoes rapid change. A branch ruleset is branched from another
ruleset.
Adding a
Branch in an application
Step 1: Click application->View Definition
to Open the application record and click Add Branch.
Step 2:Enter the
Branch name or select if any existing.
Step 3:Now the
branch is created.
Step 4:Now you add
the branched ruleset to the branch created in previous step by creating and
saving the rule in the branch. Branched ruleset will be created automatically
based on the selected branch.
Rule is
created in the branched ruleset in a branch.
To view
the branch content and its quality. Please follow steps below.
Branch
window opens . The first tab displays content ie rules that are added to this
branch and its details
Merging
a branch
Step 2:
Check if any conflicts are displayed. If yes, please resolve the
conflicts before merging.
Make sure
all the rules are checked in both source ruleset (branch ruleset) .
If you have
already higher empty version created in original ruleset, you can select that
version in drop down otherwise you can create new version while merging.
Provide the
locking password in both source and target .
If the
checkbox ”keep all source rules and rulesets after merge” is checked, then
branch is not deleted from application after merge.
Note:
As a Best Practice, it is always recommended to delete the branch rules
and rulesets once merged to avoid confusion.
Deleting
the branch from system
Step 2:
Select “ Save branch contents in a JAR for download” to take a copy of branched ruleset for local
save. Click “Delete”.
Note
: Here, I
have created in branched ruleset in one application and merged the rules later.
You can also create separate team application built on base application and
create branched ruleset in each team’s application and give access to team
members.