5.5.1
Table Of Contents
- Developing with VMware vCenter Orchestrator
- Contents
- Developing with VMware vCenter Orchestrator
- Developing Workflows
- Key Concepts of Workflows
- Phases in the Workflow Development Process
- Access Rights for the Orchestrator Client
- Testing Workflows During Development
- Creating and Editing a Workflow
- Provide General Workflow Information
- Defining Attributes and Parameters
- Workflow Schema
- Obtaining Input Parameters from Users When a Workflow Starts
- Requesting User Interactions While a Workflow Runs
- Add a User Interaction to a Workflow
- Set the User Interaction security.group Attribute
- Set the timeout.date Attribute to an Absolute Date
- Calculate a Relative Timeout for User Interactions
- Set the timeout.date Attribute to a Relative Date
- Define the External Inputs for a User Interaction
- Define User Interaction Exception Behavior
- Create the Input Parameters Dialog Box for the User Interaction
- Respond to a Request for a User Interaction
- Calling Workflows Within Workflows
- Running a Workflow on a Selection of Objects
- Developing Long-Running Workflows
- Configuration Elements
- Workflow User Permissions
- Validating Workflows
- Debugging Workflows
- Running Workflows
- Resuming a Failed Workflow Run
- Generate Workflow Documentation
- Use Workflow Version History
- Restore Deleted Workflows
- Develop a Simple Example Workflow
- Create the Simple Workflow Example
- Create the Schema of the Simple Workflow Example
- Create the Simple Workflow Example Zones
- Define the Parameters of the Simple Workflow Example
- Define the Simple Workflow Example Decision Bindings
- Bind the Action Elements of the Simple Workflow Example
- Bind the Simple Workflow Example Scripted Task Elements
- Define the Simple Workflow Example Exception Bindings
- Set the Read-Write Properties for Attributes of the Simple Workflow Example
- Set the Simple Workflow Example Parameter Properties
- Set the Layout of the Simple Workflow Example Input Parameters Dialog Box
- Validate and Run the Simple Workflow Example
- Develop a Complex Workflow
- Create the Complex Workflow Example
- Create a Custom Action for the Complex Workflow Example
- Create the Schema of the Complex Workflow Example
- Create the Complex Workflow Example Zones
- Define the Parameters of the Complex Workflow Example
- Define the Bindings for the Complex Workflow Example
- Set the Complex Workflow Example Attribute Properties
- Create the Layout of the Complex Workflow Example Input Parameters
- Validate and Run the Complex Workflow Example
- Scripting
- Orchestrator Elements that Require Scripting
- Limitations of the Mozilla Rhino Implementation in Orchestrator
- Using the Orchestrator Scripting API
- Access the Scripting Engine from the Workflow Editor
- Access the Scripting Engine from the Action or Policy Editor
- Access the Orchestrator API Explorer
- Use the Orchestrator API Explorer to Find Objects
- Writing Scripts
- Add Parameters to Scripts
- Accessing the Orchestrator Server File System from JavaScript and Workflows
- Accessing Java Classes from JavaScript
- Accessing Operating System Commands from JavaScript
- Exception Handling Guidelines
- Orchestrator JavaScript Examples
- Developing Actions
- Creating Resource Elements
- Creating Packages
- Creating Plug-Ins by Using Maven
- Index
5 Right-click the Start VM and Send Email workflow and select Start workflow.
The input parameters dialog box opens and prompts you for a virtual machine to start and an email
address to send notifications to.
6 Select a virtual machine to start from the vCenter Server inventory.
7 Type an email address to which to send email notifications.
8 Click Submit to start the workflow.
A workflow token appears under the Start VM and Send Email workflow.
9 Click the workflow token to follow the progress of the workflow as it runs.
If the workflow runs successfully, the virtual machine you selected is in the powered-on state, and the email
recipient you defined receives a confirmation email.
What to do next
You can generate a document in which to review information about the workflow. See “Generate Workflow
Documentation,” on page 78.
Develop a Complex Workflow
Developing a complex example workflow demonstrates the most common steps in the workflow
development process and more advanced scenarios, such as creating custom decisions and loops.
In the complex workflow exercise, you develop a workflow that takes a snapshot of all the virtual machines
contained in a given resource pool. The workflow you create will perform the following tasks:
1 Prompts the user for a resource pool that contains the virtual machines of which to take snapshots.
2 Determines whether the resource pool contains running virtual machines.
3 Determines how many running virtual machines the resource contains.
4 Verifies whether an individual virtual machine running in the pool meets specific criteria for a snapshot
to be taken.
5 Takes the snapshot of the virtual machine.
6 Determines whether more virtual machines exist in the pool of which to take snapshots.
7 Repeats the verification and snapshot process until the workflow has taken snapshots of all eligible
virtual machines in the resource pool.
The ZIP file of Orchestrator examples that you can download from the landing page of the Orchestrator
documentation contains a completed version of the Take a Snapshot of All Virtual Machines in a Resource
Pool workflow.
Prerequisites
Before you attempt to develop this complex workflow, follow the exercises in “Develop a Simple Example
Workflow,” on page 79. The procedures to develop a complex workflow provide the broad steps of the
development process, but are not as detailed as the simple workflow exercises.
Procedure
1 Create the Complex Workflow Example on page 103
You must begin the workflow development process by creating the workflow in the Orchestrator
client.
Developing with VMware vCenter Orchestrator
102 VMware, Inc.