Creating and Deploying a Packaged Component (Factoring in Branches) with the Boomi Enterprise Platform API


 

Introduction:

Boomi’s November 2024 release introduced Branch and Merge functionality into the Boomi Platform. This how-to guide walks through some new functionality with the Boomi Enterprise Platform API showcasing creating and deploying Packaged Components, factoring in the Branch the Component resides on.

Disclaimer: This process and design is in no way intended to serve as an authoritative way of performing this query, but is instead aimed at showcasing functionality and empowering you as a developer to build upon this functionality.
Note: At the time of this writing, some of the API calls to the Boomi Enterprise Platform API are not currently supported with the branded Boomi Enterprise Platform API connector. I am instead using the REST Client technology connector in these areas.
 

Before you Begin:

A connection to the Boomi Enterprise Platform API is required. Within the Platform Settings, there is a tab to create new Boomi Enterprise Platform API Tokens


 

When creating the token, it  will be visible once. Save the token somewhere secure.
 

Configuring the Branded Boomi Enterprise Platform API Connector:

Configuring the REST Client Technology Connector:

Configuration Steps:



 

Start Step - Data Passthrough

This process assumes that a Component ID, Branch Name, and Environment ID will be specified in Dynamic Process Properties. These properties can be set in a main process calling this process, or through a set properties step referring to a profile’s elements that are passed into this process. 

Branch

The process is split up into three branches, each with their own unique function. Branch 1 is configured to take the Component ID and Branch Name and create a packaged component for the specified component on the given branch. Branch 2 serves as optional functionality showcasing where the component XML can be extracted and stored in a Code Repository. Branch 3 takes the packaged component that was created in Branch 1 and deploys the packaged component.

[Branch 1] Process Call - [UTILITY] Create Packaged Component (by DPP_COMPONENT_ID | Optional: DPP_NOTES, DPP_PACKAGE_VERSION, DPP_BRANCH_NAME)

This step calls the modular process [UTILITY] Create Packaged Component (by DPP_COMPONENT_ID | Optional: DPP_NOTES, DPP_PACKAGE_VERSION, DPP_BRANCH_NAME). Instructions for configuring the process are as follows:

Start Step - Data Passthrough

This step is configured as a data passthrough to allow for the process document to Flow through into this sub process.

Map - Build Create Request

This step takes the blank document that was passed into this process, and creates an XML payload by mapping in the various set Dynamic Process Properties  that will be sent to the Boomi Enterprise Platform API creating the Packaged Component.

Boomi Enterprise Platform API Connector

This step takes the XML payload created in the previous map and sends a CREATE request to the Boomi Enterprise Platform API.

Return Documents

Once the Packaged Component is created, a document is returned from the Boomi Enterprise PlatformAPI containing details about the newly created packaged component. This Return Documents step passes that document back to the main process allowing for further processing.

[Branch 1] Set Properties - Set DPP_PACKAGE_ID

Upon creating the package in the previous process call, the ID of the Packaged Component is captured for use later in the process. This step stores the Packaged Component’s ID into a Dynamic Process Property.

[Branch 1] Stop Step

This step marks the end of Branch 1

[Branch 2] Notify step

This notify step serves to show you as the developer that this branch is optional functionality.

[Branch 2] Process Call - [UTILITY] Get Component XML (by DPP_COMPONENT_ID | Optional: DPP_BRANCH_NAME OR DPP_BRANCH_ID)

This step calls the modular process [UTILITY] Get Component XML (by DPP_COMPONENT_ID | Optional: DPP_BRANCH_NAME OR DPP_BRANCH_ID). Instructions for configuring the process are as follows:

Start Step - Data Passthrough

This step is configured as a data passthrough to allow for the process document to flow through into this sub process.

Decision - DPP_BRANCH_NAME Present?

This sub process contains functionality to allow for the Branch Name or ID to be passed in when specifying a specific Branch to get the component XML from. Since the Boomi Enterprise Platform API requires the Branch ID instead of the name, if a name is given then the ID must first be retrieved. This decision step checks if the Branch name was specified and if so routes the process to add the extra layer of retrieving the branch name, but if no branch name was given, then the process routes to the actual retrieval of the component XML.

[True] Branch

The true path off of the decision step splits the process into two branches. The first branch takes the branch name and queries the Boomi Enterprise Platform API for the branch ID. The second branch follows the False path from the decision step and performs a GET request to the Boomi Enterprise Platform API to retrieve the component XML.

[Branch 1] Process Call - [UTILITY] Query Branch (by DPP_BRANCH_NAME)

This step calls the modular process [UTILITY] Query Branch (by DPP_BRANCH_NAME). See this community article walking through the steps to set this Utility process up: https://community.boomi.com/s/article/Using-the-Boomi Enterprise Platform-API-to-query-a-Branch-based-upon-a-Branch-Name

Set Properties - Set DPP_BRANCH_ID

This step takes the returned ID for the specified branch from [UTILITY] Query Branch (by DPP_BRANCH_NAME) and stores it into a Dynamic Process Property. 

Stop Step

This marks the end of Branch 1.

[False] [Branch 2] Set Properties - Add DPP_COMPONENT_ID to DPP_PATH

This step constructs the Dynamic Process Property - DPP_PATH which is used as a Dynamic Operation Property later on in this process. The Boomi Enterprise Platform API wants the path to follow the format: /Component/{Component ID} 

[Branch 2] Decision - DPP_BRANCH_ID Specified?

The Boomi Enterprise Platform API does not require that a Branch ID be specified when pulling in the Component XML. If no branch ID is given, the default branch (main unless configured otherwise) will be the branch that the Component XML is retrieved from. This decision step determines whether or not to include the Branch ID in the Dynamic Process Property DPP_PATH.

[True] [Branch 2] Set Properties - Add DPP_BRANCH_ID to DPP_PATH

If the Dynamic Process Property - DPP_BRANCH_ID is populated, it is assumed that the process is intentionally looking to grab the Component from a specific branch. This step adds the Branch ID to the Path that will be called when interacting with the Boomi Enterprise Platform API.

At the end of this addition, the next step (which is also the route for the false path) is executed.

[False] [Branch 2] REST Client

This step performs a GET request to the Boomi Enterprise Platform API retrieving in the Component XML for the specified Component.

[Branch 2] Return Documents

This step marks the end of branch 2 and the end of the sub process. Thai step passes the Component XML to the main process.

[Branch 2] Stop Step - Configure this to point to Code Repo

This step serves as a placeholder for where custom logic can be implemented to send the component XML that is now the current process’s document into a code repository. Upon sending the component XML to the code repository branch 2 ends.

[Branch 3] Set Properties - Clear DPP_COMPONENT_ID

The next step, a process call deploying the packaged component takes an input of an Environment ID and Component or Package ID. If a component ID is specified then the Boomi Enterprise Platform API will create and deploy from the main branch the specified component. Since we want to deploy a component from a defined branch (and already have created our packaged component) we must instead pass the Packaged Component ID in.

[Branch 3] Process Call - [UTILITY] Deploy Packaged Component (by DPP_ENVIRONMENT_ID AND DPP_COMPONENT_ID OR DPP_PACKAGE_ID

This step calls the modular process [UTILITY] Deploy Packaged Component (by DPP_ENVIRONMENT_ID AND DPP_COMPONENT_ID OR DPP_PACKAGE_ID). Instructions for configuring the process are as follows:

Start Step - Data Passthrough

This step is configured as a data passthrough to allow for the process document to flow through into this sub process.

Map - Create DeployedPackageRequest

This step creates the XML payload that is used by the Boomi Enterprise Platform API to deploy a packaged component. This map takes various Dynamic Process Properties and maps them to their respective fields in the XML Request profile.

Boomi Enterprise Platform API Connector

This step takes the XML payload created in the previous map and sends a CREATE request to the Boomi Enterprise Platform API.

Return Documents

This step passes back the response coming from the Boomi Enterprise Platform API and marks the end of this process.

[Branch 3] Return Documents

The response from the process “[Utility] Deploy Packed Component (by DPP_ENVIRONMENT_ID AND DPP_COMPONENT_ID OR DPP_PACKAGE_ID)” is passed back to whatever main process called the Create and Deploy Packaged Component process signifying the end of both branch 3 and the process.