Using template property to dynamically associate artifact packages

Document ID : KB000072235
Last Modified Date : 27/02/2018
Show Technical Document Details
How to use template property to create a deployment plan which will be creating, mapping artifact packages dynamically.
The artifact packages are created and associated during PRE-PLAN step. In use case where you want to reuse the same template, to create deployment plan for various application and there associated artifact packages, there is a need to harness and use the feature of "Template properties".
Release Automation: 6.3,6.4,6.5 and higher
In order to achieve the use case described above, we are going to use two available features i.e. Template Properties and shared component of product.

Please find design steps below:

1: First we are going to create an empty template with respective property which we want to use. For example in this case we are going to use two Template property i.e. ApplicationName & PolicyType whose value will be dynamic and will change for each deployment plan.
template property
2: Once we have our template property been identified and defined now we are going to create our shared component, so we can reuse this component in any applications. In this shared component we are just going to use an action "ROC - Get Deployment Property Value" twice as we want to get the two template property, knitted together in a flow. The configuration and layout of shared component looks as below.
User-added image
3: Once designing of shared component is finished commit the same and assign that version of it to an application where you want to use it.
4: Now in pre-plan step assign the flow of this shared component as one of the initial actions so that it can fetch out the values been passed. Also the same can be assigned to any deployment step and they to will be getting the values from template property.
User-added image
5: Now map these processes to your template and with this design the deployment plan created via template will be dynamic. Now what value been set to template property during creation of deployment plan will be passed and shared across the deployment.
6: Another advantage of above design is that now deployment plans can be created via REST API passing appropriate value of template properties. Sample request below.
API: http://NAC-HOST:NAC-PORT/datamanagement/a/api/v3/create-deployment-plan
Request Body(Sample):
               "deploymentPlan":"custom run from REST",
                "project":"Custom Plan from template properties",
   "deploymentTemplate":"Template Blueprint",
   "templateCategory":"Custom Template",
   "application":"Test Application",
   "properties":{"ApplicationName":"WebApp","PolicyType":"Non Fragment"}
Additional Information:
KB KB000072160