Executing
Workflows
This chapter contains the following sections:
- Workflow Execution
- Executing a Workflow
- Example: Executing a Workflow
- Creating a Workflow Trigger
- Example: Creating a Trigger to Execute a Workflow
- Scheduling a Service Request
- Example: Scheduling Workflow Execution
- Using VM Action Policies
Workflow Execution
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 the tab or open the Workflow Designer, then choose Execute Now.
-
Schedule a Service Request to be Executed Later - You can schedule execution of a selected workflow. Navigate to the tab, choose Schedule.
-
Trigger Conditional Workflow Execution - You can create a trigger to execute a workflow when a set of conditions is met. Navigate to the tab, then choose Triggers.
-
Create an Action Policy - You can create a policy to execute workflows on VMs within a virtual data center (vDC). Navigate to the tab, choose User VM Action Policy, then add the policy to a vDC.
Detailed instructions and examples are given in the following sections.
Executing a Workflow
You can execute a workflow immediately from either the Workflows page or the Workflow Designer.
What to Do Next
In the view Service Request Submit Status window, click Show Detail Status to see the progress of the service request.
Example: Executing a Workflow
This example demonstrates executing a workflow directly.
Create the example workflow as described in Example: Creating a Workflow.
| Step 1 | Navigate to . | ||
| Step 2 | Click the Workflows tab. | ||
| Step 3 | Locate and select the PowerCycleVM workflow you created in Example: Creating a Workflow. | ||
| Step 4 | In the Executing Workflow dialog, click Submit. | ||
| Step 5 | In the view Service Request Submit Status window, click Show Detail Status. | ||
| Step 6 | In the Service Request dialog, click the Workflow Status tab. On the status page is a graphic of the service request's progress. | ||
| Step 7 | Click the
Log tab to view the service request log.
|
What to Do Next
Click the Workflow Status tab 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 dialog.
Creating a Workflow Trigger
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, 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 | On the menu bar, choose . | ||||||||||||
| Step 2 | Choose the Triggers tab. | ||||||||||||
| Step 3 | Click Add. | ||||||||||||
| Step 4 | In the
Add
Trigger: Trigger Information screen, complete the following fields:
| ||||||||||||
| Step 5 | Click Next. | ||||||||||||
| Step 6 | Specify the
trigger conditions.
| ||||||||||||
| Step 7 | Click Next. | ||||||||||||
| Step 8 | In the
Add
Trigger: Specify Workflow screen, choose the workflow or workflows
to execute on the trigger:
| ||||||||||||
| Step 9 | Click Next. | ||||||||||||
| Step 10 | In the
Add
Trigger: Specify Workflow Inputs screen, enter all the required
inputs for the workflow, and any needed optional inputs.
| ||||||||||||
| Step 11 | Click Submit. |
What to Do Next
You can enable or disable a trigger by selecting the trigger in the tab and checking or unchecking the Is Enabled check box.
Example: Creating a Trigger to Execute a Workflow
This 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 the Triggers tab. | ||||||||||||
| Step 3 | Click the Add action. | ||||||||||||
| Step 4 | On the
Trigger Information page, complete the following
fields:
| ||||||||||||
| Step 5 | On the Specify
Conditions page, add some conditions.
| ||||||||||||
| Step 6 | On the Specify
Workflow page, complete the fields as specified in the following table:
|
What to Do Next
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.
Scheduling a Service Request
You can schedule execution of a workflow for a specific time.
| Step 1 | On the menu bar, choose . | ||||||||||||||
| Step 2 | Choose the Workflows tab. | ||||||||||||||
| Step 3 | In the Workflows pane, choose the workflow that you want to schedule. | ||||||||||||||
| Step 4 | Click Schedule. | ||||||||||||||
| Step 5 | In the
Schedule
Workflow screen, complete the following fields:
|
What to Do Next
Choose the Workflow Schedules tab to view scheduled workflows.
In the Workflow Schedules pane, you can modify a scheduled workflow by choosing a workflow and clicking the Edit button. The Modify Workflow Schedule dialog box appears. Modify the fields described in the previous steps. The Modify Workflow Schedule dialog box is identical to the Schedule Workflow dialog box.
Example: Scheduling Workflow Execution
This example demonstrates how to schedule a workflow for later execution.
Create the example workflow as described in Example: Creating a Workflow.
| Step 1 | Navigate to . | ||||||||
| Step 2 | Click the Workflows tab. | ||||||||
| Step 3 | Choose the VMPowerCycle workflow. | ||||||||
| Step 4 | Click the Schedule action. | ||||||||
| Step 5 | In the Schedule
Workflow dialog, complete the fields as described in this table:
| ||||||||
| Step 6 | Click Submit. |
What to Do Next
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.
Using VM Action Policies
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 | On the menu bar, choose . | ||||||||
| Step 2 | Choose the User VM Action Policy tab. | ||||||||
| Step 3 | Click Add. | ||||||||
| Step 4 | In the
Add
Policy: Create New Policy screen, complete the following fields:
| ||||||||
| Step 5 | Click Next. | ||||||||
| Step 6 | For each
VM
Action in the
Add
Policy: Add VM Actions screen, complete the following fields:
| ||||||||
| Step 7 | Click Submit. |
What to Do Next
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.

Feedback