How to create a Template

A real world example how to create and use a Boomi Component Template

It is a recommended practice to develop your processes as usual. Do not think about templates while your develop. However, think about re-usability, about patterns when you create processes / components.

Imagine you have an API endpoint listener process based on the standard Boomi patter Deploy/Impl/Test:

Create a template from an existing process

We need a copy of the implemented process / components that we will use a the template for all future copies.

Start and copy the Deploy-Process with dependent components (full-copy):

As always, when you use the Boomi-Copy there is some work to do, to cleanse the copy we got. The copy contains a psg.LogProps script component, which is used in the original implementation.

The Script component is shared- resides in the #Common folder

Actually, we do not want this script component to be part of each and every endpoint we create. The script component is shared and we want to reference the same component from all endpoints. Let's cleanse the Copy and a) reference the shared script and b) remove the local script.

Local script component removed

We do have a clean copy of our endpoint with all components in one folder. This is the basis for the Template.

Insert placeholder variables

If we take a closer look at the end point, we recognize a name that is always repeated. With a normal copy, we would have to open each component and adapt the name to the new endpoint. We do the same now. However, we use a placeholder instead of a concrete name:

Post --> ${EndpointMethod}
UpdateRedemption --> ${EndpointName}

Boomi Console uses the Freemarker templating engine to replace variables. This allows us to use fancy stuff, like ${EndpointMethod?lower_case}

We use variables everywhere: component names, shape captions, property names and values, ...

The Copy folder is now ready to act as a template.

Boomi Console Preparation

  • Create a new folder for your template in your Boomi Console Workspace

  • collect the id of your template components in the components.txt file and

  • create a datSet.json for your placeholder variables.

Use the template

From now on, creating any new endpoint has become as simple as that:

  1. Edit the dataSet.json variables. For example, EndpointName=CreateContact,Number=199

  2. Run bc comp smartcopy /wd APITemplate /d dataSet.json @APITemplate\components.txt

All that has to be done is to move the components to another folder.

P.S.: Do not forget to check whether the shared script from the #Common folder is used in your new endpoint 😉 !

Last updated