Tasks are the basic unit of execution for a workflow. You create tasks from templates in the task library. Once they are created and customized they can be added to each step of a workflow.
The Task Library
You use the Task Library to select task templates from which to make your tasks. There are three kinds of templates in the Task Library:
- Default task templates. AppDynamics ships with templates for many common tasks.
- Templates that launch your shell or batch scripts. You can automate the running of scripts in blocking or non-blocking mode. See Create Custom Tasks Using Shell or Batch Scripts
- Task templates that you create. See Create a New Task Template Using XML.
Create a Task
- From the left application menu, click Cloud Auto-Scaling > Tasks.
- Click New. The Create Task window opens.
- Give the task a name.
- Scroll through the task template list to find a suitable template.
- Click the template name: the parameter UI is displayed.
- Select the Input Parameters tab to specify what values should serve as the input to the task. Asterisks indicate the required parameters.
If appropriate, you can use a workflow variable which is evaluated at runtime. Click the icon to the right of the field to access the Select Variable popup.
The types of workflow variables include
- Shared Variables: This variable stores a value that is accessible by more than one task. These can also be directly using Cloud Auto-Scaling > Shared Variables.
- Tier IP Addresses: This variable returns a comma separated list of IP addresses of nodes in a tier.
- Machine IP: This variable returns the IP address of the machine where the task is executing.
- Task Output: This variable returns a value which is output from another task. To use a task's output, the Task must define output parameters, and it must have executed before the Task that uses it.
- Select the Output Parameter Binding tab and enter values if needed.
- Click Create Task.
- Repeat to create as many tasks as necessary.
A list of tasks is created. You can later edit or remove a task from the Task Window.
Add a Task to a Workflow Step
- From the left application menu, click Cloud Auto-Scaling > Workflows.
- To add the task to an existing workflow, select the workflow and click Edit. Or you can create a new workflow. See Create a Workflow and Workflow Steps.
- Click the Task + icon in the workflow step to which you wish to add the task.
- Select the task to add to your workflow from the list.
- Click Add Selected Task to Workflow.