The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
When you execute a workflow, a service request is created. You can execute a workflow directly, schedule a workflow to run later, or create a trigger to run a workflow when certain conditions are met. You can also create a policy to execute workflows on VMs.
Each of these options is briefly outlined here.
Execute a Workflow Directly - You can execute a selected workflow immediately. Navigate to Workflow Designer, then choose Execute Now.
or open theSchedule a Service Request to be Executed Later - You can schedule execution of a selected workflow. Navigate to Schedule.
, then chooseTrigger Conditional Workflow Execution - You can create a trigger to execute a workflow when a set of conditions is met. Navigate to Triggers.
, then chooseCreate an Action Policy - You can create a policy to execute workflows on VMs within a virtual data center (vDC). Navigate to User VM Action Policy, then add the policy to a virtual data center (vDC).
, chooseDetailed instructions and examples are given in the following sections.
You can execute a workflow immediately from either the Workflows page or the Workflow Designer.
On the Service Request Submit Status screen, click Show Detail Status to see the progress of the service request.
This example demonstrates executing a workflow directly.
Create the example workflow as described in Example: Creating a Workflow.
Step 1 | Choose Orchestration. | ||
Step 2 | On the Orchestration page, click Workflows. | ||
Step 3 | Locate and select the PowerCycleVM workflow you created in Example: Creating a Workflow. | ||
Step 4 | On the Executing Workflow screen, click Submit. | ||
Step 5 | On the Service Request Submit Status screen, click Show Detail Status. | ||
Step 6 | On the Service Request screen, click Workflow Status. On the status page is a graphic of the service request's progress. | ||
Step 7 | Click Log to view the service request log.
|
Click Workflow Status and record the Request ID from the report. You can view the status of a service request by ID at any time. See Viewing Service Requests.
Click Close to leave the Service Request screen.
You can define a trigger to execute a workflow when specific conditions are met. These conditions are typically the states of various system components. When you enable a trigger, Cisco UCS Director monitors the system state and when the trigger conditions are met executes the workflow you specify.
To create a workflow trigger, follow these steps:
Step 1 | Choose Orchestration. | ||||||||||||||
Step 2 | On the Orchestration page, click Triggers. | ||||||||||||||
Step 3 | Click Add. | ||||||||||||||
Step 4 | On the Add Trigger: Trigger Information screen, complete the following fields:
During execution of a triggered service request, additional requests by the same trigger are ignored. Only after the triggered service request has completed does the next polling event, as defined by the Frequency parameter, trigger another service request. For example: Stateful Trigger T has a Frequency parameter of 5 minutes. T polls parameter P at time 13:00 and finds that P meets the trigger criterion, so T executes a service request SR that runs for 8 minutes. At 13:05, T polls again but, because SR is still running, T does not execute another service request, regardless of the state of P. At 13:08, SR ends. When T polls again at 13:10, it executes a new service request if the criterion for P is met. | ||||||||||||||
Step 5 | Click Next. | ||||||||||||||
Step 6 | Specify the
trigger conditions.
| ||||||||||||||
Step 7 | Click Next. | ||||||||||||||
Step 8 | On the Add Trigger: Specify Workflow screen, choose the workflow or workflows to execute on the trigger: | ||||||||||||||
Step 9 | Click Next. | ||||||||||||||
Step 10 | On the Add Trigger: Specify Workflow Inputs screen, enter all the required inputs for the workflow, and any needed optional inputs.
| ||||||||||||||
Step 11 | Click Submit. |
You can enable or disable a trigger by selecting the trigger on the Is Enabled.
screen and checking or uncheckingThis example demonstrates creating a trigger to execute a workflow when a set of conditions are met.
Step 1 | Create a
workflow with a single task as follows:
| ||||||||||||
Step 2 | Click Triggers. | ||||||||||||
Step 3 | Choose Add. | ||||||||||||
Step 4 | On the Trigger Information screen, complete the following fields:
| ||||||||||||
Step 5 | On the Specify Conditions screen, add some conditions. | ||||||||||||
Step 6 | On the Specify Workflow screen, complete the fields using the following values:
|
Test the trigger by turning on or off one of the monitored VMs. Make sure that the VM's state remains changed for at least three minutes. The trigger polls the state, so any change that is not visible at the time of polling (on and back off during the three minute wait interval, for example) does not activate the trigger.
You can schedule execution of a workflow for a specific time.
Step 1 | Choose Orchestration. | ||||||||||||||||
Step 2 | On the Orchestration page, click Workflows. | ||||||||||||||||
Step 3 | On the Workflows screen, choose the workflow that you want to schedule. | ||||||||||||||||
Step 4 | Click Schedule. | ||||||||||||||||
Step 5 | On the Schedule Workflow screen, complete the following fields:
|
Click Workflow Schedules to view scheduled workflows.
On the Workflow Schedules screen, you can modify a scheduled workflow by choosing a workflow and clicking the Edit button. The Modify Workflow Schedule screen appears. Modify the fields described in the previous steps. The Modify Workflow Schedule screen is identical to the Schedule Workflow screen.
This example demonstrates how to schedule a workflow for later execution.
Create the example workflow as described in Example: Creating a Workflow.
Step 1 | Choose Orchestration. | ||||||||
Step 2 | On the Orchestration page, click Workflows. | ||||||||
Step 3 | Choose the VMPowerCycle workflow. | ||||||||
Step 4 | Click Schedule. | ||||||||
Step 5 | On the Schedule Workflow dialog, complete the following:
| ||||||||
Step 6 | Click Submit. |
Click the Workflow Schedules tab. The scheduled workflow is listed.
Check the service request queue at the time you specified in the Start Time control. See Viewing Service Requests. A service request is generated for the workflow you specified.
You can create a user VM action policy to apply to virtual data centers (VDCs). The policy contains workflows that can be run on VMs within that VDC.
Note | Only one VM action policy can be assigned per VDC. |
To create a VM action policy, do the following:
Step 1 | Choose Orchestration. | ||||||||
Step 2 | On the Orchestration page, click User VM Action Policy. | ||||||||
Step 3 | Click Add. | ||||||||
Step 4 | On the Add Policy: Create New Policy screen, complete the following:
| ||||||||
Step 5 | Click Next. | ||||||||
Step 6 | For each VM Action on the Add Policy: Add VM Actions screen, complete the following:
| ||||||||
Step 7 | Click Submit. |
After you create a User VM Action policy, as an administrator, you can choose this policy when you create a VDC. All VMs that belong to the VDC can then use the workflows specified in the action policy.