Component Template Example
The create a new API Endpoint from a template, we must consider the following:
What makes the new endpoint?
What should be different from the original?
How does it differ from the other end points?
The first and most important thing ist the endpoint' name: the new endpoint is no longer getContact but it should be getAccount. If you chose smart copy some renaming must be applied the get a getAccount.

Now, imagine you could create your templates with placeholders, like that:

The template DataSet
Templates contain placeholders ${EndpointName}
, and the question is: where do the values for these placeholder come from when the new components are created?
Create a directory in your BC workspace: Template02
Create a dataSet.json file with the following content:
{ "EndpointName" : "getAccount" }
Run BoomiConsole
COMP SmartCopy
and specify the working directory and the dataSet:
bc comp SmartCopy
/wd Template02
/d dataSet.json
/c 77735e3d-..,36595f0b-..,5e49233d-.,b6354ab4-..
Et voilá, you see four new components created from our template with all placeholders replaced to getAccount .

Template components
I recommend creating a components.txt file that contains the template's component ids (see Arguments in a file).

The command changes to
bc comp SmartCopy
/wd Template02
/d dataSet.json
@components.txt
Next steps
If you want to create another getAddress
endpoint, simply edit the dataSet.json to { "EndpointName" : "getAddress" }
, run the command and you are done!
Last updated