Commit and deliver scripts (deprecated)

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
To integrate with a version control system (VCS), you must create two scripts to deliver change sets that contain new and modified solution assets the VCS. These scripts work with the Commit and Deliver actions in Case Builder.

Commit script

When a user clicks the Commit action on the Manager Solutions page, Case Builder takes the following actions:
  • Commits the changes to the IBM® Business Automation Workflow repository
  • Copies the changed solution files to the sandbox
  • Runs a commit script that you provided to check the set of changes from the sandbox into the VCS
The commit script, which you must call commitSandBoxChanges, does the following tasks:
  • Reads the input parameters supplied in the input.properties file
  • Handles deleted solution assets
  • Creates a change set that contains any new or modified solution assets
  • Associates the comments that the user entered for the Commit action with each asset
  • Checks the change set into the VCS

Deliver script

After a solution is committed, the user clicks the Deliver action on the Manager Solutions page. Case Builder then runs the deliver script that you provided. This script checks the modified solution as a whole into the VCS.

The deliver script, which you must call deliverSolutionChanges, does the following tasks:
  • Reads the input parameters supplied in the input.properties file
  • Checks all of the solution assets and the solution manifest into the VCS
  • Associates the comments that the user entered for the Deliver action with each asset
  • Creates a baseline or snapshot of the solution
  • Labels the baseline and delivers it to the VCS

Script requirements

The scripts can be either .sh files for Linux® or AIX® systems or .bat files for Windows systems.

The scripts must be in the scripts subdirectory of the sandbox. You can edit the stub scripts that the BPMConfig command creates in the scripts subdirectory. Alternatively, you can create your own scripts to replace the stub script files. If you create the scripts, you must give them the same names as the stub script files.

Important: On a Linux system, you must manually give the scripts execute permissions before the commit is run.

Case Builder passes to the scripts the path to the user's sandbox. This path takes the following form:sandbox\solution prefix\user name. For example, the path might be C:\sandbox_CreditCard\DISP\ajones where C:\sandbox_CreditCard is the sandbox, DISP is the solution prefix, and ajones is the name of the user who is committing or delivering the solution.

The scripts must read and process the input.properties file that is located in the user's sandbox. This file contains the following information:
deliverLabel
For a delivery, a label that is used to identify the new baseline that is being created in the VCS.
Tip: You can use the label that is assigned to the baseline to later extract a solution from the VCS.
comment
The comment that the user entered during the Commit or Deliver action.
Custom parameters
The additional parameters that were specified when you configured VCS integration. The user provides values for these parameters as part of the Commit or Deliver action.
deletedFiles
A list of assets that were deleted from the solution. If no assets were deleted, this parameter is empty.
newAndModifiedFiles
A list of solution assets that the user created or modified assets. This list also includes the name of the manifest file for the delivery.
userName
The name of the user who committed or delivered the solution.
solutionPrefix
The prefix of the solution that is being committed or delivered.

These scripts must return an integer code. Use the return code 0 to indicate successful execution of the script.

If you specify a heartbeat interval when you configure VCS integration, the scripts must modify the output.txt file in the sandbox to serve as the heartbeat. The scripts can output error messages and other information messages to either the output.txt file or to standard output. IBM Business Automation Workflow captures and logs the content of the output.txt file.