Co-Authors: Balunaini Prasad and Latha Ramakrishnaiah
Introduction
Branches in IBM® Business Automation Workflow allow for parallel development and make changes in isolation from the main solution. Branches allow users, both development and test teams, to work on new features, fix bugs, or experiment changes simultaneously. For example, one team is working on a new feature for a project and another team is fixing an existing bug, they can individually work on separate branches of the solution.
Until BAW 24.0.1, branches were supported only for Process Applications and its toolkits. When customers need to do parallel development or fix a bug in their existing Case solutions, they were expected to create a new development environment to make a fix and test the changes.
From BAW 25.0.0 release, branches can be created for Case solutions as well. Hence, there is no need to create a new environment for any parallel development, just creating a new branch for the solution is sufficient.
Implementation
Design Object Store:
When you create a project, IBM® Business Automation Workflow creates a single default branch named Main. After branches are enabled for a Case solution, you can create additional branches. When a branch is created for a Case solution, a folder with name “Branches” will be created under the existing solution folder in the design object store. A corresponding sub-folder with name set to the branch acronym will be created for every new branch under “Branches” folder. All the solution documents like Solution Definition File, PE Configuration XML file, Pages, Rules, etc are copied and maintained under these branch specific folders. Each of these folders will also contain the solution lock custom objects and can be simultaneously edited by multiple users.
Below is a sample folder structure representing the folder layout for the branches. The solution here is Employee Onboarding and EOHRD, EOITD are its branches.
Target Object Store:
A branch for a Case solution can be created on a unique project area. This means that when a branch is deployed, it will be deployed to a unique target object store. In other words, two branches for a Case solution can not be deployed to the same target object store. The project area that is associated to a branch will be specified at the time of creating a branch and can also be updated after a branch is created.
Create branches
To make use of the Case branch feature in the designer, the below pre-requisites are to be done.
-
The server must have multiple project areas. This is because each branch requires a unique project area.
-
The User preferences should be set to ‘Advanced view’ mode for the logged in user.
Branches can be created for both new and imported Case solutions. Once a solution is created, user can enable the branch feature by selecting the checkbox “Let users create branches“ in the solution details Overview tab.
There will be a “Branches” tab displayed which would initially list the Main snapshot. A branch can only be created from a snapshot other than the Main snapshot. So once a new snapshot is created from the Main snapshot, there is a “Create branch“ option displayed in the overflow menu of the snapshot.
In the “Create a branch” dialog, enter the branch name, select a project area in which the branch will be created and provide an optional branch description as shown below.
There are various actions that can be performed from a branch like “Create a snapshot“, “Open in Designer“, “Update details“, “Archive“, “Set as default” and “Delete“
The branch can be opened from the overflow menu “Open in designer“.
A branch can also be opened from the Manage Solutions page of Workflow Center or BAStudio by opening the solution.
A reference to the branch being opened will be shown in the breadcrumb area like “Showing branch 'Employee onboarding HR department“. The project area to which the branch is associated with will also be displayed in the overview section as highlighted below.
The user can edit the branch with the required artifacts and deploy the solution.
Multiple snapshots can be created for a branch.
Also, multiple branches can be created for a solution.
Update branches
A branch can be updated after it is created. There is an ‘Update details’ action available on the branch which will update either the branch name or the branch description. The associated project area also can be updated for a branch, which effectively means that we are moving a branch from the current project area to a new project area.
In the below update dialog ,select the project area to which the branch has to be moved to and click on save.
Once the branch is updated, the new project area associated will be used for the branch. This can be seen in the overview section as below.
Delete branches
If branch is no longer required, it can be deleted. Deleting a branch will remove all the sub folder references for the branch in the design object store. Delete option is available in the overflow menu action for a branch.
Deploy and test branches
Development Environments:
Below are the options to deploy a Case branch:
- Case branch supports both incremental and full deployment. The deployment of a branch can be done from the solution designer.
- Branch can be deployed using the Business Automation Workflow Case REST Interface (/case/docs Swagger)
Once a branch is deployed, clicking on the Play icon from solution designer loads the runtime for the specific branch. The target object store associated with the project area in which the branch is created is displayed as part of the runtime URL. For example, below URL:
https://hostname:port/navigator/desktop=desktopname&feature=Cases&tos=targetobjectstore&solution=solutionprefix&bawdev=true
In the Solution picker dropdown, the branch acronym detail is shown as a tooltip when we hover on the solution. This is used to identify the branch of the deployed solution.
Production Environments:
Snapshot created from a branch in Workflow Center or BAStudio can be exported and the package can be installed to a production environment using IBM Business Automation Workflow Operations REST Interface for traditional/CP4BA environments. Another approach which is applicable for traditional environments is to use BPMInstallPackage command.
Recommendation
It is suggested that a new desktop be created for each project area so that a solution and its branches can use different desktops during verifying the Runtime behaviour. To create a new custom desktop, please refer https://www.ibm.com/docs/en/baw/24.0.x?topic=environments-creating-custom-desktops
Restrictions
- Branches are not supported for classic Case Builder solutions. Also, branches are not supported for Case templates.
- Branches are not created when we import a Case solution package that was exported from a branch of a snapshot. The import is treated as a normal Case solution import i.e., it is imported to a Main branch.
- Solutions having branches will not be listed for moving them across project areas in the BAW Case Administration Client.
Summary
When a case solution is deployed in the production environment in the previous releases and to fix any issue on the production environment, a parallel development environment had to be set up to fix the issue. From BAW 25.0.0 release, the customers can maintain multiple branches of a Case solution so that each branch can be individually fixed or enhanced on the same BAW development environment.
References
For more information, please refer to the IBM Business Automation Workflow documentation.