Cisco Cisco Workload Automation 6.3 User Guide

Page of 78
56
Cisco Systems, Inc.
www.cisco.com
9
Creating Variable Dependencies
Overview
In the previous chapter, we created an alert message that used system variables. In this chapter, we will create a job that 
depends on the value of a user-defined variable. A user-defined variable is a variable you create manually. A job can 
change the value of a variable you have assigned to it by using a variable update action. A job can be dependent upon 
the value of a variable. Using user-defined variables, you are given unlimited control over the conditional structuring of 
jobs.
For example, a job can run, and set a variable to a specific date. Another job can be triggered to run based on that 
variable’s date. When the specific date arises, the second job runs.
In this chapter, you will increment a variable with the action of “Job A” and make “Job B” dependent on that variable 
reaching a specific value. The variable will start with a value of 0 and increment by 1 each time Job A runs. Job B will 
depend on the variable equaling 3. After Job A repeats 3 times, Job B will start. You could set up a job to start after any 
defined number of previous dependency jobs complete.
To complete the exercises in this tutorial, you need to:
Install Cisco Workload Automation in the CWA default directory (or the examples in this tutorial will not work 
properly).
Select the Super User option in your User definition. 
Configure a default agent. 
Create and have available the work day calendar. 
Creating a Variable
To create a variable:
1.
In the Navigator pane, select Definitions>Variables to display the Variables pane
.
2.
Display the Variable Definition dialog by either clicking the Add Variable button or by right-clicking in the Variable 
pane and selecting Add Variable from the context menu.
3.
In the Name field, enter Gather Orders Var.
4.
From the Type list, select Number.
5.
In the Value field, enter the number 0.
6.
In the Description field, enter The value will be incremented by 1 for each successful run of the Gather Job.
7.
Select the Public field, if it is not already selected.