[AWA] Example of workflow to process a variable

Document ID : KB000110266
Last Modified Date : 10/08/2018
Show Technical Document Details
Introduction:
Automic Workload Automation Request:
- I have a VARA object holding list of parameters of an OS command, the list should be dynamically adjustable
- How to create a workflow to execute the command one by one with the corresponding parameters, and blocks all if one task failed?
Instructions:
There are many ways to solve the request, you may find one practice as follow:
  • Use a Foreach workflow (that contain the executable task)
    • The Foreach tab should process corresponding VARA object and publish the object variable as the corresponding parameters
    • Child-task can pick up the parameter and run sequentially (you may define max. parallel executions = 1 to ensure only 1 running at a time)
    • In order to block the workflow if a child-task failed, please use Postconditions with If status conditions
This way, you can add or remove parameters from the VARA object dynamically, and the tasks will be carried out one by one, and blocked when one fails.
Please find attached an xml export for a sample workflow.
File Attachments:
foreach_example.xml