Citrix Lifecycle Management lets you use output of one automated process—ideally a script or a blueprint—as an input of another automated process. This enables flow of data and makes it possible to preconfigure complex automated blueprints containing multiple interrelated steps. For example, you can use server attribute values (output values) from a server startup process as inputs to subsequent configuration processes.

What are the benefits?

  • Enables flow of data through multiple processes
  • Easy to design and create complex blueprints
  • Enables you to create multiple interrelated processes in the form of steps within blueprints
  • Simple UI to view and reference outputs of one step as inputs to other steps

How to chain output and input parameters?

The following example workflow demonstrates how to chain output and input parameters using a simple blueprint in Citrix Lifecycle Management UI.

Step 1: Create a script

  1. From the Lifecycle Management menu bar, click Design & Deploy.
  2. Click New Script.
  3. Enter the name of the script as JSON Output.
  4. Enter Type (File Ext) as bash and click Next.
  5. Enter the following code in the script source editor and click Next:
    echo "{\"result\": {\"message\":\"success\", \"code\": 200}, \"time\": 300}"
  6. Click Next and click Finish.

Step 2: Create another script

  1. From the menu bar, click Design & Deploy.
  2. Click New Script.
  3. Enter the name of the script as Second script.
  4. Enter Type (File Ext) as bash and click Next.
  5. Enter a simple script code in the script source editor and click Next.
  6. Click Next and Click Finish.

Step 3: Create a blueprint

  1. From the menu bar, click Design & Deploy.
  2. Click New Blueprint.
  3. Enter the name of the blueprint as JSON Script Output.

Step 4: Configure global blueprint parameters

  1. Click the Deploy tab.
  2. Under the Runs On tab, click Select Servers and select a machine to run this blueprint.
  3. Under the Blueprint Inputs tab, provide the parameter values as follows:
    1. Type – String
    2. Key – bp_input
    3. Value – old
      global-parameters

Step 5: Configure blueprint steps to chain outputs and inputs

  1. In the left pane, expand My Scripts and drag and drop the script JSON Output as the first step in the blueprint.
  2. Under the Runs On tab, click Select Servers and select a machine to run this script step.
  3. Under the Options tab, select JSON from the Output Format box. The default option is Text.
  4. In the left pane, expand My Scripts and drag and drop the script Second script as the second step in the blueprint.
  5. Under the Runs On tab, click Select Servers and select a machine to run this script step.
  6. Under the Inputs tab, select the Type as String; enter the Key as ResultMessage.
  7. Click the tree icon tree-icon to define the input value.
  8. Expand JSON Script Output > 1. JSON Output > Machine-name.
  9. Select output and enter result.message and click OK.
    reference-tree
  10. Repeat steps 6 to 9. The parameter configuration is similar to the following:
    parameter-config
  11. Under the Options tab, click Add in the Before Execution field to add a Velocity Template Language (VTL) expression to run before this step. You can also add a VTL expression to run after this step based on your requirement.
  12. Select the conditions, input and output expression from the dropdown boxes. The expression is similar to the following:
    vtl
  13. Click Validate to verify if the expression is valid. A confirmation message appears if the expression is valid or not.
  14. Click OK.
    vtl-s
  15. Click Save to save the blueprint.

Step 6: Deploy the blueprint

  1. From the menu bar, click Design & Deploy. Alternatively, you can click Deploy from the Blueprint Designer.
  2. Search the blueprint from the list.
  3. Move the pointer over the blueprint and click Actions > Deploy.
  4. Click Start deployment setup.
  5. Enter a deployment name and click Next. 
  6. In the Resource Location page, click Next.
  7. Review the Pre-deployment Checklist and click Continue.
  8. Click Next. Review the blueprint configuration parameters and click Next.
  9. Enter a profile name and click Save.
  10. Click Deploy.

Step 7: View deployment details

  1. From the menu bar, click Manage.
  2. In the Deployments page, move the pointer over the deployment name and click Details.
  3. Click Get Deployment Report.
  4. Click the JSON Output step and click the Step Output tab. The step output is provided in the JSON format.
    json-output
  5. Click the Second Script step and click the Step Details tab. The parameters mentioned in the JSON output of the first step are used as input parameters in the second step (Second Script).

Citrix product teams and partner companies are leveraging this powerful feature to design smart and user-friendly blueprints.

Want to explore more? Start your free trial today and let us know what you think of Citrix Lifecycle Management. For more information about Citrix Lifecycle Management, see the Product Overview page.