Friday 13 May 2016

Create configuration file templates programatically


The UrbanCode REST interface has a nice function for creating Configuration file templates.

First you need to create some JSON specifying the name of the template, the component ID and the contents of the template.

You'll notice that I've chosen to use a variable from a previous process step (the process step is named "Read Templates"   and the property is called xpath.template.contents) into which I've read the contents of the template I need to create.

Now all we need to do is call the REST interface to create the template - Here's an example of how to do this in a Groovy process step

No comments:

Post a Comment