This document supports the version of each product listed and
supports all subsequent versions until the document is
replaced by a new edition. To check for more recent editions
of this document, see http://www.vmware.com/support/pubs.
EN-001341-00
Developing with VMware vCenter Orchestrator
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Contents
Developing with VMware vCenter Orchestrator7
Developing Workflows9
1
Key Concepts of Workflows 11
Workflow Parameters 11
Workflow Attributes 11
Workflow Schema 12
Workflow Presentation 12
Workflow Tokens 12
Phases in the Workflow Development Process 12
Access Rights for the Orchestrator Client 12
Testing Workflows During Development 13
Creating and Editing a Workflow 13
Create a Workflow 13
Edit a Workflow 14
Edit a Workflow from the Standard Library 14
Workflow Editor Tabs 15
Provide General Workflow Information 15
Defining Attributes and Parameters 16
Define Workflow Parameters 17
Define Workflow Attributes 17
Attribute and Parameter Naming Restrictions 18
Workflow Schema 19
View Workflow Schema 20
Building a Workflow in the Workflow Schema 20
Schema Elements 23
Schema Element Properties 26
Links and Bindings 29
Decisions 34
Exception Handling 37
Foreach Elements and Composite Types 38
Obtaining Input Parameters from Users When a Workflow Starts 41
Creating the Input Parameters Dialog Box In the Presentation Tab 41
Setting Parameter Properties 43
Requesting User Interactions While a Workflow Runs 46
Add a User Interaction to a Workflow 47
Set the User Interaction security.group Attribute 47
Set the timeout.date Attribute to an Absolute Date 48
Calculate a Relative Timeout for User Interactions 49
Set the timeout.date Attribute to a Relative Date 50
Define the External Inputs for a User Interaction 51
Define User Interaction Exception Behavior 52
VMware, Inc.
3
Developing with VMware vCenter Orchestrator
Create the Input Parameters Dialog Box for the User Interaction 53
Respond to a Request for a User Interaction 54
Calling Workflows Within Workflows 54
Workflow Elements that Call Workflows 55
Call a Workflow Synchronously 57
Call a Workflow Asynchronously 58
Schedule a Workflow 59
Prerequisites for Calling a Remote Workflow from Within Another Workflow 59
Call Several Workflows Simultaneously 60
Running a Workflow on a Selection of Objects 61
Implement the Start Workflows in a Series and Start Workflows in Parallel Workflows 62
Developing Long-Running Workflows 63
Set a Relative Time and Date for Timer-Based Workflows 63
Create a Timer-Based Long-Running Workflow 64
Create a Trigger Object 66
Create a Trigger-Based Long-Running Workflow 67
Configuration Elements 68
Create a Configuration Element 68
Workflow User Permissions 69
Set User Permissions on a Workflow 70
Validating Workflows 70
Validate a Workflow and Fix Validation Errors 71
Debugging Workflows 72
Debug a Workflow 72
Example Workflow Debugging 73
Running Workflows 73
Run a Workflow in the Workflow Editor 74
Run a Workflow 74
Resuming a Failed Workflow Run 76
Set the Behavior for Resuming a Failed Workflow Run 76
Set Custom Properties for Resuming Failed Workflow Runs 77
Resume a Failed Workflow Run 77
Generate Workflow Documentation 78
Use Workflow Version History 78
Restore Deleted Workflows 79
Develop a Simple Example Workflow 79
Create the Simple Workflow Example 81
Create the Schema of the Simple Workflow Example 82
Create the Simple Workflow Example Zones 84
Define the Parameters of the Simple Workflow Example 85
Define the Simple Workflow Example Decision Bindings 86
Bind the Action Elements of the Simple Workflow Example 87
Bind the Simple Workflow Example Scripted Task Elements 90
Define the Simple Workflow Example Exception Bindings 97
Set the Read-Write Properties for Attributes of the Simple Workflow Example 98
Set the Simple Workflow Example Parameter Properties 98
Set the Layout of the Simple Workflow Example Input Parameters Dialog Box 100
Validate and Run the Simple Workflow Example 101
4 VMware, Inc.
Develop a Complex Workflow 102
Create the Complex Workflow Example 103
Create a Custom Action for the Complex Workflow Example 104
Create the Schema of the Complex Workflow Example 105
Create the Complex Workflow Example Zones 107
Define the Parameters of the Complex Workflow Example 109
Define the Bindings for the Complex Workflow Example 109
Set the Complex Workflow Example Attribute Properties 119
Create the Layout of the Complex Workflow Example Input Parameters 119
Validate and Run the Complex Workflow Example 120
Contents
Scripting123
2
Orchestrator Elements that Require Scripting 123
Limitations of the Mozilla Rhino Implementation in Orchestrator 124
Using the Orchestrator Scripting API 124
Access the Scripting Engine from the Workflow Editor 125
Access the Scripting Engine from the Action or Policy Editor 126
Access the Orchestrator API Explorer 126
Use the Orchestrator API Explorer to Find Objects 126
Writing Scripts 127
Add Parameters to Scripts 129
Accessing the Orchestrator Server File System from JavaScript and Workflows 129
Accessing Java Classes from JavaScript 130
Accessing Operating System Commands from JavaScript 130
Exception Handling Guidelines 130
Orchestrator JavaScript Examples 131
Basic Scripting Examples 132
Email Scripting Examples 133
File System Scripting Examples 135
LDAP Scripting Examples 135
Logging Scripting Examples 136
Networking Scripting Examples 136
Workflow Scripting Examples 136
Developing Actions139
3
Reusing Actions 139
Access the Actions View 139
Components of the Actions View 140
Creating Actions 140
Create an Action 140
Find Elements That Implement an Action 141
Action Coding Guidelines 141
Use Action Version History 143
Restore Deleted Actions 143
Creating Resource Elements145
4
View a Resource Element 145
Import an External Object to Use as a Resource Element 146
VMware, Inc. 5
Developing with VMware vCenter Orchestrator
Edit the Resource Element Information and Access Rights 146
Save a Resource Element to a File 147
Update a Resource Element 147
Add a Resource Element to a Workflow 148
Add a Resource Element to a Web View 148
Creating Packages151
5
Create a Package 152
Set User Permissions on a Package 153
Creating Plug-Ins by Using Maven155
6
Create an Orchestrator Plug-In with Maven from an Archetype 155
Index157
6 VMware, Inc.
Developing with VMware vCenter Orchestrator
Developing with VMware vCenter Orchestrator provides information and instructions for developing custom
VMware® vCenter Orchestrator workflows and actions.
In addition, the documentation contains information about the Orchestrator elements that require scripting
and provides JavaScript examples. Developing with VMware vCenter Orchestrator also provides instructions
about how to create resources and packages.
Intended Audience
This information is intended for developers who want to create custom Orchestrator workflows and actions,
as well as custom building blocks.
VMware, Inc.
7
Developing with VMware vCenter Orchestrator
8 VMware, Inc.
Developing Workflows1
You develop workflows in the Orchestrator client interface. Workflow development involves using the
workflow editor, the built-in Mozilla Rhino JavaScript scripting engine, and the Orchestrator and vCenter
Server APIs.
Key Concepts of Workflows on page 11
n
Workflows consist of a schema, attributes, and parameters. The workflow schema is the main
component of a workflow as it defines all the workflow elements and the logical connections between
them. The workflow attributes and parameters are the variables that workflows use to transfer data.
Orchestrator saves a workflow token every time a workflow runs, recording the details of that specific
run of the workflow.
Phases in the Workflow Development Process on page 12
n
The process for developing a workflow involves a series of phases. You can follow a different
sequence of phases or skip a phase, depending on the type of workflow that you are developing. For
example, you can create a workflow without custom scripting.
Access Rights for the Orchestrator Client on page 12
n
By default, only members of the Orchestrator administrator LDAP group can access the Orchestrator
client.
VMware, Inc.
Testing Workflows During Development on page 13
n
You can test workflows at any point during the development process, even if you have not completed
the workflow or included an end element.
Creating and Editing a Workflow on page 13
n
You create workflows in the Orchestrator client and edit them in the workflow editor. The workflow
editor is the IDE of the Orchestrator client for developing workflows.
Provide General Workflow Information on page 15
n
You provide a workflow name and desription, define attributes and certain aspects of workflow
behavior, set the version number, check the signature, and set user permissions in the General tab in
the workflow editor.
Defining Attributes and Parameters on page 16
n
After you create a workflow, you must define the global attributes, input parameters, and output
parameters of the workflow.
Workflow Schema on page 19
n
A workflow schema is a graphical representation of a workflow that shows the workflow as a flow
diagram of interconnected workflow elements. The workflow schema defines the logical flow of a
workflow.
9
Developing with VMware vCenter Orchestrator
Obtaining Input Parameters from Users When a Workflow Starts on page 41
n
If a workflow requires input parameters, it opens a dialog box in which users enter the required input
parameter values when it runs. You can organize the content and layout, or presentation, of this dialog
box in Presentation tab in the workflow editor.
(Optional) Requesting User Interactions While a Workflow Runs on page 46
n
A workflow can sometimes require additional input parameters from an outside source while it runs.
These input parameters can come from another application or workflow, or the user can provide them
directly.
Calling Workflows Within Workflows on page 54
n
Workflows can call on other workflows during their run. A workflow can start another workflow
either because it requires the result of the other workflow as an input parameter for its own run, or it
can start a workflow and let it continue its own run independently. Workflows can also start a
workflow at a given time in the future, or start multiple workflows simultaneously.
Running a Workflow on a Selection of Objects on page 61
n
You can automate repetitive tasks by running a workflow on a selection of objects. For example, you
can create a workflow that takes a snapshot of all the virtual machines in a virtual machine folder, or
you can create a workflow that powers off all the virtual machines on a given host.
Developing Long-Running Workflows on page 63
n
A workflow in a waiting state consumes system resources because it constantly polls the object from
which it requires a response. If you know that a workflow will potentially wait for a long time before
it receives the response it requires, you can add long-running workflow elements to the workflow.
Configuration Elements on page 68
n
A configuration element is a list of attributes you can use to configure constants across a whole
Orchestrator server deployment.
Workflow User Permissions on page 69
n
Orchestrator defines levels of permissions that you can apply to groups to allow or deny them access
to workflows.
Validating Workflows on page 70
n
Orchestrator provides a workflow validation tool. Validating a workflow helps identify errors in the
workflow and checks that the data flows from one element to the next correctly.
Debugging Workflows on page 72
n
Orchestrator provides a workflow debugging tool. You can debug a workflow to inspect the input and
output parameters and attributes at the start of any activity, replace parameter or attribute values
during a workflow run in edit mode, and resume a workflow from the last failed activity.
Running Workflows on page 73
n
An Orchestrator workflow runs according to a logical flow of events.
Resuming a Failed Workflow Run on page 76
n
If a workflow fails, Orchestrator provides an option to resume the workflow run from the last failed
activity.
Generate Workflow Documentation on page 78
n
You can export documentation in PDF format about a workflow or a workflow folder that you select
at any time.
Use Workflow Version History on page 78
n
You can use version history to revert a workflow to a previously saved state. You can revert the
workflow state to an earlier or a later workflow version. You can also compare the differences between
the current state of the workflow and a saved version of the workflow.
10 VMware, Inc.
Restore Deleted Workflows on page 79
n
You can restore workflows that have been deleted from the workflow library.
Develop a Simple Example Workflow on page 79
n
Developing a simple example workflow demonstrates the most common steps in the workflow
development process.
Develop a Complex Workflow on page 102
n
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.
Key Concepts of Workflows
Workflows consist of a schema, attributes, and parameters. The workflow schema is the main component of
a workflow as it defines all the workflow elements and the logical connections between them. The workflow
attributes and parameters are the variables that workflows use to transfer data. Orchestrator saves a
workflow token every time a workflow runs, recording the details of that specific run of the workflow.
Workflow Parameters
Workflows receive input parameters and generate output parameters when they run.
Chapter 1 Developing Workflows
Input Parameters
Most workflows require a certain set of input parameters to run. An input parameter is an argument that the
workflow processes when it starts. The user, an application, another workflow, or an action passes input
parameters to a workflow for the workflow to process when it starts.
For example, if a workflow resets a virtual machine, the workflow requires as an input parameter the name
of the virtual machine.
Output Parameters
A workflow's output parameters represent the result from the workflow run. Output parameters can change
when a workflow or a workflow element runs. While workflows run, they can receive the output
parameters of other workflows as input parameters.
For example, if a workflow creates a snapshot of a virtual machine, the output parameter for the workflow
is the resulting snapshot.
Workflow Attributes
Workflow elements process data that they receive as input parameters, and set the resulting data as
workflow attributes or output parameters.
Read-only workflow attributes act as global constants for a workflow. Writable attributes act as a
workflow’s global variables.
You can use attributes to transfer data between the elements of a workflow. You can obtain attributes in the
following ways:
Define attributes when you create a workflow
n
Set the output parameter of a workflow element as a workflow attribute
n
Inherit attributes from a configuration element
n
VMware, Inc. 11
Developing with VMware vCenter Orchestrator
Workflow Schema
A workflow schema is a graphical representation that shows the workflow as a flow diagram of
interconnected workflow elements. The workflow schema is the most important element of a workflow as it
determines its logic.
Workflow Presentation
When users run a workflow, they provide the values for the input parameters of the workflow in the
workflow presentation. When you organize the workflow presentation, consider the type and number of
input parameters of the workflow.
Workflow Tokens
A workflow token represents a workflow that is running or has run.
A workflow is an abstract description of a process that defines a generic sequence of steps and a generic set
of required input parameters. When you run a workflow with a set of real input parameters, you receive an
instance of this abstract workflow that behaves according to the specific input parameters you give it. This
specific instance of a completed or a running workflow is called a workflow token.
Workflow Token Attributes
Workflow token attributes are the specific parameters with which a workflow token runs. The workflow
token attributes are an aggregation of the workflow's global attributes and the specific input and output
parameters with which you run the workflow token.
Phases in the Workflow Development Process
The process for developing a workflow involves a series of phases. You can follow a different sequence of
phases or skip a phase, depending on the type of workflow that you are developing. For example, you can
create a workflow without custom scripting.
Generally, you develop a workflow through the following phases.
1Create a new workflow or create a duplicate of an existing workflow from the standard library.
2Provide general information about the workflow.
3Define the input parameters of the workflow.
4Lay out and link the workflow schema to define the logical flow of the workflow.
5Bind the input and output parameters of each schema element to workflow attributes.
6Write the necessary scripts for scriptable task elements or custom decision elements.
7Create the workflow presentation to define the layout of the input parameters dialog box that the users
see when they run the workflow.
8Validate the workflow.
Access Rights for the Orchestrator Client
By default, only members of the Orchestrator administrator LDAP group can access the Orchestrator client.
The Orchestrator administrator can grant access to the Orchestrator client to other user groups by setting at
least the View permission.
12 VMware, Inc.
To allow you to access the Orchestrator client, the administrator must either add you to the Orchestrator
administrator LDAP group, or set View, Inspect, Edit, Execute, or Admin permissions to a group that you
are a member of.
Testing Workflows During Development
You can test workflows at any point during the development process, even if you have not completed the
workflow or included an end element.
By default, Orchestrator checks that a workflow is valid before you can run it. You can deactivate automatic
validation during workflow development, to run partial workflows for testing purposes.
NOTE Do not forget to reactivate automatic validation when you finish developing the workflow.
Procedure
1In the Orchestrator client menu, click Tools > User preferences.
2Click the Workflows tab.
3Deselect the Validate workflow before running it check box.
You deactivated automatic workflow validation.
Chapter 1 Developing Workflows
Creating and Editing a Workflow
You create workflows in the Orchestrator client and edit them in the workflow editor. The workflow editor
is the IDE of the Orchestrator client for developing workflows.
You open the workflow editor by editing an existing workflow.
Create a Workflow on page 13
n
You can create workflows in the workflows hierarchical list of the Orchestrator client.
Edit a Workflow on page 14
n
You edit a workflow to make changes to an existing workflow or to develop a new empty workflow.
Edit a Workflow from the Standard Library on page 14
n
Orchestrator provides a standard library of workflows that you can use to automate operations in the
virtual infrastructure. The workflows in the standard library are locked in the read-only state.
Workflow Editor Tabs on page 15
n
The workflow editor consists of tabs on which you edit the components of the workflows.
Create a Workflow
You can create workflows in the workflows hierarchical list of the Orchestrator client.
Procedure
1Click the Workflows view.
2(Optional) Right-click the root of the workflows hierarchical list, or a folder in the list, and select Add
folder to create a new workflow folder.
3(Optional) Type the name of the new folder.
4Right-click the new folder or an existing folder and select New workflow.
5Name the new workflow and click OK.
A new empty workflow is created in the folder that you chose.
VMware, Inc. 13
Developing with VMware vCenter Orchestrator
What to do next
You can edit the workflow.
Edit a Workflow
You edit a workflow to make changes to an existing workflow or to develop a new empty workflow.
Procedure
1Click the Workflows view.
2Expand the workflows hierarchical list to navigate to the workflow that you want to edit.
3To open the workflow for editing, right-click the workflow and select Edit.
The workflow editor opens the workflow for editing.
Edit a Workflow from the Standard Library
Orchestrator provides a standard library of workflows that you can use to automate operations in the
virtual infrastructure. The workflows in the standard library are locked in the read-only state.
To edit a workflow from the standard library, you must create a duplicate of that workflow. You can edit
duplicate workflows or custom workflows.
Procedure
1Click the Workflows view.
2(Optional) Right-click the root of the hierarchical list of workflow folders and select New folder to
create a folder to contain the workflow to edit.
3Expand the Library hierarchical list of standard workflows to navigate to the workflow to edit.
4Right-click the workflow to edit.
The Edit option is dimmed. The workflow is read-only.
5Right-click the workflow and select Duplicate workflow.
6Provide a name for the duplicate workflow.
By default, Orchestrator names the duplicate workflow Copy of workflow_name.
7Click the Workflow folder value to search for a folder in which to save the duplicate workflow.
Select the folder you created in Step 2. If you did not create a folder, select a folder that is not in the
library of standard workflows.
8Click Yes or No to copy the workflow version history to the duplicate.
OptionDescription
Yes
No
The version history of the original workflow is replicated in the duplicate.
The version of the duplicate reverts to 0.0.0.
9Click Duplicate to duplicate the workflow.
10 Right-click the duplicate workflow and select Edit.
The workflow editor opens. You can edit the duplicate workflow.
You duplicated a workflow from the standard library. You can edit the duplicate workflow.
14 VMware, Inc.
Chapter 1 Developing Workflows
Workflow Editor Tabs
The workflow editor consists of tabs on which you edit the components of the workflows.
Table 1‑1. Workflow Editor Tabs
TabDescription
GeneralEdit the workflow name, provide a description of what the
workflow does, set the version number, see the user
permissions, define the behavior of the workflow if the
Orchestrator server restarts, and define the workflow's
global attributes.
InputsDefine the parameters that the workflow requires when it
runs. These input parameters are the data that the
workflow processes. The workflow's behavior changes
according to these parameters.
OutputsDefine the values that the workflow generates when it
completes its run. Other workflows or actions can use these
values when they run.
SchemaBuild the workflow. You build the workflow by dragging
workflow schema elements from the workflow palette on
the left side of the Schema tab. Clicking an element in the
schema diagram allows you to define and edit the
element's behavior in the bottom half of the Schema tab.
PresentationDefine the layout of the user input dialog box that appears
when users run a workflow. You arrange the parameters
and attributes into presentation steps and groups to ease
identification of parameters in the input parameters dialog
box. You define the constraints on the input parameters
that users can provide in the presentation by setting the
parameter properties.
Parameters ReferencesView which workflow elements consume the attributes and
parameters in the logical flow of the workflow. This tab
also shows the constraints on these parameters and
attributes that you define in the Presentation tab.
Workflow TokensView details about each workflow run. This information
includes the workflow's status, the user who ran it, the
business status of the current element, and the time and
date when the workflow started and ended.
EventsView information about each individual event that occurs
when the workflow runs. This information includes a
description of the event, the user who triggered it, the type
and origin of the event, and the time and date when it
occurred.
PermissionsSet the permissions to interact with the workflow for users
or groups of users.
Provide General Workflow Information
You provide a workflow name and desription, define attributes and certain aspects of workflow behavior,
set the version number, check the signature, and set user permissions in the General tab in the workflow
editor.
Prerequisites
Open a workflow for editing in the workflow editor.
VMware, Inc. 15
Developing with VMware vCenter Orchestrator
Procedure
1Click the General tab in the workflow editor.
2Click the Version digits to set a version number for the workflow.
The Version Comment dialog box opens.
3Type a comment for this version of the workflow and click OK.
For example, type Initial creation if you just created the workflow.
A new version of the workflow is created. You can later revert the state of the workflow to this version.
4Define how the workflow behaves if the Orchestrator server restarts by setting the Server restart
behavior value.
Leave the default value of Resume workflow run to make the workflow resume at the point at
n
which its run was interrupted when the server stopped.
Click Resume workflow run and select Do not resume workflow run (set as FAILED) to prevent
n
the workflow from restarting if the Orchestrator server restarts.
Prevent the workflow from restarting if the workflow depends on the environment in which it runs. For
example, if a workflow requires a specific vCenter Server and you reconfigure Orchestrator to connect
to a different vCenter Server, restarting the workflow after you restart the Orchestrator server causes
the workflow to fail.
5Type a detailed description of the workflow in the Description text box.
6Click Save at the bottom of the workflow editor.
A green message at the bottom left of the workflow editor confirms that you saved your changes.
You defined aspects of the workflow behavior, set the version, and defined the operations that users can
perform on the workflow.
What to do next
You must define the workflow attributes and parameters.
Defining Attributes and Parameters
After you create a workflow, you must define the global attributes, input parameters, and output
parameters of the workflow.
Workflow attributes store data that workflows process internally. Workflow input parameters are data
provided by an outside source, such as a user or another workflow. Workflow output parameters are data
that the workflow delivers when it finishes its run.
Define Workflow Parameters on page 17
n
You can use input and output parameters to pass data into and out of the workflow.
Define Workflow Attributes on page 17
n
Workflow attributes are the data that workflows process.
Attribute and Parameter Naming Restrictions on page 18
n
You can use OGNL expressions to determine input parameters dynamically when a workflow runs.
The Orchestrator OGNL parser uses certain keywords during OGNL processing that you cannot use
in workflow attribute or parameter names.
16 VMware, Inc.
Chapter 1 Developing Workflows
Define Workflow Parameters
You can use input and output parameters to pass data into and out of the workflow.
You can define the parameters of a workflow in the workflow editor. The input parameters are the initial
data that the workflow requires to run. Users provide the values for the input parameters when they run the
workflow. The output parameters are the data the workflow returns when it completes its run.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the appropriate tab in the workflow editor.
Click Inputs to create input parameters.
n
Click Outputs to create output parameters.
n
2Right-click inside the parameters tab and select Add parameter.
3Click the parameter name to change it.
The default name is arg_in_X for input parameters and arg_out_X for output parameters, where X is a
number.
4(Optional) To change the value of the parameter type, click the value and select one from the list of
available values.
The value for the parameter type is String by default.
5Add a description for the parameter in the Description text box.
6(Optional) If you decide that the parameter should be an attribute rather than a parameter, right-click
the parameter and select Move as attribute to change the parameter into an attribute.
You have defined an input or output parameter for the workflow.
What to do next
After you define the workflow's parameters, build the workflow schema.
Define Workflow Attributes
Workflow attributes are the data that workflows process.
NOTE You can also define workflow attributes in the workflow schema elements when you create the
workflow schema. It is often easier to define an attribute when you create the workflow schema element that
processes it.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the General tab in the workflow editor.
The attributes pane appears in the bottom half of the General tab.
2Right-click in the attributes pane and select Add Attribute.
A new attribute appears in the attributes list, with String as its default type.
VMware, Inc. 17
Developing with VMware vCenter Orchestrator
3Click the attribute name to change it.
The default name is attX, where X is a number.
NOTE Workflow attributes must not have the same name as any of the workflow's parameters.
4Click the attribute type to select a new type from a list of possible values.
The default attribute type is String.
5Click the attribute value to set or select a value according to the attribute type.
6Add a description of the attribute in the Description text box.
7If the attribute is a constant rather than a variable, click the check box to the left of the attribute name to
make its value read-only.
The lock icon identifies the column of read-only check boxes.
8(Optional) If you decide that the attribute should be an input or output parameter rather than an
attribute, right-click the attribute and select Move as INPUT/OUTPUT parameter to change the
attribute into a parameter.
You defined an attribute for the workflow.
What to do next
You can define the workflow's input and output parameters.
Attribute and Parameter Naming Restrictions
You can use OGNL expressions to determine input parameters dynamically when a workflow runs. The
Orchestrator OGNL parser uses certain keywords during OGNL processing that you cannot use in
workflow attribute or parameter names.
Using a reserved OGNL keyword as a prefix to an attribute name does not break OGNL processing. For
example, you can name a parameter trueParameter. Reserved keywords are not case-sensitive.
IMPORTANT The use of OGNL expressions in workflow presentations is deprecated as of Orchestrator 4.1.
Using OGNL expressions in workflow presentations is not supported in releases of Orchestrator later than
4.1.
You cannot use the following keywords in workflow attribute and parameter names.
18 VMware, Inc.
Chapter 1 Developing Workflows
Table 1‑2. Forbidden Keywords in Attribute and Parameter Names
A workflow schema is a graphical representation of a workflow that shows the workflow as a flow diagram
of interconnected workflow elements. The workflow schema defines the logical flow of a workflow.
View Workflow Schema on page 20
n
You view the schema of a workflow in the Schema tab for that workflow in the Orchestrator client.
Building a Workflow in the Workflow Schema on page 20
n
Workflow schemas consist of a sequence of schema elements. Workflow schema elements are the
building blocks of the workflow, and can represent decisions, scripted tasks, actions, exception
handlers, or even other workflows.
Schema Elements on page 23
n
The workflow editor presents the workflow schema elements in menus in the Schema tab.
Schema Element Properties on page 26
n
Schema elements have properties that you can define and edit in the Schema tab of the workflow
palette.
Links and Bindings on page 29
n
Links between elements determine the logical flow of the workflow. Bindings populate elements with
data from other elements by binding input and output parameters to workflow attributes.
Decisions on page 34
n
Workflows can implement decision functions that define different courses of action according to a
Boolean true or false statement.
Exception Handling on page 37
n
Exception handling catches any errors that occur when a schema element runs. Exception handling
defines how the schema element behaves when the error occurs.
VMware, Inc. 19
Developing with VMware vCenter Orchestrator
Foreach Elements and Composite Types on page 38
n
You can insert a Foreach element in the workflow that you develop to run a subworkflow that iterates
over arrays of parameters or attributes. To improve the understanding and readability of the
workflow, you can group several workflow parameters of different types that are logically connected
in a single type that is called a composite type.
View Workflow Schema
You view the schema of a workflow in the Schema tab for that workflow in the Orchestrator client.
Procedure
1Navigate to a workflow in the workflow hierarchical list.
2Click the workflow.
Information about that workflow appears in the right pane.
3Select the Schema tab in the right pane.
You see the graphical representation of the workflow.
Building a Workflow in the Workflow Schema
Workflow schemas consist of a sequence of schema elements. Workflow schema elements are the building
blocks of the workflow, and can represent decisions, scripted tasks, actions, exception handlers, or even
other workflows.
You build workflows in the workflow editor by dragging schema elements from the workflow palette on the
left of the workflow editor into the workflow schema diagram.
Edit a Workflow Schema
You build a workflow by creating a sequence of schema elements that define the logical flow of the
workflow.
By default, all elements in the workflow schema are linked. Links between the elements are represented as
arrows. When you add a new element to the workflow schema, you must drag it onto an arrow or an
existing workflow element that is not linked to a next element. After you add workflow elements to the
schema, you can delete existing links and create new links to define the logical flow of the workflow.
You can copy an element or a selection of elements from the schema of an existing workflow to the schema
of the workflow that you are editing. See “Copy Workflow Schema Elements,” on page 21.
A workflow schema must have at least one End workflow element, but it can have several.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the Schema tab in the workflow editor.
2Drag a schema element from the Generic menu in the left pane, to the workflow schema.
3Double-click the element you dragged to the workflow schema, type an appropriate name, and press
Enter.
You must provide elements with unique names in the context of the workflow.
You cannot rename Waiting timer, Waiting event, End workflow, or Throw exception elements.
4(Optional) Right-click an element in the schema and select Copy.
20 VMware, Inc.
Chapter 1 Developing Workflows
5(Optional) Right-click at an appropriate position in the schema and select Paste.
Copying and pasting existing schema elements is a quick way of adding similar elements to the schema.
All of the settings of the copied element appear in the pasted element, except for the business state.
Adjust the pasted element settings accordingly.
6Drag schema elements from the Basic, Log, or Network menus to the workflow schema.
You can edit the names of the elements in the Basic, Log, or Network menus. You cannot edit their
scripting.
7Drag schema elements from the Generic menu to the workflow schema.
When you drag actions or workflows to the workflow schema, a dialog box in which you can search for
the action or workflow to insert appears.
8In the Filter text box, type the name or part of the name of the workflow or action to insert in the
workflow.
The workflows or actions that match the search appear in the dialog box.
9Double-click a workflow or action to select it.
You inserted the workflow or action in the workflow schema.
10 Repeat this procedure until you have added all of the required schema elements to the workflow
schema.
What to do next
Define the properties of the elements you added to the workflow schema and link and bind them all
together.
Copy Workflow Schema Elements
You can copy an element or a selection of elements from the schema of an existing workflow to the schema
of the workflow that you are editing.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the Schema tab in the workflow editor.
2From the left pane, select the workflow from which you want to copy schema elements.
Click All Workflows and select the workflow from the hierarchical list of workflows.
n
Type the name of the workflow in the search text box and press Enter.
n
3Right-click the selected workflow and select Open.
A window displaying the workflow's properties appears.
4In the workflow's window, click the Schema tab.
5Select one or more workflow schema elements, right-click the selection, and select Copy.
6In the Schema tab of the workflow that you are editing, right-click and select Paste.
You copied workflow schema elements from one workflow to another.
What to do next
You must link and bind the copied schema elements to the existing workflow schema.
VMware, Inc. 21
Developing with VMware vCenter Orchestrator
Promote Input and Output Parameters
You can promote the input and output parameters of a child element to the parent workflow.
You can promote a custom attribute that you have defined on the General tab of the workflow editor. You
can promote predefined attributes only by replacing an input parameter with an attribute of matching type.
NOTE If you promote a predefined attribute and assign a custom value to it, a duplicate attribute is created
to avoid overwriting the value of the original attribute. The duplicate attribute retains the name of the
original attribute and increments the numerical value at the end of the attribute's name.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the Schema tab in the workflow editor.
2Add a workflow or an action element to the workflow schema.
The following notification appears at the top of the schema pane.
Do you want to add the activity's parameters as input/output to the current workflow?
3On the notification, click Setup.
A pop-up window with the available options appears.
4Select the mapping type for each input parameter.
OptionDescription
Input
Skip
Value
The argument is mapped to an input workflow parameter.
The argument is mapped to a NULL value.
The argument is mapped to an attribute with a value that you can set from
the Value column.
5Select the mapping type for each output parameter.
OptionDescription
Output
Skip
Local variable
The argument is mapped to an output workflow parameter.
The argument is mapped to a NULL value.
The argument is mapped to an attribute.
6Click Promote.
You promoted parameters to the parent workflow.
Modify Search Results
You use the Search text box to find elements such as workflows or actions. If a search returns a partial
result, you can modify the number of results that the search returns.
When you use the search for an element, a green message box indicates that the search lists all the results. A
yellow message box indicates that the search lists only partial results.
Procedure
1(Optional) If you are editing a workflow in the workflow editor, click Save and Close to exit the editor.
22 VMware, Inc.
2From the Orchestrator client menu, select Tools > User preferences.
3Click the General tab.
4Type the number of results for searches to return in the Finder Maximum Size text box.
5Click Save and Close in the User Preferences dialog box.
You modified the number of results that searches return.
Schema Elements
The workflow editor presents the workflow schema elements in menus in the Schema tab.
You can use the schema elements available in the Schema tab to build a workflow.
Table 1‑3. Schema Elements and Icons
Schema Element
NameDescriptionIcon
Start WorkflowThe starting point of the workflow. All
workflows contain this element and it
cannot be removed from the workflow
schema. A workflow can have only one
start element. Start elements have one
output and no input.
Scriptable taskGeneral purpose tasks you define. You
write JavaScript functions in this element.
Chapter 1 Developing Workflows
Location in Workflow
Editor
Always present in the
Schema tab
Generic workflow palette
DecisionBoolean function. Decision elements take
one input parameter and return either
true or false. The type of decision that
the element makes, depends on the type of
the input parameter. Decision elements
allow the workflow to branch into different
directions, depending on the input
parameter the decision element receives. If
the received input parameter corresponds
to an expected value, the workflow
continues along a certain route. If the input
is not the expected value, the workflow
continues on an alternative path.
Custom decisionBoolean function. Custom decisions can
take several input parameters and process
them according to custom scripts. Returns
either true or false.
Decision activityBoolean function. A decision activity runs a
workflow and binds its output parameters
to a true or a false path.
Generic workflow palette
Generic workflow palette
Generic workflow palette
VMware, Inc. 23
Developing with VMware vCenter Orchestrator
Table 1‑3. Schema Elements and Icons (Continued)
Schema Element
NameDescriptionIcon
User interactionAllows users to pass new input parameters
into the workflow. You can design how the
user interaction element presents the
request for input parameters and place
constraints on the parameters that users
can provide. You can set permissions to
determine which users can provide the
input parameters. When a running
workflow arrives at a user interaction
element, it enters a passive state and
prompts the user for input. You can set a
timeout period within which the users can
answer. The workflow resumes according
to the data the user passes to it, or returns
an exception if the timeout period expires.
While it is waiting for the user to respond,
the workflow token is in the waiting state.
Waiting timerUsed by long-running workflows. When a
running workflow arrives at a Waiting
Timer element it enters a passive state. You
set an absolute date at which the workflow
resumes running. While it is waiting for
the date, the workflow token is in the
waiting-signal state.
Waiting eventUsed in long-running workflows. When a
running workflow arrives at a Waiting
Event element it enters a passive state. You
define a trigger event that the workflow
awaits before it resumes running. While it
is waiting for the event, the workflow
token is in the waiting-signal state.
End workflowThe end point of the workflow. You can
have multiple end elements in a schema, to
represent the different possible outcomes
of the workflow. End elements have one
input with no output. When a workflow
reaches an End Workflow element, the
workflow token enters the completed
state.
Thrown exceptionCreates an exception and stops the
workflow. Multiple occurrences of this
element can be present in the workflow
schema. Exception elements have one input
parameter, which can only be of the String
type, and have no output parameter. When
a workflow reaches an Exception element,
the workflow token enters the failed
state.
Workflow noteAllows you to annotate sections of the
workflow. You can stretch notes to
delineate sections of the workflow. You can
change the background color of the notes
to differentiate between different workflow
zones. Workflow notes provide visual
information only, to help you understand
the schema.
Location in Workflow
Editor
Generic workflow palette
Generic workflow palette
Generic workflow palette
Generic workflow palette
Generic workflow palette
Generic workflow palette
24 VMware, Inc.
Table 1‑3. Schema Elements and Icons (Continued)
Schema Element
NameDescriptionIcon
Action elementCalls on an action from the Orchestrator
libraries of actions. When a workflow
reaches an action element, it calls and runs
that action.
Workflow elementStarts another workflow synchronously. As
soon as a workflow reaches a workflow
element in its schema, it runs that
workflow as part of its own process. The
original workflow does not continue until
the called workflow completes its run.
Foreach elementRuns a workflow on every element from an
array. For example, you can run the
Raname Virtual Machine workflow on all
virtual machines from a folder.
Asynchronous
workflow
Starts a workflow asynchronously. When a
workflow reaches an asynchronous
workflow element, it starts that workflow
and continues its own run. The original
workflow does not wait for the called
workflow to finish before continuing.
Schedule workflowCreates a task to run the workflow at a set
time, then the workflow continues its run.
Chapter 1 Developing Workflows
Location in Workflow
Editor
Generic workflow palette
Generic workflow palette
Generic workflow palette
Generic workflow palette
Generic workflow palette
VMware, Inc. 25
Developing with VMware vCenter Orchestrator
Table 1‑3. Schema Elements and Icons (Continued)
Schema Element
NameDescriptionIcon
Nested workflowsStarts several workflows simultaneously.
You can choose to nest local workflows
and remote workflows that are in a
different Orchestrator server. You can also
run workflows with different credentials.
The workflow waits until all the nested
workflows complete before it continues its
run.
Pre-Defined TaskNoneditable scripted elements that
perform standard tasks that workflows
commonly use. The following tasks are
predefined:
Basic
Sleep
n
Change credential
n
Wait until date
n
Wait for custom event
n
Increase counter
n
Decrease counter
n
Log
System log
n
System warning
n
System error
n
Server log
n
Server warning
n
Server error
n
System+server log
n
System+server warning
n
System+server error
n
Network
HTTP post
n
HTTP get
n
Send custom event
n
Location in Workflow
Editor
Generic workflow palette
Basic, Log, and Network
workflow palette
Schema Element Properties
Schema elements have properties that you can define and edit in the Schema tab of the workflow palette.
Edit the Global Properties of a Schema Element
You define the global properties of a schema element in the element's Info tab.
Prerequisites
Verify that the Schema tab of the workflow editor contains elements.
Procedure
1Click the Schema tab in the workflow editor.
2
Select an element to edit by clicking the Edit icon ().
A dialog box that lists the properties of the element appears.
3Click the Info tab.
26 VMware, Inc.
Chapter 1 Developing Workflows
4Provide a name for the schema element in the Name text box.
This is the name that appears in the schema element in the workflow schema diagram.
5From the Interaction drop-down menu, select a description.
The Interaction property allows you to select between standard descriptions of how this element
interacts with objects outside of the workflow. This property is for information only.
6(Optional) Provide a business status description in the Business Status text box.
The Business Status property is a brief description of what this element does. When a workflow is
running, the workflow token shows the Business Status of each element as it runs. This feature is useful
for tracking workflow status.
7(Optional) In the Description text box, type a description of the schema element.
Schema Element Properties Tabs
You access the properties of a schema element by clicking on an element that you have dragged into the
workflow schema. The properties of the element appear in tabs at the bottom of the workflow editor.
Different schema elements have different properties tabs.
Table 1‑4. Properties Tabs per Schema Element
Schema Element Property TabDescriptionApplies to Schema Element Type
AttributesAttributes that elements require
from an external source, such as
the user, an event, or a timer.
The attributes can be a timeout
limit, a time and date, a trigger,
or user credentials.
DecisionDefines the decision statement.
The input parameter that the
decision element receives either
matches or does not match the
decision statement, resulting
two possible courses of action.
End WorkflowStops the workflow, either
because the workflow
completed successfully, or
because it encountered an error
and returned an exception.
ExceptionHow this schema element
behaves in the event of an
exception.
External InputsInput parameters that the user
must provide at a certain
moment while the workflow
runs.
User Interaction
n
Waiting Event
n
Waiting Timer
n
Decision
End
n
Exception
n
Action
n
Asynchronous Workflow
n
Exception
n
Nested Workflows
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
User Interaction
n
Waiting Event
n
Waiting Timer
n
Workflow
n
User Interaction
VMware, Inc. 27
Developing with VMware vCenter Orchestrator
Table 1‑4. Properties Tabs per Schema Element (Continued)
Schema Element Property TabDescriptionApplies to Schema Element Type
INThe IN binding for this
InfoThe schema element's general
OUTThe OUT binding for this
PresentationDefines the layout of the input
ScriptingShows the JavaScript function
Visual BindingShows a graphical
WorkflowsSelects the workflows to nest.Nested Workflows
element. The IN binding
defines the way in which the
schema element receives input
from the element that precedes
it in the workflow.
properties and description. The
information the Info tab
displays depends on the type of
schema element.
element. The OUT binding
defines the way in which the
schema element binds output
parameters to the workflow
attributes or to the workflow
output parameters.
parameters dialog box the user
sees if the workflow needs user
input while it is running.
that defines the behavior of this
schema element. For
Asynchronous Workflow,
Schedule Workflow, and Action
elements this scripting is readonly. For scriptable task and
custom decision elements, you
edit the JavaScript in this tab.
representation of how the
parameters and attributes of
this schema element bind to the
parameters and attributes of the
elements that come before and
after it in the workflow. This is
another representation of the
element's IN and OUT
bindings.
Action
n
Asynchronous Workflow
n
Custom Decision
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
Workflow
n
Action
n
Asynchronous Workflow
n
Custom Decision
n
Decision
n
Nested Workflows
n
Note
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
User Interaction
n
Waiting Event
n
Waiting Timer
n
Workflow
n
Action
n
Asynchronous Workflow
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
Workflow
n
User Interaction
Action
n
Asynchronous Workflow
n
Custom Decision
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
Action
n
Asynchronous Workflow
n
Predefined Task
n
Schedule Workflow
n
Scriptable Task
n
Workflow
n
28 VMware, Inc.
Chapter 1 Developing Workflows
Links and Bindings
Links between elements determine the logical flow of the workflow. Bindings populate elements with data
from other elements by binding input and output parameters to workflow attributes.
To understand links and bindings, you must understand the difference between the logical flow of a
workflow and the data flow of a workflow.
Logical Flow of a Workflow
The logical flow of a workflow is the progression of the workflow from one element to the next in the
schema as the workflow runs. You define the logical flow of the workflow by linking elements in the
schema.
The standard path is the path that the workflow takes through the logical flow if all elements run as
expected. The exception path is the path that the workflow takes through the logical flow if an element does
not run as expected.
Different styles of arrows in the workflow schema denote the different paths that the workflow can take
through its logical flow.
A blue arrow denotes the standard path that the workflow takes from one element to the next.
n
A green arrow denotes the path that the workflow takes if a Boolean decision element returns true.
n
A red dotted arrow denotes the path that the workflow takes if a Boolean decision element returns
n
false.
A red dashed arrow denotes the exception path that the workflow takes if a workflow element does not
n
run correctly.
The following figure shows an example workflow schema that demonstrates the different paths that
workflows can take.
Figure 1‑1. Different Workflow Paths Through the Logical Flow of the Workflow
VMware, Inc. 29
Developing with VMware vCenter Orchestrator
This example workflow can take the following paths through its logical flow.
Standard path, true decision result, no exceptions.
dThe workflow ends successfully in the completed state.
Standard path, false decision result, no exceptions.
n
aThe decision element returns false.
bThe operation the scriptable task element defines runs successfully.
cThe sendHtmlEmail action runs successfully.
dThe workflow ends successfully in the completed state.
true decision result, exception.
n
aThe decision element returns true.
bThe SnapVMsInResourcePool workflow encounters an error.
cThe workflow returns an exception and stops in the failed state.
false decision result, exception.
n
aThe decision element returns false.
bThe operation the Scriptable task element defines encounters an error.
cThe workflow returns an exception and stops in the failed state.
Element Links
Links connect schema elements and define the logical flow of the workflow from one element to the next.
Elements can usually set only one outgoing link to another element in the workflow and one exception link
to an element that defines its exception behavior. The outgoing link defines the standard path of the
workflow. The exception link defines the exception path of the workflow. In most cases, a single schema
element can receive incoming standard path links from multiple elements.
The following elements are exceptions to the preceding statements.
The Start Workflow element cannot receive incoming links and has no exception link.
n
Exception elements can receive multiple incoming exception links, and have no outgoing or exception
n
links.
Decision elements have two outgoing links that define the paths the workflow takes depending on the
n
decision's true or false result. Decisions have no exception link.
End Workflow elements cannot have outgoing links or exception links.
n
Create Standard Path Links
Standard path links determine the normal run of the workflow.
When you link one element to another, you always link the elements in the order in which they run in the
workflow. You always start from the element that runs first to create a link between two elements.
Prerequisites
Open a workflow for editing in the workflow editor.
n
30 VMware, Inc.
Chapter 1 Developing Workflows
Verify that the Schema tab of the workflow editor contains elements.
n
Procedure
1Place the pointer on the element that you want to connect to another element.
A blue and a red arrow appear on the element's right.
2Place the pointer on the blue arrow.
The blue arrow enlarges.
3Left-click the blue arrow, hold down the left mouse button, and move the pointer to the target element.
A blue arrow appears between the two elements and a green rectangle appears around the target
element.
4Release the left mouse button.
The blue arrow remains between the two elements.
A standard path now links the elements.
What to do next
The elements are joined, but you have not defined the data flow. You must define the IN and OUT bindings
to bind incoming and outgoing data to workflow attributes.
Data Flow of a Workflow
The data flow of a workflow is the manner in which workflow element input and output parameters bind to
workflow attributes as each element of the workflow runs. You define the data flow of a workflow by using
schema element bindings.
When an element in the workflow schema runs, it requires data in the form of input parameters. It takes the
data for its input parameters by binding to a workflow attribute that you set when you create the workflow,
or by binding to an attribute that a preceding element in the workflow set when it ran.
The element processes the data, possibly transforms it, and generates the results of its run in the form of
output parameters. The element binds its resulting output parameters to new workflow attributes that it
creates. Other elements in the schema can bind to these new workflow attributes as their input parameters.
The workflow can generate the attributes as its output parameters at the end of its run.
The following figure shows a very simple workflow. The blue arrows represent the element linking and the
logical flow of the workflow. The red lines show the data flow of the workflow.
VMware, Inc. 31
Developing with VMware vCenter Orchestrator
Figure 1‑2. Example of Workflow Data Flow
The data flows through the workflow as follows.
1The workflow starts with input parameters a and b.
2The first element processes parameter a and binds the result of the processing to workflow attribute c.
3The first element processes parameter b and binds the result of the processing to workflow attribute d.
4The second element takes workflow attribute c as an input parameter, processes it, and binds the
resulting output parameter to workflow attribute e.
5The second element takes workflow attribute d as an input parameter, processes it, and generates
output parameter f.
6The workflow ends and generates workflow attribute f as its output parameter, the result of its run.
32 VMware, Inc.
Chapter 1 Developing Workflows
Element Bindings
You must bind all workflow element input and output parameters to workflow attributes. Bindings set data
in the elements, and define the output and exception behavior of the elements. Links define the logical flow
of the workflow, whereas bindings define the data flow.
To set data in an element, generate output parameters from the element after processing, and handle any
errors that might occur when the element runs, you must set the element binding.
IN bindings
Set a schema element's incoming data. You bind the element's local input
parameters to source workflow attributes. The IN tab lists the element's
input parameters in the Local Parameter column. The IN tab lists the
workflow attributes to which the local parameter binds in the Source
Parameter column. The tab also displays the parameter type and a
description of the parameter.
OUT bindings
Change workflow attributes and generate output parameters when an
element finishes its run. The OUT tab lists the element's output parameters
in the Local Parameter column. The OUT tab lists the workflow attributes to
which the local parameter binds in the Source Parameter column. The tab
also displays the parameter type and a description of the parameter.
Exception bindings
Link to exception handlers if the element encounters an exception when it
runs.
IN bindings read values from the bound source parameter. OUT bindings write values into the bound source
parameter.
You must use IN bindings to bind every attribute or input parameter you use in a schema element to a
workflow attribute. If the element changes the values of the input parameters that it receives when it runs,
you must bind them to a workflow attribute by using an OUT binding. Binding the element's output
parameters to workflow elements lets other elements that follow it in the workflow schema to take those
output parameters as their input parameters.
A common mistake when creating workflows is to not bind output parameter values to reflect the changes
that the element makes to the workflow attributes.
IMPORTANT When you add an element that requires input and output parameters of a type that you have
already defined in the workflow, Orchestrator sets the bindings to these parameters. You must verify that
the parameters that Orchestrator binds are correct, in case the workflow defines different parameters of the
same type to which the element can bind.
Define Element Bindings
After you link elements to create the logical flow of the workflow, you define element bindings to define
how each element processes the data it receives and generates.
Prerequisites
Verify that you have a workflow schema in the Schema tab of the workflow editor, and that you have
created links between the elements.
Procedure
1
Click the Edit icon (
A dialog box that lists the properties of the element appears.
VMware, Inc. 33
) of the element on which to set the bindings.
Developing with VMware vCenter Orchestrator
2Click the IN tab.
The contents of the IN tab depend on the type of element you selected.
If you selected a predefined task, workflow, or action element, the IN tab lists the possible local
n
input parameters for that type of element, but the binding is not set.
If you selected another type of element, you can select from a list of input parameters and
n
attributes you already defined for the workflow by right-clicking in the IN tab and selecting Bind
to workflow parameter/attribute.
If the required attribute does not exist yet, you can create it by right-clicking in the IN tab and
n
selecting Bind to workflow parameter/attribute > Create parameter/attribute in workflow.
3If an appropriate parameter exists, choose an input parameter to bind, and click the Not set button in
the Source Parameter text box.
A list of possible source parameters and attributes to bind to appears.
4Choose a source parameter to bind to the local input parameter from the list proposed.
5(Optional) If you have not defined the source parameter to which to bind, you can create it by clicking
the Create parameter/attribute in workflow link in the parameter selection dialog box.
6Click the OUT tab.
The contents of the OUT tab depend on the type of element you selected.
If you selected a predefined task, workflow, or action element, the OUT tab lists the possible local
n
output parameters for that type of element, but the binding is not set.
If you selected another type of element, you can select from a list of output parameters and
n
attributes you defined for the workflow by right-clicking in the OUT tab and selecting Bind to
workflow parameter/attribute.
If the required attribute does not exist, you can create it by right-clicking in the IN tab and selecting
n
Bind to workflow parameter/attribute > Create parameter/attribute in workflow.
7Choose a parameter to bind.
8Click the Source Parameter > Not set button.
9Choose a source parameter to bind to the input parameter.
10 (Optional) If you did not define the parameter to which to bind, you can create it by clicking the Create
parameter/attribute in workflow button in the parameter selection dialog box.
You defined the input parameters that the element receives and the output parameters that it generates, and
bound them to workflow attributes and parameters.
What to do next
You can create forks in the path of the workflow by defining decisions.
Decisions
Workflows can implement decision functions that define different courses of action according to a Boolean
true or false statement.
Decisions are forks in the workflow. Workflow decisions are made according to inputs provided by you, by
other workflows, by applications, or by the environment in which the workflow is running. The value of the
input parameter that the decision element receives determines which branch of the fork the workflow takes.
For example, a workflow decision might receive the power status of a given virtual machine as its input. If
the virtual machine is powered on, the workflow takes a certain path through its logical flow. If the virtual
machine is powered off, the workflow takes a different path.
34 VMware, Inc.
Chapter 1 Developing Workflows
Decisions are always Boolean functions. The only possible outcomes for each decision are true or false.
Custom Decisions
Custom decisions differ from standard decisions in that you define the decision statement in a script.
Custom decisions return true or false according to the statement you define, as the following example
shows.
if (decision_statement){
return true;
}else{
return false;
}
Create Decision Element Links
Decision elements differ from other elements in a workflow. They have only true or false output
parameters. Decision elements have no exception linking.
Prerequisites
Verify that the Schema tab of the workflow editor contains elements, including at least one decision element
that is not linked to other elements.
Procedure
1Place the mouse pointer on a decision element to link it to two other elements that define two possible
branches in the workflow.
A blue arrow and a red arrow appear on the element's right.
2Place the pointer on the blue arrow, and while keeping the left mouse button pressed, move the pointer
to the target element.
A green arrow appears between the two elements and the target element turns green. The green arrow
represents the true path the workflow takes if the input parameter or attribute received by the decision
element matches the decision statement.
3Release the left mouse button.
The green arrow remains between the two elements. You have defined the path the workflow takes
when the decision element receives the expected value.
4Place the pointer on the decision element, hold down the left mouse button, and move the pointer to the
target element.
A dotted red arrow appears between the two elements and the target element turns green. The red
arrow represents the false path that the workflow takes if the input parameter or attribute received by
the decision element does not match the decision statement.
5Release the left mouse button.
The dotted red arrow remains between the two elements. You have defined the path the workflow
takes when the decision element receives unexpected input.
You have defined the possible true or false paths that the workflow takes depending on the input
parameter or attribute the decision element receives.
What to do next
Define the decision statement. See “Create Workflow Branches Using Decisions,” on page 36.
VMware, Inc. 35
Developing with VMware vCenter Orchestrator
Delete a Linked Decision Element
When you delete a linked decision element from a workflow schema, you must specify which workflow
paths to delete.
Prerequisites
Verify that the Schema tab of the workflow editor contains elements, including at least one decision element
with true and false paths.
Procedure
1Select the decision element and press Delete.
A dialog box with available options appears.
2Select which decision branch to delete.
OptionDescription
Success branch
Failure branch
Both branches
None
3Click OK.
The decision element and all elements that follow the true decision path
are deleted from the workflow schema.
The decision element and all elements that follow the false decision path
are deleted from the workflow schema.
The decision element and all elements that follow both decision paths are
deleted from the workflow schema.
Only the decision element and its links are deleted from the workflow
schema. All elements that follow both decision paths remain in the
workflow schema.
Create Workflow Branches Using Decisions
Decision elements are simple Boolean functions that you use to create branches in workflows. Decision
elements determine whether the input received matches the decision statement you set. As a function of this
decision, the workflow continues its course along one of two possible paths.
Prerequisites
Verify that you have a decision element linked to two other elements in the schema in the workflow editor
before you define the decision.
Procedure
1
Click the Edit icon () of the decision element.
A dialog box that lists the properties of the decision element appears.
2Click the Decision tab in the dialog box.
3Click the Not Set (NULL) link to select the source input parameter for this decision.
A dialog box that lists all the attributes and input parameters defined in this workflow appears.
4Select an input parameter from the list by double-clicking it.
5If you did not define the source parameter to which to bind, create it by clicking the Create
attribute/parameter in workflow link in the parameter selection dialog box.
36 VMware, Inc.
Chapter 1 Developing Workflows
6Select a decision statement from the drop-down menu.
The statements that the menu proposes are contextual, and differ according to the type of input
parameter selected.
7Add a value that you want the decision statement to match.
Depending on the input type and the statement you select, you might see a Not Set (NULL) link in the
value text box. Clicking this link gives you a predefined choice of values. Otherwise, for example for
Strings, this is a text box in which you provide a value.
You defined a statement for the decision element. When the decision element receives the input parameter,
it compares the value of the input parameter to the value in the statement and determines whether the
statement is true or false.
What to do next
You must set how the workflow handles exceptions.
Exception Handling
Exception handling catches any errors that occur when a schema element runs. Exception handling defines
how the schema element behaves when the error occurs.
All elements in a workflow, except for decisions and start and end elements, contain a specific output
parameter type that serves only for handling exceptions. If an element encounters an error during its run, it
can send an error signal to an exception handler. Exception handlers catch the error and react according to
the errors they receive. If the exception handlers you define cannot handle a certain error, you can bind an
element's exception output parameter to an Exception element, which ends the workflow run in the failed
state.
Exceptions act as a try and catch sequence within a workflow element. If you do not need to handle a given
exception in an element, you do not have to bind that element's exception output parameter.
The output parameter type for exceptions is always an errorCode object.
Create Exception Bindings
Elements can set bindings that define how the workflow behaves if it encounters an error in that element.
Prerequisites
Verify that the Schema tab of the workflow editor contains elements.
Procedure
1Place the pointer on the element for which you want to define exception binding.
A blue and a red arrow appear on the element's right.
2Place the pointer on the red arrow until it enlarges, hold down the left mouse button, and drag the red
arrow to the target element.
A red dashed arrow links the two elements. The target element defines the behavior of the workflow if
the element that links to it encounters an error.
3Click the element that links to the exception handling element.
4Click the Exceptions tab in the schema element properties tabs at the bottom of the Schema tab.
VMware, Inc. 37
Developing with VMware vCenter Orchestrator
5Click the Not set button to set the Output Exception Binding value.
Select a parameter to bind to the exception output parameter from the exception attribute binding
n
dialog box.
Click Create parameter/attribute in workflow to create an exception output parameter.
n
6Click the target element that defines the exception handling behavior.
7Click the IN tab in the schema element properties tabs at the bottom of the Schema tab.
8Right-click in the IN tab and select Bind to workflow parameter/attribute.
9Select the exception output parameter and click Select.
10 Click the OUT tab for the exception handling element in the schema element properties tabs at the
bottom of the Schema tab
11 Define the behavior of the exception handling element.
Right-click in the OUT tab and select Bind to workflow parameter/attribute to select an output
n
parameter for the exception handling element to generate.
Click the Scripting tab and use JavaScript to define the behavior of the exception handling element.
n
You defined how the element handles exceptions.
What to do next
You must define how to obtain input parameters from users when they run the workflow.
Foreach Elements and Composite Types
You can insert a Foreach element in the workflow that you develop to run a subworkflow that iterates over
arrays of parameters or attributes. To improve the understanding and readability of the workflow, you can
group several workflow parameters of different types that are logically connected in a single type that is
called a composite type.
Using Foreach Elements
A Foreach element runs a subworkflow iteratively over an array of input parameters or attributes. You can
select the arrays over which the subworkflow is run, and can pass the values for the elements of such an
array when you run the workflow. The subworkflow runs as many times as the number of elements that
you have defined in the array.
If you have a configuration element that contains an array of attributes, you can run a workflow that iterates
over these attributes in a Foreach element.
For example, suppose that you have 10 virtual machines in a folder that you want to rename. To do this, you
must insert a Foreach element in a workflow and define the Rename virtual machine workflow as a
subworkflow in the element. The Rename virtual machine workflow takes two input parameters, a virtual
machine and its new name. You can promote these parameters as input to the current workflow, and as a
result, they become arrays over which the Rename virtual machine workflow will iterate. When you run
your workflow, you can specify the 10 virtual machines in the folder and their new names. Every time the
workflow runs, it takes an element from the array of the virtual machines and an element from the array of
the new names for the virtual machines.
Using Composite Types
A composite type is a group of more than one input parameter or attribute that are connected logically but
are of different types. In a Foreach element, you can bind a group of parameters as a composite value. In this
way, the Foreach element takes the values for the grouped parameters at once in every subsequent run of
the workflow.
38 VMware, Inc.
Chapter 1 Developing Workflows
For example, suppose that you are about to rename a virtual machine. You need the virtual machine object
and its new name. If you have to rename multiple virtual machines, you need two arrays, one for the virtual
machines and one for their names. These two arrays are not explicitly connected. A composite type lets you
have one array where each element contains both the virtual machine and its new name. In this way, the
connection between those two parameters in case of multiple values is specified explicitly and not implied
by the workflow schema.
NOTE You cannot run a workflow that contains composite types from an Orchestrator Web view or from
the vSphere Web Client.
Define a Foreach Element
If you want to run a subworkflow multiple times by passing different values for its parameters or attributes
in every subsequent run, you can insert a Foreach element in the parent workflow.
When you insert a Foreach element, you must select at least one array over which the Foreach element
iterates. An array element can have different values for each subsequent workflow run.
If the subworkflow has output parameters, you should select the output parameters of the Foreach element
in which to accumulate workflow outputs , so that the subworkflow can iterate over them as well.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1In the workflow editor, select the Schema tab.
2From the Generic menu, drag a Foreach element in the workflow schema.
3Select a workflow from the Chooser dialog box.
The following notification appears at the top of the schema pane.
Do you want to add the activity's parameters as input/output to the current workflow?
4On the notification, click Setup.
A pop-up window with the available options appears.
5Select the mapping type for each input parameter.
OptionDescription
Input
Skip
Value
The argument is mapped to an input workflow parameter.
The argument is mapped to a NULL value.
The argument is mapped to an attribute with a value that you can set from
the Value column.
6Select the mapping type for each output parameter.
OptionDescription
Output
Skip
Local variable
The argument is mapped to an output workflow parameter.
The argument is mapped to a NULL value.
The argument is mapped to an attribute.
7Click Promote.
8Right-click the Foreach element and select Synchronize > Synchronize presentation.
A confirmation dialog box appears.
VMware, Inc. 39
Developing with VMware vCenter Orchestrator
9Click Ok to propagate the presentation of the Foreach element to the current workflow.
A dialog box displays information about the outcome of the operation.
10 On the Inputs tab, verify that the subworkflow's parameters are added as elements of type array.
11 On the Outputs tab, verify that the subworkflow's parameters are added as elements of type array.
You defined a Foreach element in your workflow. The Foreach element runs a workflow that takes as
parameters every element from the array of parameters or attributes that you have defined.
For parameters or attributes that are not defined as arrays, the workflow takes the same value in every
subsequent run.
Example: Rename Virtual Machines by Using a Foreach Element
You can use a Foreach element to rename several virtual machines at once. You have to insert a Foreach
element in a workflow and promote the vm and the newName parameters as input to the current workflow. In
this way, when you run the workflow, you specify the virtual machines to rename and the new names for
the virtual machines. The virtual machines are included as elements in the array that you created for the vm
parameter. The new names for the virtual machines are included in the array that you created for the
newName parameter.
Define a Composite Type in a Foreach Element
You can group multiple workflow parameters that are connected logically in a new type that is called a
composite type. You can use a Foreach element to bind a group of parameters as a composite value to
connect several arrays of parameters in a single array.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Verify that you have a Foreach element in your workflow.
n
Procedure
1Select the IN or the OUT tab of the Foreach element.
2Select a local parameter that you want to group with other local parameters in a composite type.
3Click Bind a group of parameters as composite value at the top of the IN or the OUT tab.
4In the Bindings pane, select the parameters that you want to group as a composite type.
5Select Bind as iterator.
You have set the Foreach element to iterate over an array of the composite type.
6Click Accept.
You defined a composite type and made sure that the workflow will iterate over an array of this composite
type. Parameters that are grouped as a composite type are named composite_type_name.parameter_name. For
example, if you create a snapshots composite type, the parameters that are group in the type can be
snapshots.vm[in-parameter] or snapshots.name[in-parameter]. Every element from the array of the
composite type contains a single instance of every parameter that you grouped in the composite type.
Example: Rename Virtual Machines
Suppose that you want to rename 10 virtual machines at a time. For this, you insert a Foreach element in a
workflow and select the Rename virtual machine workflow in the element. You create a composite type to
connect the vm and the newName parameters explicitly. You bind the composite type as an iterator, thus
creating a single array that contains both the vm and the newName parameter.
40 VMware, Inc.
Chapter 1 Developing Workflows
Obtaining Input Parameters from Users When a Workflow Starts
If a workflow requires input parameters, it opens a dialog box in which users enter the required input
parameter values when it runs. You can organize the content and layout, or presentation, of this dialog box
in Presentation tab in the workflow editor.
The way you organize parameters in the Presentation tab translates into the input parameters dialog box
when the workflow runs, and in the dialog box that opens when you run a workflow from a Web view.
The Presentation tab also allows you to add descriptions of the input parameters to help users when they
provide input parameters. You can also set properties and constraints on parameters in the Presentation tab
to limit the parameters that users provide. If the parameters the user provides do not meet the constraints
you set in the Presentation tab, the workflow will not run.
IMPORTANT The use of OGNL expressions in workflow presentations is deprecated as of Orchestrator 4.1.
Using OGNL expressions in workflow presentations is not supported in releases of Orchestrator later than
4.1.
Creating the Input Parameters Dialog Box In the Presentation Tab on page 41
n
You define the layout of the dialog box in which users provide input parameters when they run a
workflow in the Presentation tab of the workflow editor.
Setting Parameter Properties on page 43
n
Orchestrator allows you to define properties to qualify the input parameter values that users provide
when they run workflows. The parameter properties you define impose limits on the types and values
of the input parameters the users provide.
Creating the Input Parameters Dialog Box In the Presentation Tab
You define the layout of the dialog box in which users provide input parameters when they run a workflow
in the Presentation tab of the workflow editor.
The Presentation tab allows you to group input parameters into categories and to define the order in which
these categories appear in the input parameters dialog box.
Presentation Descriptions
You can add an associated description for each parameter or group of parameters, which appears in the
input parameters dialog box. The descriptions provide information to the users to help them provide the
correct input parameters. You can enhance the layout of the description text by using HTML formatting.
Defining Presentation Input Steps
By default, the input parameters dialog box lists all the required input parameters in a single list. To help
users enter input parameters, you can define nodes, called input steps, in the presentation tab. Input steps
group input parameters of a similar nature. The input parameters under an input step appear in a distinct
section in the input parameters dialog box when the workflow runs.
Defining Presentation Display Groups
Each input step can have nodes of its own called display groups. The display groups define the order in
which parameter input text boxes appear within their section of the input parameters dialog box. You can
define display groups independently of input steps.
VMware, Inc. 41
Developing with VMware vCenter Orchestrator
Create the Presentation of the Input Parameters Dialog Box
You create the presentation of the dialog box in which users provide input parameters when they run a
workflow in the Presentation tab in the workflow editor.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Verify that the workflow has a defined list of input parameters.
n
Procedure
1In the workflow editor, click the Presentation tab.
By default, all of the workflow's parameters appear under the main Presentation node in the order in
which you create them.
2Right-click the Presentation node and select Create new step.
A New Step node appears under the Presentation node.
3Provide an appropriate name for the step and press Enter.
This name appears as a section header in the input parameters dialog box when the workflow runs.
4Click the input step and add a description in the General tab in the bottom half of the Presentation tab.
This description appears in the input parameters dialog box to provide information to the users to help
them provide the correct input parameters. You can enhance the layout of the description text by using
HTML formatting.
5Right-click the input step you created and select Create display group.
A New Group node appears under the input step node.
6Provide an appropriate name for the display group and press Enter.
This name appears as a subsection header in the input parameters dialog box when the workflow runs.
7Click the display group and add a description in the General tab in the bottom half of the Presentation
tab.
This description appears in the input parameters dialog box. You can enhance the layout of the
description text by using HTML formatting. You can add a parameter value to a group description by
using an OGNL statement, such as ${#param}.
8Repeat the preceding steps until you have created all the input steps and display groups to appear in
the input parameters dialog box when the workflow runs.
9Drag parameters from under the Presentation node to the steps and groups of your choice.
You created the layout of the input parameters dialog box through which users provide input parameter
values when the workflow runs.
What to do next
You must set the parameter properties.
42 VMware, Inc.
Chapter 1 Developing Workflows
Setting Parameter Properties
Orchestrator allows you to define properties to qualify the input parameter values that users provide when
they run workflows. The parameter properties you define impose limits on the types and values of the input
parameters the users provide.
Every parameter can have several properties. You define an input parameter's properties in the Properties
tab for a given parameter in the Presentation tab.
Parameter properties validate the input parameters and modify the way that text boxes appear in the input
parameters dialog box. Some parameter properties can create dependencies between parameters.
Static and Dynamic Parameter Property Values
A parameter property value can be either static or dynamic. Static property values remain constant. If you
set a property value to static, you set or select the property's value from a list that the workflow editor
generates according to the parameter type.
Dynamic property values depend on the value of another parameter or attribute. You define the functions
by which dynamic properties obtain values by using an object graph navigation language (OGNL)
expression. If a dynamic parameter property value depends on the value of another parameter property
value and the other parameter property value changes, the OGNL expression recalculates and changes the
dynamic property value.
IMPORTANT The use of OGNL expressions in workflow presentations is deprecated as of Orchestrator 4.1.
Using OGNL expressions in workflow presentations is not supported in releases of Orchestrator later than
4.1.
Set Parameter Properties
When a workflow starts, it validates input parameter values from users against any parameter properties
that you set.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Verify that the workflow has a defined list of input parameters.
n
Procedure
1In the workflow editor, click the Presentation tab.
2Click a parameter in the Presentation tab.
The parameter's General and Properties tabs appear at the bottom of the Presentation tab.
3Click the parameter's Properties tab.
4Right-click in the Properties tab and select Add property.
A dialog box opens, presenting a list of the possible properties for a parameter of the type selected.
5Select a property from the list presented in the dialog box and click OK.
The property appears in the Properties tab.
VMware, Inc. 43
Developing with VMware vCenter Orchestrator
6Under Value, make the property value either static or dynamic by selecting the corresponding symbol
from the drop-down menu.
OptionDescription
7If you set the property value to static, you select a property value according to the type of parameter for
which you are setting the properties.
8If you set the property value to dynamic, you define the function to obtain the parameter property
value by using an OGNL expression.
The workflow editor provides help writing the OGNL expression.
a
Click the icon to obtain a list of all the attributes and parameters defined by the workflow that
this expression can call upon.
b
Click the icon to obtain a list of all the actions in the Orchestrator API that return an output
parameter of the type for which you are defining the properties.
Clicking items in the proposed lists of parameters and actions adds them to the OGNL expression.
Static property
Dynamic property
9Click Save at the bottom of the workflow editor.
You defined the properties of the workflow's input parameters.
What to do next
Validate and debug the workflow.
Workflow Input Parameter Properties
You can set parameter properties to constrain the input parameters that users provide when they run
workflows.
Different parameter types can have different properties.
Table 1‑5. Workflow Input Parameter Properties
Parameter PropertyParameter TypeDescription
Maximum string lengthStringSets a maximum length for the
parameter.
Minimum string lengthStringSets a minimum length for the
parameter.
Matching regular expressionStringValidates the input using a regular
expression.
Maximum number valueNumberSets a maximum value for the
parameter.
Minimum number valueNumberSets a minimum value for the
parameter.
Number formatNumberFormats the input for the parameter.
Mandatory inputAll simple typesMakes the parameter mandatory.
Predefined answersAll simple typesPre-defines a list of possible values for
the property as an array of simple
types. You either define the array
manually or the property calls an
action that returns an array of objects
of the appropriate type.
Predefined list of elementsAny simple or complex typesPre-defines a list of possible values for
the property as an array of simple or
complex types. Calls an action that
returns an array of objects of the
appropriate type.
Show parameter inputAny simple or complex typesShows or hides a parameter text box in
the presentation dialog box, depending
on the value of a preceding Boolean
parameter.
Hide parameter inputAny simple or complex typesSimilar to Show parameter input, but
takes the negative value of a previous
Boolean parameter.
Matching expressionAny parameter type obtained from a
plug-in
Show in inventoryAny parameter type obtained from a
plug-in
Specify a root object to be shown in
the chooser. Root object is provided
from a parameter or attribute.
Select asAny parameter type obtained from a
Default valueAny simple or complex typesDefault value for this parameter.
Custom validationOGNL scriptable validationIf the OGNL expression returns a
Data bindingAny simple or complex typesBinds to a property that you have
Authorized onlyAny parameter type obtained from a
Multi-lines text inputAny simple or complex typesAllows users to enter multiple lines of
Any parameter type obtained from a
plug-in
plug-in
plug-in
The input parameter matches a given
expression.
If set, you can run the present
workflow on any object of this type by
right-clicking it in the inventory view
and selecting Run workflow.
Specifies the root object if the selector
for this parameter is a hierarchical list
selector.
Use a list or hierarchical list selector to
select the parameter.
string, the validation shows this string
as the text of the error result.
already defined in another parameter.
Only authorized users can access this
parameter.
text in the input parameters dialog
box.
Predefined Constant Values for OGNL Expressions
You can use predefined constants when you create OGNL expressions to obtain dynamic parameter
property values.
Orchestrator defines the following constants for use in OGNL expressions.
VMware, Inc. 45
Developing with VMware vCenter Orchestrator
Table 1‑6. Predefined OGNL Constant Values
Constant ValueDescription
${#__current}
${#__username}
${#__userdisplayname}
${#__serverurl}
${#__datetime}
${#__date}
${#__timezone}
Current value of the custom validation property or
matching expression property
User name of the user who started the workflow
Display name of the user who started the workflow
URL containing the IP address of the server from which the
user starts the workflow. The URL consists of the server IP
address and a lookup port:
{ServerIP}:{lookupPort}
Current date and time
Current date, with time set to 00:00:00
Current timezone
(Optional) Requesting User Interactions While a Workflow Runs
A workflow can sometimes require additional input parameters from an outside source while it runs. These
input parameters can come from another application or workflow, or the user can provide them directly.
For example, if a certain event occurs while a workflow runs, the workflow can request human interaction
to decide what course of action to take. The workflow waits before continuing, either until the user responds
to the request for information, or until the waiting time exceeds a possible timeout period. If the waiting
time exceeds the timeout period, the workflow returns an exception.
The default attributes for user interactions are security.group and timeout.date. When you set the
security.group attribute to a given LDAP user group, you limit the permission to respond to the user
interaction request to members of that user group.
When you set the timeout.date attribute, you set a time and date until which the workflow waits for the
information from the user. You can set an absolute date, or you can create a scripted workflow element to
calculate a time relative to the current time.
Procedure
1Add a User Interaction to a Workflow on page 47
You request input parameters from users during a workflow run by adding a User Interaction schema
element to the workflow. When a workflow encounters a User Interaction element, it suspends its run
and waits for the user to provide the data that it requires.
2Set the User Interaction security.group Attribute on page 47
The security.group attribute of a user interaction element sets which users or groups of users have
permission to respond to the user interaction.
3Set the timeout.date Attribute to an Absolute Date on page 48
You set the timeout.date attribute for a user interaction to set how long the workflow waits for a user
to respond to a user interaction.
4Calculate a Relative Timeout for User Interactions on page 49
You can calculate in a Date object a relative time and date at which a user interaction times out.
5Set the timeout.date Attribute to a Relative Date on page 50
You can set the timeout.date attribute of a User Interaction element to a relative time and date by
binding it to a Date object. You define the object in a scripted function.
46 VMware, Inc.
Chapter 1 Developing Workflows
6Define the External Inputs for a User Interaction on page 51
You specify the information that users must provide during a workflow run as the input parameters of
a user interaction.
7Define User Interaction Exception Behavior on page 52
If a user does not provide the input parameters within the timeout period, the user interaction returns
an exception. You can define the exception behavior in a scripted function.
8Create the Input Parameters Dialog Box for the User Interaction on page 53
Users provide input parameters during a workflow run in an input parameters dialog box, in the same
way that they provide input parameters when a workflow first starts.
9Respond to a Request for a User Interaction on page 54
Workflows that require interactions from users during their run suspend their run either until the user
provides the required information or until the workflow times out.
Add a User Interaction to a Workflow
You request input parameters from users during a workflow run by adding a User Interaction schema
element to the workflow. When a workflow encounters a User Interaction element, it suspends its run and
waits for the user to provide the data that it requires.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag a User Interaction element to the appropriate position in the workflow schema.
2Click the User Interaction element to display its properties tabs in the bottom half of the Schema tab.
3
Click the Edit icon () of the User Interaction element.
4Provide a name and a description for the user interaction in the Info tab and click Close.
5Click Save.
You added a user interaction element to a workflow. When the workflow reaches this element, it waits for
information from the user before continuing its run.
What to do next
Set the security.group attribute of the user interaction to limit permission to respond to the user
interaction to a user or user group. See “Set the User Interaction security.group Attribute,” on page 47.
Set the User Interaction security.group Attribute
The security.group attribute of a user interaction element sets which users or groups of users have
permission to respond to the user interaction.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements and a user interaction to the workflow schema.
n
VMware, Inc. 47
Developing with VMware vCenter Orchestrator
Identify an LDAP user group to respond to the user interaction request.
n
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the Attributes tab for the user interaction.
3Click Not set for the security.group source parameter to set which users can respond to the user
interaction.
4(Optional) Select NULL to allow all users to respond to the request for user interaction.
5To limit the permission to respond to a specific user or user group, click Create parameter/attribute in
workflow.
The Parameter information dialog box opens.
6Name the parameter.
7Select Create workflow ATTRIBUTE with the same name to create the LdapGroup attribute in the
workflow.
8Click Not set for the parameter value to open the LdapGroup selection box.
9Type the name of the LDAP user group in the Filter text box.
10 Select the LDAP user group from the list and click Select.
For example, selecting the Administrators group means that only members of that group can respond
to this request for user interaction.
You limited the permission to respond to the user interaction request.
11 Click OK to close the Parameter information dialog box.
You set the security.group attribute for the user interaction.
What to do next
Set the timer.date attribute to set the timeout period for the user interaction.
To set the timeout to an absolute date and time, see “Set the timeout.date Attribute to an Absolute
n
Date,” on page 48.
To create a function to calculate a timeout that is relative to the current date and time, see “Calculate a
n
Relative Timeout for User Interactions,” on page 49.
Set the timeout.date Attribute to an Absolute Date
You set the timeout.date attribute for a user interaction to set how long the workflow waits for a user to
respond to a user interaction.
You set an absolute time and date in the Date object. When the time on the given date arrives, the workflow
that is waiting for a user interaction times out and ends in the Failed state. For example, you can set the user
interaction to timeout at midday on February 12th. To calculate a timeout that is relative to the current time
and date, see “Calculate a Relative Timeout for User Interactions,” on page 49.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add a user interaction element to the workflow schema.
n
Set the security.group attribute for the user interaction.
n
48 VMware, Inc.
Chapter 1 Developing Workflows
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the Attributes tab for the user interaction.
3Click Not set for the timeout.date source parameter to set the timeout parameter value.
4(Optional) Select NULL to allow the user interaction to set the workflow to wait indefinitely for the user
to respond to the user interaction.
5Click Create parameter/attribute in workflow to set the workflow to fail after a timeout period.
The Parameter information dialog box opens.
6Name the parameter.
7Select Create workflow ATTRIBUTE with the same name to create a Date attribute in the workflow.
8Click Not set for the parameter Value.
9Use the calendar to select an absolute date and time until which the workflow waits for the user to
respond.
10 Click OK to close the calendar.
11 Click OK to close the Parameter information dialog box.
You set the timeout.date attribute to an absolute date. The workflow times out if the user does not respond
to the user interaction before this time and date.
What to do next
Define the external input parameters that the user interaction requires from the user. See “Define the
External Inputs for a User Interaction,” on page 51.
Calculate a Relative Timeout for User Interactions
You can calculate in a Date object a relative time and date at which a user interaction times out.
You can set an absolute time and date in a Date object. When the time on the given date arrives, the request
for a user interaction times out. Alternatively, you can create a workflow element that calculates and
generates a relative Date object according to a function that you define. For example, you can create a
relative Date object that adds 24 hours to the current time.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add a user interaction element to the workflow schema.
n
Set the security.group attribute for the user interaction.
n
Procedure
1Drag a Scriptable task element from the Generic menu to the schema of a workflow, before the element
that requires the relative Date object for its timeout.date attribute.
2
Click the Edit icon () of the Scriptable task element in the workflow schema.
3Provide a name and description for the scripted workflow element in the Info properties tab.
4
Click the OUT properties tab, and click the Bind to workflow parameter/attribute icon (
VMware, Inc. 49
).
Developing with VMware vCenter Orchestrator
5Click Create parameter/attribute in workflow to create a workflow attribute.
aName the attribute timerDate.
bSelect Date from the list of attribute types.
cSelect Create workflow ATTRIBUTE with the same name.
dLeave the attribute value set to Not set, because a scripted function will provide this value.
eClick OK.
6Click the Scripting tab for the scripted workflow element.
7Define a function to calculate and generate a Date object named timerDate in the scripting pad in the
Scripting tab.
For example, you can create a Date object by implementing the following JavaScript function, in which
the timeout period is a relative delay in milliseconds.
timerDate = new Date();
System.log( "Current date : '" + timerDate + "'" );
timerDate.setTime( timerDate.getTime() + (86400 * 1000) );
System.log( "Timer will expire at '" + timerDate + "'" );
The preceding example JavaScript function defines a Date object that obtains the current date and time
by using the getTime method and adds 86,400,000 milliseconds, or 24 hours. The Scriptable Task
element generates this value as its output parameter.
8Click Close.
9Click Save.
You created a function that calculates a time and date relative to the current time and date and generates a
Date object. A User Interaction element can receive this Date object as an input parameter to set the timeout
period until which it waits for input from the user. When the workflow arrives at the User Interaction
element, it suspends its run and waits either until the user provides the required information, or for 24
hours before it times out.
What to do next
You must bind the Date object to the User Interaction element's timeout.date parameter. See “Set the
timeout.date Attribute to a Relative Date,” on page 50.
Set the timeout.date Attribute to a Relative Date
You can set the timeout.date attribute of a User Interaction element to a relative time and date by binding it
to a Date object. You define the object in a scripted function.
If you create a relative Date object in a scripted function, you can bind the timeout.date attribute of a user
interaction to this Date object. For example, if you bind the timeout.date attribute to a Date object that adds
24 hours to the current time, the user interaction times out after waiting for 24 hours.
Prerequisites
Add a user interaction element to the workflow schema.
n
Set the security.group attribute for the user interaction.
n
Create a scripted function that calculates a relative time and date and encapsulates it in a Date object in
n
the workflow. See “Calculate a Relative Timeout for User Interactions,” on page 49.
50 VMware, Inc.
Chapter 1 Developing Workflows
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the Attributes tab for the user interaction.
3Click Not set for the timeout.date source parameter to set the timeout parameter value.
4Select the Date object that encapsulates a relative time and date that you defined in a scripted function
and click Select.
You set the timeout.date attribute to a relative date and time that a scripted function calculates.
What to do next
Define the external input parameters that the user interaction requires from the user. See “Define the
External Inputs for a User Interaction,” on page 51.
Define the External Inputs for a User Interaction
You specify the information that users must provide during a workflow run as the input parameters of a
user interaction.
When a workflow reaches a user interaction element, it waits until a user provides the information that the
user interaction requires as its input parameters.
Prerequisites
Add a user interaction element to the workflow schema.
n
Set the security.group attribute for the user interaction.
n
Set the timer.date attribute for the user interaction
n
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the External inputs tab.
3
Click the Bind to workflow parameter/attribute icon (
) to define the parameters that the user must
provide in the user interaction.
4(Optional) If you already defined the input parameters in the workflow, select the parameters from the
proposed list.
5Click Create parameter/attribute in workflow to create a workflow attribute to bind to the input
parameter that the user provides.
6Give the parameter an appropriate name.
7Select the input parameter type from the list of types by searching for an object type in the Filter box.
For example, if the user interaction requires the user to provide a virtual machine as an input
parameter, select VC:VirtualMachine.
8Select Create workflow ATTRIBUTE with the same name to bind the input parameter that the user
provides to a new attribute in the workflow.
9Leave the input parameter value set to Not set.
The user provides this value when they respond to the user interaction during the workflow run.
10 Click OK to close the Parameter information dialog box.
VMware, Inc. 51
Developing with VMware vCenter Orchestrator
You defined the input parameters that the user provides during a user interaction.
What to do next
Define the exception behavior if the user interaction encounters an error. See “Define User Interaction
Exception Behavior,” on page 52.
Define User Interaction Exception Behavior
If a user does not provide the input parameters within the timeout period, the user interaction returns an
exception. You can define the exception behavior in a scripted function.
If you do not define the action for the workflow to take if the user interaction times out, the workflow ends
in the Failed state. Defining the exception behavior is a good workflow development practice.
Prerequisites
Add a user interaction element to the workflow schema.
n
Set the security.group and timer.date attributes for the user interaction.
n
Define the external input parameters of the user interaction.
n
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the Exception tab.
3Click Not set for the output exception binding.
4Click Create parameter/attribute in workflow to create an exception attribute to which to bind the user
interaction.
The Parameter information dialog box opens.
5Create an errorCode attribute.
An errorCode attribute has the following default properties:
Name: errorCode
n
Type: string
n
Create: Create workflow ATTRIBUTE with the same name
n
Value: Type an appropriate error message.
n
6Click OK to close the Parameter information dialog box.
7Drag a scriptable task element over the user interaction element in the workflow schema.
A red dashed arrow, which represents the exception link, appears between the two elements. The
scriptable task element binds automatically to the errorCode attribute from the user interaction.
8Double-click the scriptable task element and provide an appropriate name.
For example, Log timeout.
9In the Scripting tab of the scriptable task element, write a JavaScript function to handle the exception.
For example, to record the timeout in the Orchestrator log, write the following function:
System.log("No response from user. Timed out.");
52 VMware, Inc.
Chapter 1 Developing Workflows
10 Link and bind the scriptable task element that handles exceptions to the element that follows it in the
workflow.
For example, link and bind the scriptable task element to a Throw exception element to end the
workflow with an error.
You defined the exception behavior if the user interaction times out.
What to do next
Create the dialog box in which users provide input parameters. See “Create the Input Parameters Dialog
Box for the User Interaction,” on page 53.
Create the Input Parameters Dialog Box for the User Interaction
Users provide input parameters during a workflow run in an input parameters dialog box, in the same way
that they provide input parameters when a workflow first starts.
You create the layout of the dialog box in the Presentation tab of the user interaction element, not in the
Presentation tab for the whole workflow. The Presentation tab of the whole workflow creates the layout of
the input parameters dialog box that appears when you start a workflow. The Presentation tab of the user
interaction element creates the layout of the input parameters dialog box that opens when a workflow
arrives at a user interaction element during its run.
Prerequisites
Add a user interaction element to the workflow schema.
n
Set the security.group and timer.date attributes for the user interaction.
n
Define the external input parameters of the user interaction.
n
Define the exception behavior.
n
Procedure
1
Click the Edit icon () of the User Interaction element in the workflow schema.
2Click the Presentation tab of the user interaction element.
The Presentation tab shows the external input parameters that you created for the user interaction.
3(Optional) Right-click the Presentation node in the Presentation tab and select Create new step.
Steps allow you to create sections in the dialog box, with descriptions and headings under which you
can organize the input parameters.
4(Optional) Right-click the Presentation node in the Presentation tab and select Create display group.
Display groups allow you to sort the order in which input parameters appear in the steps, and allow
you to add sub-headers and instructions to the dialog box.
5Click an input parameter in the list and add a description of the input parameter in the General tab for
that parameter.
The description text that you type appears as a label in the input parameters dialog box to inform the
user of the information they must provide when they respond to the user interaction.
6Define input parameter properties.
Input parameter properties allow you to qualify the input parameter values that users can provide, and
to determine parameter values dynamically by using OGNL expressions.
7Click Save and close to close the workflow editor.
VMware, Inc. 53
Developing with VMware vCenter Orchestrator
You created the input parameters dialog box in which users provide input parameters to respond to a user
interaction during a workflow run.
What to do next
For information about creating the presentation steps and groups and setting input parameter properties,
see “Creating the Input Parameters Dialog Box In the Presentation Tab,” on page 41.
Respond to a Request for a User Interaction
Workflows that require interactions from users during their run suspend their run either until the user
provides the required information or until the workflow times out.
Workflows that require user interactions define which users can provide the required information and
direct the requests for interaction.
Prerequisites
Verify that at least one workflow is in the Waiting for User Interaction state.
Procedure
1From the drop-down menu in the Orchestrator client, select Run.
2Click the My Orchestrator view in the Orchestrator client.
3Click the Waiting for Input tab.
The Waiting for Input tab lists the workflows that are waiting for user inputs from you or from
members of your user group that have permission.
4Double-click a workflow that is waiting for input.
The workflow token that is waiting for input appears in the Workflows hierarchical list with the
following symbol:
5Right-click the workflow token and select Answer.
6Follow the instructions in the input parameters dialog box to provide the information that the workflow
requires.
You provided information to a workflow that was waiting for user input during its run.
.
Calling Workflows Within Workflows
Workflows can call on other workflows during their run. A workflow can start another workflow either
because it requires the result of the other workflow as an input parameter for its own run, or it can start a
workflow and let it continue its own run independently. Workflows can also start a workflow at a given
time in the future, or start multiple workflows simultaneously.
Workflow Elements that Call Workflows on page 55
n
There are four ways to call other workflows from within a workflow. Each way of calling a workflow
or workflows is represented by a different workflow schema element.
Call a Workflow Synchronously on page 57
n
Calling a workflow synchronously runs the called workflow as a part of the run of the calling
workflow. The calling workflow can use the called workflow's output parameters as input parameters
when it runs its subsequent schema elements.
54 VMware, Inc.
Chapter 1 Developing Workflows
Call a Workflow Asynchronously on page 58
n
Calling a workflow asynchronously runs the called workflow independently of the calling workflow.
The calling workflow continues its run without waiting for the called workflow to complete.
Schedule a Workflow on page 59
n
You can call a workflow from a workflow and schedule it to start at a later time and date.
Prerequisites for Calling a Remote Workflow from Within Another Workflow on page 59
n
If the workflow that you develop calls another workflow that resides on a remote Orchestrator server,
certain prerequisites must be fulfilled so that the remote workflow can run successfully.
Call Several Workflows Simultaneously on page 60
n
Calling several workflows simultaneously runs the called workflows synchronously as part of the run
of the calling workflow. The calling workflow waits for all of the called workflows to complete before
it continues. The calling workflow can use the results of the called workflows as input parameters
when it runs its subsequent schema elements.
Workflow Elements that Call Workflows
There are four ways to call other workflows from within a workflow. Each way of calling a workflow or
workflows is represented by a different workflow schema element.
Synchronous
Workflows
Asynchronous
Workflows
A workflow can start another workflow synchronously. The called workflow
runs as an integral part of the calling workflow's run, and runs in the same
memory space as the calling workflow. The calling workflow starts another
workflow, then waits until the end of the called workflow's run before it
starts running the next element in its schema. Usually, you call a workflow
synchronously because the calling workflow requires the output of the called
workflow as an input parameter for a subsequent schema element. For
example, a workflow can call the Start virtual machine and wait workflow to
start a virtual machine, and then obtain the IP address of this virtual machine
to pass to another element or to a user by email.
A workflow can start a workflow asynchronously. The calling workflow
starts another workflow, but the calling workflow immediately continues
running the next element in its schema, without waiting for the result of the
called workflow. The called workflows run with input parameters that the
calling workflow defines, but the lifecycle of the called workflow is
independent from the lifecycle of the calling workflow. Asynchronous
workflows allow you to create chains of workflows that pass input
parameters from one workflow to the next. For example, a workflow can
create various objects during its run. The workflow can then start
asynchronous workflows that use these objects as input parameters in their
own runs. When the original workflow has started all the required
workflows and run its remaining elements, it ends. However, the
asynchronous workflows it started continue their runs independently of the
workflow that started them.
To make the calling workflow wait for the result of the called workflow,
either use a nested workflow or create a scriptable task that retrieves the
state of the workflow token of the called workflow and then retrieves the
result of the workflow when it completes.
VMware, Inc. 55
Developing with VMware vCenter Orchestrator
Scheduled Workflows
A workflow can call a workflow but defer starting that workflow until a later
time and date. The calling workflow then continues its run until it ends.
Calling a scheduled workflow creates a task to start that workflow at the
given time and date. When the calling workflow has run, you can view the
scheduled workflow in the Scheduler and My Orchestrator views in the
Orchestrator client.
Scheduled workflows only run once. You can schedule a workflow to run
recurrently by calling the Workflow.scheduleRecurrently method in a
scriptable task element in a synchronous workflow.
Nested Workflows
A workflow can start several workflows simultaneously by nesting several
workflows in a single schema element. All the workflows listed in the nested
workflow element start simultaneously when the calling workflow arrives at
the nested workflows element in its schema. Significantly, each nested
workflow starts in a different memory space from the memory space of the
calling workflow. The calling workflow waits until all the nested workflows
have completed their runs before it starts running the next element in its
schema. The calling workflow can thus use the results of the nested
workflows as input parameters when it runs its remaining elements.
Propagate Workflow Changes to other Workflows
If you call a workflow from another workflow, Orchestrator imports the input parameters of the child
workflow in the parent workflow at the moment you add the workflow element to the schema.
If you modify the child workflow after you have added it to another workflow, the parent workflow calls on
the new version of the child workflow, but does not import any new input parameters. To prevent changes
to workflows affecting the behavior of other workflows that call them, Orchestrator does not propagate the
new input parameters automatically to the calling workflows.
To propagate parameters from one workflow to other workflows that call it, you must find the workflows
that call the workflow, and synchronize the workflows manually.
Prerequisites
Verify that you have a workflow that another workflow or workflows call.
Procedure
1Modify and save a workflow that other workflows call.
2Close the workflow editor.
3Navigate to the workflow you changed in the hierarchical list in the Workflows view in the
Orchestrator client.
4Right-click the workflow, and select References > Find Elements that Use this Element.
A list of workflows that call this workflow appears.
5Double-click a workflow in the list to highlight it in the Workflows view in the Orchestrator client.
6Right-click the workflow, and select Edit.
The workflow editor opens.
7Click the Schema tab in the workflow editor.
8Right-click the workflow element for the changed workflow from the workflow schema and select
Synchronize > Synchronize Parameters.
9Select Continue in the confirmation dialog box.
56 VMware, Inc.
Chapter 1 Developing Workflows
10 Save and close the workflow editor.
11 Repeat Step 5 to Step 10 for all the workflows that use the modified workflow.
You propagated a changed workflow to other workflows that call it.
Propagate the Input Parameters and Presentation of a Child Workflow to the
Parent Workflow
If you develop a workflow that calls other workflows, you can propagate the input parameters and the
presentation of the child workflows to the parent workflow.
Procedure
1From the drop-down menu in the Orchestrator client, select Run.
2Right-click the workflow that you want to modify and select Edit.
The workflow editor opens.
3Select the Schema tab.
4Right-click the element of the child workflow whose input parameters and presentation you want to
propagate to the parent workflow and select Synchronize > Synchronize Presentation.
5In the confirmation dialog, select OK.
6(Optional) Repeat Step 4 and Step 5 for all child workflows whose input parameters and presentation
you want to propagate to the parent workflow.
The input parameters of the child workflows are added to the input parameters of the parent workflow. The
presentation of the parent workflow is extended with the presentations of the child workflows.
Call a Workflow Synchronously
Calling a workflow synchronously runs the called workflow as a part of the run of the calling workflow. The
calling workflow can use the called workflow's output parameters as input parameters when it runs its
subsequent schema elements.
You call workflows synchronously from another workflow by using the Workflow element.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag a Workflow element from the Generic menu to the appropriate position in the workflow schema.
The Choose workflow selection dialog box appears.
2Search for ands select the workflow you want and click OK.
If the search returns a partial result, narrow your search criterion or increase the number of search
results from the Tools > User preferences menu in the client.
3Click the Workflow element to show its properties tabs in the bottom half of the Schema tab.
4
Click the Edit icon () of the Workflow element in the workflow schema.
5Bind the required input parameters to the workflow in the IN tab of the workflow schema element.
VMware, Inc. 57
Developing with VMware vCenter Orchestrator
6Bind the required output parameters to the workflow in the OUT tab of the workflow schema
element's.
7Define the exception behavior of the workflow in the Exceptions tab.
8Click Close.
9Click Save at the bottom of the workflow editor.
You called a workflow synchronously from another workflow. When the workflow reaches the synchronous
workflow during its run, the synchronous workflow starts, and the initial workflow waits for it to complete
before continuing its run.
What to do next
You can call a workflow asynchronously from a workflow.
Call a Workflow Asynchronously
Calling a workflow asynchronously runs the called workflow independently of the calling workflow. The
calling workflow continues its run without waiting for the called workflow to complete.
You call workflows asynchronously from another workflow by using the Asynchronous Workflow
element.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag an Asynchronous Workflow element from the Generic menu to the appropriate position in the
workflow schema.
The Choose workflow selection dialog box appears.
2Search for and select the desired workflow from the list and click OK.
3
Click the Edit icon () of the Asynchronous Workflow element in the workflow schema.
4Bind the required input parameters to the workflow in IN tab of the asynchronous workflow element.
5Bind the required output parameter in the OUT tab of the asynchronous workflow element.
You can bind the output parameter either to the called workflow, or to that workflow's result.
Bind to the called workflow to return that workflow as an output parameter
n
Bind to the workflow token of the called workflow to return the result of running the called
n
workflow.
6Define the exception behavior of the asynchronous workflow element in the Exceptions tab.
7Click Close.
8Click Save at the bottom of the workflow editor.
You called a workflow asynchronously from another workflow. When the workflow reaches the
asynchronous workflow during its run, the asynchronous workflow starts, and the initial workflow
continues its run without waiting for the asynchronous workflow to finish.
What to do next
You can schedule a workflow to start at a later time and date.
58 VMware, Inc.
Chapter 1 Developing Workflows
Schedule a Workflow
You can call a workflow from a workflow and schedule it to start at a later time and date.
You schedule workflows in another workflow by using the Schedule Workflow element.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag a Schedule Workflow element from the Generic menu to the appropriate position in the
workflow schema.
2Search for the workflow to call by typing part of its name in the text box.
3Select the workflow from the list and click OK.
4
Click the Edit icon () of the Schedule Workflow element in the workflow schema.
5Click the IN property tab.
A parameter named workflowScheduleDate appears in the list of properties to define, together with the
input parameters of the calling workflow.
6Click Not set for the workflowScheduleDate parameter to set the parameter.
7Click Create parameter/attribute in workflow to create the parameter and set the parameter value.
8Click Not set for Value to set the parameter value.
9Use the calendar that appears to set the date and time to start the scheduled workflow and click OK.
10 Bind the remaining input parameters to the scheduled workflow in the IN tab of the scheduled
workflow element.
11 Bind the required output parameters to the Task object in the OUT tab of the scheduled workflow
element.
12 Define the exception behavior of the scheduled workflow element in the Exceptions tab.
13 Click Close.
14 Click Save at the bottom of the workflow editor.
You scheduled a workflow to start at a given time and date from another workflow.
What to do next
You can call multiple workflows simultaneously from a workflow.
Prerequisites for Calling a Remote Workflow from Within Another Workflow
If the workflow that you develop calls another workflow that resides on a remote Orchestrator server,
certain prerequisites must be fulfilled so that the remote workflow can run successfully.
All input parameters of the remote workflow must be resolvable on the remote Orchestrator server.
n
All output parameters of the remote workflow must be resolvable on the local Orchestrator server.
n
VMware, Inc. 59
Developing with VMware vCenter Orchestrator
To ensure that the parameters of the remote workflow are resolvable, the inventory objects that the
workflow uses must be available both in the remote and the local Orchestrator servers. In case the remote
workflow uses objects from a plug-in, the same plug-in must be available on both Orchestrator servers. The
inventories of the remote plug-in and the local plug-in must be identical. In case the remote workflow uses
system objects in Orchestrator, like workflows and actions, the same workflows and actions must exist in
the inventories of the remote and the local Orchestrator servers.
For example, suppose that you insert the Rename virtual machine workflow in a Nested Workflow element
in the Test workflow that you develop. You want to run the Rename virtual machine workflow in a remote
Orchestrator server. When you run the Test workflow, the Rename virtual machine workflow is called
within the run of the Test workflow. You specify a virtual machine to rename from the inventory of the local
Orchestrator server. Because the Rename virtual machine workflow runs on the remote Orchestrator server,
the same virtual machine must be available in the inventory of that server. Otherwise, the Rename virtual
machine workflow cannot resolve its vm input parameter. Therefore, the vCenter Server plug-in on the local
and the remote Orchestrator servers must be connected to the same vCenter Server instance.
Call Several Workflows Simultaneously
Calling several workflows simultaneously runs the called workflows synchronously as part of the run of the
calling workflow. The calling workflow waits for all of the called workflows to complete before it continues.
The calling workflow can use the results of the called workflows as input parameters when it runs its
subsequent schema elements.
You call several workflows simultaneously from another workflow by using the Nested Workflows
element. You can use nested workflows to run workflows with user credentials that are different from the
credentials of the user of the calling workflow.
Prerequisites
Open a workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag a Nested Workflows element from the Action & Workflow menu to the appropriate position in
the workflow schema.
The Choose workflow selection dialog box appears.
2Search for and select a workflow to start and click OK.
3
Click the Edit icon () of the Nested Workflows element in the workflow schema.
4Click the Workflows tab.
The workflow you selected in Step 2 appears in the tab.
5Set the IN and OUT bindings for this workflow in the IN and OUT tabs in the right panel of the
Workflows schema element properties tab.
6Click the Connection Info tab in the right panel of the Workflows schema element properties tab.
The Connection Info tab allows you to access workflows stored in a different server to the local one,
using the appropriate credentials.
7To access workflows on a remote server, select Remote and click Not set to provide a host name or IP
address for the remote server.
NOTE You can use the vCenter Orchestrator Multi-Node plug-in to call workflows on a remote server.
60 VMware, Inc.
Chapter 1 Developing Workflows
8Define the credentials with which to access the remote server.
Select Inherit to use the same credentials as the user who runs the calling workflow.
n
Select Dynamic and click Not set to select a set of dynamic credentials that a parameter of the
n
credentials type defines elsewhere in the workflow.
Select Static and click Not set to enter the credentials directly.
n
9Click the Add Workflow button in the Workflows tab to select more workflows to add to the nested
workflow element.
10 Repeat Step 2 to Step 8 to define the settings for each of the workflows you add.
11 Click the nested workflow element in the workflow schema.
The number of workflows nested in the element appears as a numeral on the nested workflows
element.
You called several workflows simultaneously from a workflow.
What to do next
You can define long-running workflows.
Running a Workflow on a Selection of Objects
You can automate repetitive tasks by running a workflow on a selection of objects. For example, you can
create a workflow that takes a snapshot of all the virtual machines in a virtual machine folder, or you can
create a workflow that powers off all the virtual machines on a given host.
You can use one of the following methods to run a workflow on a selection of objects.
Run the Library > vCenter > Batch > Run a workflow on a selection of objects workflow.
n
Create a workflow that calls the Library > Orchestrator > Start workflows in a series or Start
n
workflows in parallel workflows.
Create a workflow that obtains an array of objects and runs a workflow on each object in the array in a
n
loop of workflow elements.
Run a workflow from JavaScript by calling the Workflow.execute() method in a For loop in a scripted
n
element in a workflow.
Which method you choose to run a workflow on a selection of objects depends on the workflow to run and
can affect the performance of the workflow. For example, running the Run a workflow on a selection of
objects workflow is the simplest way to run a workflow on multiple objects and requires no workflow
development, but it can only run workflows that take a single input parameter.
Creating a workflow that calls the Start workflows in a series or Start workflows in parallel workflows
allows you to run on multiple objects workflows that take more than one input parameter. The calling
workflow must create a properties array to pass the input parameters to the Start workflows in a series or
Start workflows in parallel workflow. These workflows are only for use in other workflows. Do not run
them directly.
Running a workflow in a For loop in a scripted element is faster than running a workflow in a loop of
workflow elements, but it is less flexible and limits the potential for reuse. Most importantly, running a
workflow in a scripted loop loses the checkpointing that Orchestrator performs when it starts each element
in a workflow run. As a consequence, if the Orchestrator server stops while the scripted loop is running,
when the server restarts, the workflow will resume at the beginning of the scripted element, repeating the
whole loop. If the Orchestrator server stops while running a workflow with a loop of workflow elements,
the workflow will resume at the specific element in the loop that was running when the server stopped.
For more information about the Batch workflows, see Using VMware vCenter Orchestrator Plug-Ins.
VMware, Inc. 61
Developing with VMware vCenter Orchestrator
How to create a workflow that runs a workflow on an array of objects in a loop of workflow elements is
demonstrated in “Develop a Complex Workflow,” on page 102.
How to run a workflow in a scripted For loop is demonstrated in “Workflow Scripting Examples,” on
page 136.
Implement the Start Workflows in a Series and Start Workflows in Parallel
Workflows
You can use the Start workflows in a series and Start workflows in parallel workflows to run a workflow on
a selection of objects.
You cannot run the Start workflows in a series and Start workflows in parallel workflows directly. You must
include them in another workflow that you create. To use the Start workflows in a series and Start
workflows in parallel workflows to run a workflow on a selection of objects, you must obtain the objects on
which to run the workflow. You pass these objects and any other input parameters that the workflow
requires to the workflow as an array of properties. The Start workflows in a series and Start workflows in
parallel workflows emit the results of running the workflow on the selection of objects as an array of
WorkflowToken objects.
You implement the Start workflows in a series and Start workflows in parallel workflows in the same way.
The Start workflows in a series workflow runs the workflow on each object sequentially. The Start
workflows in parallel workflow runs the workflow on all the objects simultaneously.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1In the workflow schema, add a scriptable task element or an action to obtain a list of objects on which to
run the workflow.
For example, to run a workflow on all the virtual machines in a virtual machine folder, you can add the
getAllVirtualMachinesByFolder action to the workflow.
2Link the scripted element or action and bind the input and output of the scripted element or action to
workflow inputs or attributes.
For example, you can bind the vmFolder input of the getAllVirtualMachinesByFolder action to a
workflow input parameter and the actionResult output to a workflow attribute in the calling
workflow.
3Add a scriptable task element to cast the list of objects into a properties array.
For example, if the objects on which to run the workflow are an array of virtual machines, allVMs,
returned by the actionResult output of the getAllVirtualMachinesByFolder action, you can write the
following script to cast the objects into a properties array.
propsArray = new Array();
for each (var vm in allVMs) {
var prop = new Properties();
prop.put("vm", vm);
propsArray.push(prop);
}
4Bind the inputs and outputs of the scriptable task element to workflow attributes.
In the example scriptable task element in Step 3, you bind the input to the allVMs array of virtual
machines and you create the propsArray output attribute as an array of Properties objects.
5Add a workflow element to the workflow schema.
62 VMware, Inc.
6Select either of the Start workflows in a series or Start workflows in parallel workflows and link the
workflow element to the other elements.
7Bind the wf input of the Start workflows in a series or Start workflows in parallel workflow to the
workflow to run on the objects.
For example, to remove any snapshots of all the virtual machines returned by the
getAllVirtualMachinesByFolder action, select the Remove all snapshots workflow.
8Bind the parameters input of the Start workflows in a series or Start workflows in parallel workflow to
the array of Properties objects that contains the objects on which to run the workflow.
For example, bind the parameters input to the propsArray attribute defined in Step 4.
9(Optional) Bind the workflowTokens output of the Start workflows in a series or Start workflows in
parallel workflow to an attribute in the workflow.
10 (Optional) Continue adding more elements that use the results of running the Start workflows in a
series or Start workflows in parallel workflow.
You created a workflow that uses either of the Start workflows in a series or Start workflows in parallel
workflows to run a workflow on a selection of objects.
Developing Long-Running Workflows
Chapter 1 Developing Workflows
A workflow in a waiting state consumes system resources because it constantly polls the object from which
it requires a response. If you know that a workflow will potentially wait for a long time before it receives the
response it requires, you can add long-running workflow elements to the workflow.
Every running workflow consumes a system thread. When a workflow reaches a long-running workflow
element, the long-running workflow element sets the workflow into a passive state. The long-running
workflow element then passes the workflow information to a single thread that polls the system for all longrunning workflow elements running in the server. Rather than each long-running workflow element
constantly attempting to retrieve information from the system, long-running workflow elements remain
passive for a set duration, while the long-running workflow thread polls the system on its behalf.
You set the duration of the wait in one of the following ways:
Set a timer, encapsulated in a Date object, that suspends the workflow until a certain time and date. You
n
implement long-running workflow elements that are based on a timer by including a Waiting Timer
element in the schema.
Define a trigger event, encapsulated in a Trigger object, that restarts the workflow after the trigger
n
event occurs. You implement long-running workflow elements that are based on a trigger by adding a
Waiting Event element or a User Interaction element in the schema.
Set a Relative Time and Date for Timer-Based Workflows
You can set the timer.date attribute of a Waiting Timer element to a relative time and date by binding it to a
Date object. You define the Date object in a scripted function.
When the time on the given date arrives, the long-running workflow that is based on a timer reactivates and
continues its run. For example, you can set the workflow to reactivate at midday on February 12.
Alternatively, you can create a workflow element that calculates and generates a relative Date object
according to a function that you define. For example, you can create a relative Date object that adds 24 hours
to the current time.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
VMware, Inc. 63
Developing with VMware vCenter Orchestrator
Add some elements to the workflow schema.
n
Procedure
1Drag a Scriptable task element from the Generic menu to the schema of a workflow, before the element
that requires the relative Date object for its timeout.date attribute.
2
Click the Edit icon () of the Scriptable task element in the workflow schema.
3Provide a name and description for the scripted workflow element in the Info properties tab.
4
Click the OUT properties tab, and click the Bind to workflow parameter/attribute icon ().
5Click Create parameter/attribute in workflow to create a workflow attribute.
aName the attribute timerDate.
bSelect Date from the list of attribute types.
cSelect Create workflow ATTRIBUTE with the same name.
dLeave the attribute value set to Not set, because a scripted function will provide this value.
eClick OK.
6Click the Scripting tab for the scripted workflow element.
7Define a function to calculate and generate a Date object named timerDate in the scripting pad in the
Scripting tab.
For example, you can create a Date object by implementing the following JavaScript function, in which
the timeout period is a relative delay in milliseconds.
timerDate = new Date();
System.log( "Current date : '" + timerDate + "'" );
timerDate.setTime( timerDate.getTime() + (86400 * 1000) );
System.log( "Timer will expire at '" + timerDate + "'" );
The preceding example JavaScript function defines a Date object that obtains the current date and time
by using the getTime method and adds 86,400,000 milliseconds, or 24 hours. The Scriptable Task
element generates this value as its output parameter.
8Click Close.
9Click Save.
You created a function that calculates and generates a Date object. A Waiting Timer element can receive this
Date object as an input parameter, to suspend a long-running workflow until the date encapsulated in this
object. When the workflow arrives at the Waiting Timer element, it suspends its run and waits for 24 hours
before continuing.
What to do next
You must add a Waiting Timer element to a workflow to implement a long-running workflow that is based
on a timer.
Create a Timer-Based Long-Running Workflow
If you know a workflow will have to wait for a response from an outside source for a predictable time, you
can implement it as a timer-based long-running workflow. A timer-based long-running workflow waits
until a given time and date before resuming.
You implement a workflow as a timer-based long-running workflow by using the Waiting Timer element.
64 VMware, Inc.
Chapter 1 Developing Workflows
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Drag a Waiting Timer element from the Generic menu to the position in the workflow schema at which
to suspend the workflow's run.
If you implement a scriptable task to calculate the time and date, this element must precede the WaitingTimer element.
2
Click the Edit icon () of the Waiting Timer element in the workflow schema.
3Provide a description of the reason for implementing the timer in the Info properties tab.
4Click the Attributes properties tab.
The timer.date parameter appears in the list of attributes.
5Click the timer.date parameter's Not set button to bind the parameter to an appropriate Date object.
The Waiting Timer selection dialog box opens, presenting a list of possible bindings.
Select a predefined Date object from the proposed list, for example one defined by a Scriptable
n
Task element elsewhere in the workflow.
Alternatively, create a Date object that sets a specific date and time for the workflow to await.
n
6(Optional) Create a Date object that sets a specific date and time that the workflow awaits.
aClick Create parameter/attribute in workflow in the Waiting Timer selection dialog box.
The Parameter information dialog box appears.
bGive the parameter an appropriate name.
cLeave the type set to Date.
dClick Create workflow ATTRIBUTE with the same name.
eClick the Value property's Not set button to set the parameter value.
A calendar appears.
fUse the calendar to set a date and time at which to restart workflow.
gClick OK.
7Click Close.
8Click Save at the bottom of the workflow editor.
You defined a timer that suspends a timer-based long-running workflow until a set time and date.
What to do next
You can create a long-running workflow that waits for a trigger event before continuing.
VMware, Inc. 65
Developing with VMware vCenter Orchestrator
Create a Trigger Object
Trigger objects monitor event triggers that plug-ins define. For example, the vCenter Server plug-in defines
these events as Task objects. When the task ends, the trigger sends a message to a waiting trigger-based
long-running workflow element, to restart the workflow.
The time-consuming event for which a trigger-based long-running workflow waits must return a VC:Task
object. For example, the startVM action to start a virtual machine returns a VC:Task object, so that subsequent
elements in a workflow can monitor its progress. A trigger-based long-running workflow's trigger event
requires this VC:Task object as an input parameter.
You create a Trigger object in a JavaScript function in a Scriptable Task element. This Scriptable Task
element can be part of the trigger-based long-running workflow that waits for the trigger event.
Alternatively, it can be part of a different workflow that provides input parameters to the trigger-based
long-running workflow. The trigger function must implement the createEndOfTaskTrigger() method from
the Orchestrator API.
IMPORTANT You must define a timeout period for all triggers, otherwise the workflow can wait indefinitely.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
In the workflow, declare a VC:Task object as an attribute or input parameter, such as a VC:Task object
n
from a workflow or workflow element that starts or clones a virtual machine.
Procedure
1Drag a Scriptable Task element from the Generic menu into the schema of a workflow.
One of the elements that precedes the Scriptable Task must generate a VC:Task object as its output
parameter.
2
Click the Edit icon () of the Scriptable task element in the workflow schema.
3Provide a name and description for the trigger in Info properties tab.
4Click the IN properties tab.
5
Click the Bind to workflow parameter/attribute icon ().
The input parameter selection dialog box opens.
6Select or create an input parameter of the type VC:Task.
This VC:Task object represents the time-consuming event that another workflow or element launches.
7(Optional) Select or create an input parameter of the Number type to define a timeout period in
seconds.
8Click the OUT properties tab.
9
Click the Bind to workflow parameter/attribute icon (
).
The output parameter selection dialog box opens.
66 VMware, Inc.
Chapter 1 Developing Workflows
10 Create an output parameter with the following properties.
aCreate the Name property with the value trigger.
bCreate the Type property with the value Trigger.
cClick Create ATTRIBUTE with same name to create the attribute.
dLeave the value as Not set.
11 Define any exception behavior in the Exceptions properties tab.
12 Define a function to generate a Trigger object in the Scripting tab.
For example, you could create a Trigger object by implementing the following JavaScript function.
trigger = task.createEndOfTaskTrigger(timeout);
The createEndOfTaskTrigger() method returns a Trigger object that monitors a VC:Task object named
task.
13 Click Close.
14 Click Save at the bottom of the workflow editor.
You defined a workflow element that creates a trigger event for a trigger-based long-running workflow. The
trigger element generates a Trigger object as its output parameter, to which a Waiting Event element can
bind.
What to do next
You must bind this trigger event to a Waiting Event element in a trigger-based long-running workflow.
Create a Trigger-Based Long-Running Workflow
If you know a workflow will have to wait for a response from an outside source during its run, but do not
know how long that wait will last, you can implement it as a trigger-based long-running workflow. A
trigger-based long-running workflow waits for a defined trigger event to occur before resuming.
You implement a workflow as a trigger-based long-running workflow by using the Waiting Event element.
When the trigger-based long-running workflow arrives at the Waiting Event element, it will suspend its run
and wait in a passive state until it receives a message from the trigger. During the waiting period, the
passive workflow does not consume a thread, but rather the long-running workflow element passes the
workflow information to the single thread that monitors all long-running workflows in the server.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Define a trigger event that is encapsulated in a Trigger object.
n
Procedure
1Drag a Waiting Event element from the Generic menu to the position in the workflow schema at which
you want to suspend the workflow's run.
The scriptable task that declares the trigger must immediately precede the Waiting Event element.
2
Click the Edit icon () of the Waiting Event element in the workflow schema.
3Provide a description of the reason for the wait in the Info properties tab.
VMware, Inc. 67
Developing with VMware vCenter Orchestrator
4Click the Attributes properties tab.
The trigger.ref parameter appears in the list of attributes.
5Click the trigger.ref parameter's Not set link to bind the parameter to an appropriate Trigger object.
The Waiting Event selection dialog box opens, presenting a list of possible parameters to which to bind.
6Select a predefined Trigger object from the proposed list.
This Trigger object represents a trigger event that another workflow or workflow element defines.
7Define any exception behavior in the Exceptions properties tab.
8Click Close.
9Click Save at the bottom of the workflow editor.
You defined a workflow element that suspends a trigger-based long-running workflow, that waits for a
specific trigger event before restarting.
What to do next
You can run a workflow.
Configuration Elements
A configuration element is a list of attributes you can use to configure constants across a whole Orchestrator
server deployment.
All the workflows, actions, policies, and Web views running in a particular Orchestrator server can use the
attributes you set in a configuration element. Setting attributes in configuration elements lets you make the
same attribute values available to all the workflows, actions, policies, and Web views running in the
Orchestrator server.
If you create a package containing a workflow, action, policy, or Web view that uses an attribute from a
configuration element, Orchestrator automatically includes the configuration element in the package. If you
import a package containing a configuration element into another Orchestrator server, you can import the
configuration element attribute values as well. For example, if you create a workflow that requires attribute
values that depend on the Orchestrator server on which it runs, setting those attributes in a configuration
element lets you to export that workflow so that another Orchestrator server can use it. Configuration
elements therefore allow you to exchange workflows, actions, policies, and Web views between servers
more easily.
NOTE You cannot import values of a configuration element attribute from a configuration element exported
from Orchestrator 5.1 or earlier.
Create a Configuration Element
Configuration elements allow you to set common attributes across an Orchestrator server. All elements that
are running in the server can call on the attributes you set in a configuration element. Creating configuration
elements allows you to define common attributes once in the server, rather than individually in each
element.
Procedure
1Click the Configurations view.
2Right-click a folder in the hierarchical list of folders and select New folder to create a new folder.
3Provide a name for the folder and click Ok.
4Right-click the folder you created and select New element.
68 VMware, Inc.
Chapter 1 Developing Workflows
5Provide a name for the configuration element and click Ok.
The configuration element editor opens.
6Increment the version number by clicking the version digits in the General tab and providing a version
comment.
7Provide a description of the configuration element in the Description text box in the General tab.
8Click the Attributes tab.
9
Click the Add attribute icon () to create a new attribute.
10 Click the attribute values under Name, Type, Value, and Description to set the attribute name, type,
value, and description.
11 Click the Permissions tab.
12
Click the Add access rights icon () to grant permission to access this configuration element to a
group of users.
13 Search for a user group in the Filter text box and select the relevant user group from the proposed list.
14 Check the appropriate check boxes to set the access rights for the selected user group.
You can set the following permissions on the configuration element.
PermissionDescription
View
Inspect
Admin
Execute
Edit
15 Click Select.
16 Click Save and close to exit the configuration element editor.
You defined a configuration element that sets common attributes across an Orchestrator server.
What to do next
You can use the configuration element to provide attributes to workflows or actions.
Workflow User Permissions
Orchestrator defines levels of permissions that you can apply to groups to allow or deny them access to
workflows.
View
The user can view the elements in the workflow, but cannot view the schema
or scripting.
Users can view the configuration element, but cannot view the schemas or
scripting.
Users can view the configuration element, including the schemas and
scripting.
Users can set permissions on the elements in the configuration element
and have all other permissions.
Users can run the elements in the configuration element.
Users can edit the elements in the configuration element.
Inspect
The user can view the elements in the workflow, including the schema and
scripting.
Execute
VMware, Inc. 69
The user can run the workflow.
Developing with VMware vCenter Orchestrator
Edit
Admin
The Admin permission includes the View, Inspect, Edit, and Execute permissions. All the permissions
require the View permission.
If you do not set any permissions on a workflow, the workflow inherits the permissions from the folder that
contains it. If you do set permissions on a workflow, those permissions override the permissions of the
folder that contains it, even if the permissions of the folder are more restrictive.
The user can edit the workflow.
The user can set permissions on the workflow and has all other permissions.
Set User Permissions on a Workflow
You set levels of permission on a workflow to limit the access that user groups can have to that workflow.
You can select the users and user groups for which to set permissions from the Orchestrator LDAP server.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Add some elements to the workflow schema.
n
Procedure
1Click the Permissions tab.
2
Click the Add access rights icon () to define permissions for a new user group.
3Search for a user group.
The search results contain all the user groups from the Orchestrator LDAP server that match the search.
4Select a user group and select the appropriate check boxes to set the level of permissions for this user
group.
To allow a user from this user group to view the workflow, inspect the schema and scripting, run and
edit the workflow, and change the permissions, you must select all check boxes.
5Click Select.
The user group appears in the permissions list.
6Click Save and close to exit the editor.
Validating Workflows
Orchestrator provides a workflow validation tool. Validating a workflow helps identify errors in the
workflow and checks that the data flows from one element to the next correctly.
When you validate a workflow, the validation tool creates a list of any errors or warnings. Clicking an error
in the list highlights the workflow element that contains the error.
If you run the validation tool in the workflow editor, the tool provides suggested quick fixes for the errors it
detects. Some quick fixes require you to provide additional information or input parameters. Other quick
fixes resolve the error for you.
Workflow validation checks the data bindings and connections between elements. Workflow validation
does not check the data processing that each element in the workflow performs. Consequently, a valid
workflow can run incorrectly and produce erroneous results if a function in a schema element is incorrect.
70 VMware, Inc.
Chapter 1 Developing Workflows
By default, Orchestrator always performs workflow validation when you run a workflow. You can change
the default validation behavior in the Orchestrator client. See “Testing Workflows During Development,” on
page 13. For example, sometimes during workflow development you might want to run a workflow that
you know to be invalid, for testing purposes.
Validate a Workflow and Fix Validation Errors
You must validate a workflow before you can run it. You can validate workflows in either the Orchestrator
client or in the workflow editor. However, you can only fix validation errors if you have opened the
workflow for editing in the workflow editor.
Prerequisites
Verify that you have a complete workflow to validate, with schema elements linked and bindings defined.
Procedure
1Click the Workflows view.
2Navigate to a workflow in the Workflows hierarchical list.
3(Optional) Right-click the workflow and select Validate workflow.
If the workflow is valid, a confirmation message appears. If the workflow is invalid, a list of errors
appears.
4(Optional) Close the Workflow Validation dialog box.
5Right-click the workflow and select Edit to open the workflow editor.
6Click the Schema tab.
7Click the Validate button in the Schema tab toolbar.
If the workflow is valid, a confirmation message appears. If the workflow is invalid, a list of errors
appears.
8For an invalid workflow, click an error message.
The validation tool highlights the schema element in which the error occurs by adding a red icon to it.
Where possible, the validation tool displays a quick fix action.
If you agree with the proposed quick fix action, click it to perform that action.
n
If you disagree with the proposed quick fix action, close the Workflow Validation dialog box and
n
fix the schema element manually.
IMPORTANT Always check that the fix that Orchestrator proposes is appropriate.
For example, the proposed action might be to delete an unused attribute, when in fact that attribute
might not be bound correctly.
9Repeat the preceding steps until you have eliminated all validation errors.
You validated a workflow and fixed the validation errors.
What to do next
You can run the workflow.
VMware, Inc. 71
Developing with VMware vCenter Orchestrator
Debugging Workflows
Orchestrator provides a workflow debugging tool. You can debug a workflow to inspect the input and
output parameters and attributes at the start of any activity, replace parameter or attribute values during a
workflow run in edit mode, and resume a workflow from the last failed activity.
You can debug workflows from the standard workflow library and custom workflows. You can debug
custom workflows while developing them in the workflow editor.
Debug a Workflow
You can debug elements of a workflow by adding breakpoints to the elements in the workflow schema.
When a breakpoint is reached, you have several options to continue the debugging process. When you
debug an element from the workflow schema, you can view general information about the workflow run,
modify the workflow variables, and view log messages.
Prerequisites
Log in to the Orchestrator client as a user who can run workflows.
Procedure
1Click the Workflows view.
2Select a workflow from the workflow library and click the Schema tab.
3To add breakpoints to the schema elements that you want to debug, right-click a workflow element and
select Toggle breakpoint.
You can enable or disable the toggled breakpoints.
4
Click the Debug workflow icon ().
If the workflow requires input parameters, you must provide them.
5When the workflow run is paused after it reaches a breakpoint, select one of the available options.
OptionDescription
Resume
Step into
Step over
Step return
Resumes the workflow run until another breakpoint is reached.
Lets you step into a workflow element.
NOTE You cannot step into a nested workflow element when you debug a
workflow in the workflow editor.
Steps over the current element in the schema and pauses the workflow run
on the next element.
Exits the workflow element that you have stepped into.
6(Optional) From the Breakpoints tab, modify the breakpoints.
You can enable, disable, or remove existing breakpoints.
7(Optional) From the Variables tab, review the variables.
You can modify the values of some of the variables during the debugging process.
72 VMware, Inc.
Chapter 1 Developing Workflows
Example Workflow Debugging
You can debug a workflow from the standard workflow library.
For example, if you provide an incorrect recipient address, you can correct the value when you debug the
Example interaction with email workflow.
Prerequisites
Configure the Mail plug-in in the Orchestrator configuration interface.
n
Log in to the Orchestrator client as a user who can run Mail workflows.
n
Procedure
1Click the Workflows view.
2In the workflows hierarchical list, open Library > Mail.
3Select the Example interaction with email workflow and click the Schema tab.
4Right-click the Email Send (Interaction) workflow element and select Toggle breakpoint.
5
Click the Debug workflow icon ().
6Provide the required information.
aIn the Destination address text box, type an incomplete recipient address.
For example, name@company.c.
bSelect an LDAP group of users who are authorized to answer the query.
cClick Submit.
7
When the breakpoint is reached, click the Step into icon ().
8On the Variables tab, verify the values.
9In the toAddress text box, type the correct recipient address value.
For example, name@company.com.
10
Click the Resume icon (
The workflow uses the value that you provided during the debugging process and continues the workflow
run.
Running Workflows
An Orchestrator workflow runs according to a logical flow of events.
When you run a workflow, each schema element in the workflow runs according to the following sequence.
1The workflow binds the workflow token attributes and input parameters to the schema element's input
parameters.
) to continue the workflow run.
2The schema element runs.
3The schema element's output parameters are copied to the workflow token attributes and workflow
output parameters.
4The workflow token attributes and output parameters are stored in the database.
5The next schema element starts running.
VMware, Inc. 73
Developing with VMware vCenter Orchestrator
This sequence repeats for each schema element until the end of the workflow.
Workflow Token Check Points
When a workflow runs, each schema element is a check point. After each schema element runs, Orchestrator
stores workflow token attributes in the database, and the next schema element starts running. If the
workflow stops unexpectedly, the next time the Orchestrator server restarts, the currently active schema
element runs again, and the workflow continues from the start of the schema element that was running
when the interruption occurred. However, Orchestrator does not implement transaction management or a
rollback function.
End of Workflow
The workflow ends if the current active schema element is an end element. After the workflow reaches an
end element, other workflows or applications can use the workflow's output parameters.
Run a Workflow in the Workflow Editor
You can run a workflow while you are developing it.
Running a workflow in the workflow editor lets you verify that the workflow runs correctly without
interrupting the development process. You can view log messages that provide information about the
workflow run. If the workflow run returns unexpected results, you can modify the workflow and run it
again without closing the workflow editor.
Prerequisites
Create a workflow.
n
Open the workflow for editing in the workflow editor.
n
Validate the workflow.
n
Procedure
1Click the Schema tab.
2Click Run.
3(Optional) Review the messages in the Logs tab.
Run a Workflow
You can perform automated operations in vCenter Server by running workflows from the standard library
or workflows that you create.
For example, you can create a virtual machine by running the Create simple virtual machine workflow.
Prerequisites
Verify that you have configured the vCenter Server plug-in. For details, see Installing and Configuring
VMware vCenter Orchestrator.
Procedure
1From the drop-down menu in the Orchestrator client, select Run or Design.
2Click the Workflows view.
3In the workflows hierarchical list, open Library > vCenter > Virtual machine management > Basic to
navigate to the Create simple virtual machine workflow.
4Right-click the Create simple virtual machine workflow and select Start workflow.
74 VMware, Inc.
Chapter 1 Developing Workflows
5Provide the following information into the Start workflow input parameters dialog box to create a
virtual machine in a vCenter Server connected to Orchestrator.
OptionAction
Virtual machine name
Virtual machine folder
Size of the new disk in GB
Memory size in MB
Number of virtual CPUs
Virtual machine guest OS
Host on which to create the virtual
machine
Resource pool
The network to connect to
Datastore in which to store the
virtual machine files
Name the virtual machine orchestrator-test.
aClick Not set for the Virtual machine folder value.
b Select a virtual machine folder from the inventory.
The Select button is inactive until you select an object of the correct
type, in this case, VC:VmFolder.
Type an appropriate numeric value.
Type an appropriate numeric value.
Select an appropriate number of CPUs from the Number of virtual CPUs
drop-down menu.
Click the Not Set link and select a guest operating system from the list.
Click Not set for the Host on which to create the virtual machine value
and navigate through the vCenter Server infrastructure hierarchy to a host
machine.
Click Not set for the Resource pool value and navigate through the
vCenter Server infrastructure hierarchy to a resource pool.
Click Not set for the The network to connect to value and select a
network.
Press Enter in the Filter text box to see all the available networks.
Click Not set for the Datastore in which to store the virtual machine
value and navigate through the vCenter Server infrastructure hierarchy to
a datastore.
6Click Submit to run the workflow.
A workflow token appears under the Create simple virtual machine workflow, showing the workflow
running icon.
7Click the workflow token to view the status of the workflow as it runs.
8Click the Events tab in the workflow token view to follow the progress of the workflow token until it
completes.
9Click the Inventory view.
10 Navigate through the vCenter Server infrastructure hierarchy to the resource pool you defined.
If the virtual machine does not appear in the list, click the refresh button to reload the inventory.
The orchestrator-test virtual machine is present in the resource pool.
11 (Optional) Right-click the orchestrator-test virtual machine in the Inventory view to see a contextual
list of the workflows that you can run on the orchestrator-test virtual machine.
The Create simple virtual machine workflow ran successfully.
What to do next
You can log in vSphere Client and manage the new virtual machine.
VMware, Inc. 75
Developing with VMware vCenter Orchestrator
Resuming a Failed Workflow Run
If a workflow fails, Orchestrator provides an option to resume the workflow run from the last failed activity.
You can change the parameters of the workflow and attempt to resume it, or retain the parameters and
make changes to external components that affect the workflow run. For example, if a workflow run fails due
to a problem in a third-party system, you can make changes to the system and resume the workflow run
from the failed activity, without changing the workflow parameters and without repeating the successful
activities.
Set the Behavior for Resuming a Failed Workflow Run
You can set the behavior for resuming a failed run for each custom workflow. The default workflows in the
library use the default system setting for resuming a failed workflow run.
You can change the default system behavior by modifying a configuration file. See “Set Custom Properties
for Resuming Failed Workflow Runs,” on page 77.
Prerequisites
Verify that you have permissions to edit the workflow.
Procedure
1Click the Workflows view.
2Expand the workflows hierarchical list to navigate to the workflow for which you want to set the
behavior.
3Right-click the workflow and select Edit.
The workflow editor opens.
4On the General tab, select an option from the Resume from failed behavior drop-down menu.
OptionDescription
System default
Enabled
Disabled
Follows the default behavior.
If a workflow run fails, a pop-up window displays an option to resume the
workflow run.
If a workflow run fails, it cannot be resumed.
5Click Save and close.
76 VMware, Inc.
Chapter 1 Developing Workflows
Set Custom Properties for Resuming Failed Workflow Runs
By default, Orchestrator is not set up to resume failed workflow runs. You can enable Orchestrator to
resume failed workflow runs and set a custom timeout period after which failed workflow runs cannot be
resumed.
Procedure
1On the Orchestrator server system, navigate to the folder that contains configuration files.
OptionAction
If you installed Orchestrator with
the vCenter Server installer
If you installed the standalone
version of Orchestrator
If you downloaded and deployed
the virtual appliance
2Open the vmo.properties configuration file in a text editor.
3Set Orchestrator to resume failed workflow runs by editing the following line in the vmo.properties
The value you set overrides the default timeout setting of 86400 seconds.
5Save the vmo.properties file.
6Restart the Orchestrator server.
Resume a Failed Workflow Run
You can resume a workflow run from the last failed activity, if resuming a failed run is enabled for the
workflow.
When the option for resuming a failed workflow run is enabled, you can change the parameters of the
workflow and try to resume it by using the options in the pop-up window that appears after the workflow
fails. You can also retain the parameters and make changes to external components that affect the workflow
run. If you do not select an option, the workflow run times out and cannot be resumed. For modifying the
timeout period, see “Set Custom Properties for Resuming Failed Workflow Runs,” on page 77.
Procedure
1From the drop-down menu in the pop-up window, select Resume and click Next.
If you select Cancel, the workflow run cannot be resumed later.
2(Optional) Modify the workflow parameters.
3Click Submit.
VMware, Inc. 77
Developing with VMware vCenter Orchestrator
Generate Workflow Documentation
You can export documentation in PDF format about a workflow or a workflow folder that you select at any
time.
The exported document contains detailed information about the selected workflow or the workflows in the
folder. The information about each workflow includes name, version history of the workflow, attributes,
parameter presentation, workflow schema, and workflow actions. In addition, the documentation also
provides the source code for the used actions.
Procedure
1From the drop-down menu in the Orchestrator client, select Run or Design.
2Click the Workflows view.
3Navigate to the workflow or workflow folder for which you want to generate documentation and right-
click it.
4Select Generate documentation.
5Browse to locate the folder in which to save the PDF file, provide a file name, and click Save.
The PDF file containing the information about the selected workflow, or the workflows in the folder, is
saved on your system.
Use Workflow Version History
You can use version history to revert a workflow to a previously saved state. You can revert the workflow
state to an earlier or a later workflow version. You can also compare the differences between the current
state of the workflow and a saved version of the workflow.
Orchestrator creates a new version history item for each workflow when you increase and save the
workflow version. Subsequent changes to the workflow do not change the current saved version. For
example, when you create a workflow version 1.0.0 and save it, the state of the workflow is stored in the
version history. If you make any changes to the workflow, you can save the workflow state in the
Orchestrator client, but you cannot apply the changes to workflow version 1.0.0. To store the changes in the
version history, you must create a subsequent workflow version and save it. The version history is kept in
the database along with the workflow itself.
When you delete a workflow, Orchestrator marks the element as deleted in the database without deleting
the version history of the element from the database. This way, you can restore deleted workflows. See
“Restore Deleted Workflows,” on page 79.
Prerequisites
Open a workflow for editing in the workflow editor.
Procedure
1Click the General tab in the workflow editor and click Show version history.
2Select a workflow version and click Diff Against Current to compare the differences.
A window displays the differences between the current workflow version and the selected workflow
version.
78 VMware, Inc.
3Select a workflow version and click Revert to restore the state of the workflow.
CAUTION If you have not saved the current workflow version, it is deleted from the version history and
you cannot revert back to the current version.
The workflow state is reverted to the state of the selected version.
Restore Deleted Workflows
You can restore workflows that have been deleted from the workflow library.
Procedure
1From the drop-down menu in the Orchestrator client, select Run or Design.
2Click the Workflows view.
3Navigate to the workflow folder in which you want to restore deleted workflows.
4Right-click the folder and select Restore deleted workflows.
5Select the workflow or workflows that you want to restore and click Restore.
The restored workflows appear in the selected folder.
Chapter 1 Developing Workflows
Develop a Simple Example Workflow
Developing a simple example workflow demonstrates the most common steps in the workflow
development process.
The example workflow that you are about to create starts an existing virtual machine in vCenter Server and
sends an email to the administrator to confirm that the virtual machine has started.
The example workflow performs the following tasks:
1Prompts the user to select a virtual machine to start.
2Prompts the user for an email address to which it can send notifications.
3Checks whether the selected virtual machine is already powered on.
4Sends a request to the vCenter Server instance to start the virtual machine.
5Waits for vCenter Server to start the virtual machine, and returns an error if the virtual machine fails to
start or if starting the virtual machine takes too long.
6Waits for vCenter Server to start VMware Tools on the virtual machine, and returns an error if the
virtual machine fails to start or if starting VMware Tools takes too long.
7Verifies that the virtual machine is running.
8Sends a notification to the provided email address, informing that the machine has started or that an
error occurred.
The ZIP file of Orchestrator examples available for download from the landing page of the Orchestrator
documentation contains a complete version of the Start VM and Send Email workflow.
The process for developing the example workflow consists of several tasks.
Prerequisites
Before you attempt to develop the simple example workflow, read “Key Concepts of Workflows,” on
page 11.
VMware, Inc. 79
Developing with VMware vCenter Orchestrator
Procedure
1Create the Simple Workflow Example on page 81
You must begin the workflow development process by creating the workflow in the Orchestrator
client.
2Create the Schema of the Simple Workflow Example on page 82
You can create a workflow's schema in the workflow editor. The workflow schema contains the
elements that the workflow runs and determines the logical flow of the workflow.
3(Optional) Create the Simple Workflow Example Zones on page 84
You can emphasize different zones in workflow by adding workflow notes of different colors.
Creating different workflow zones helps to make complicated workflow schema easier to read and
understand.
4Define the Parameters of the Simple Workflow Example on page 85
In this phase of workflow development, you define the input parameters that the workflow requires to
run. For the example workflow, you need an input parameter for the virtual machine to power on, and
a parameter for the email address of the person to inform about the result of the operation. When
users run the workflow, they will be required to specify the virtual machine to power on and an email
address.
5Define the Simple Workflow Example Decision Bindings on page 86
You bind a workflow's elements together in the Schema tab of the workflow editor. Decision bindings
define how decision elements compare the input parameters received to the decision statement, and
generate output parameters according to whether the input parameters match the decision statement.
6Bind the Action Elements of the Simple Workflow Example on page 87
You can bind a workflow's elements together in the workflow editor. Bindings define how the action
elements process input parameters and generate output parameters.
7Bind the Simple Workflow Example Scripted Task Elements on page 90
You bind a workflow's elements together in the Schema tab of the workflow editor. Bindings define
how the scripted task elements process input parameters and generate output parameters. You also
bind the scriptable task elements to their JavaScript functions.
8Define the Simple Workflow Example Exception Bindings on page 97
You define exception bindings in the Schema tab in the workflow editor. Exception bindings define
how elements process errors.
9Set the Read-Write Properties for Attributes of the Simple Workflow Example on page 98
You can define whether parameters and attributes are read-only constants or writeable variables. You
can also set limitations on the values that users can provide for input parameters.
10 Set the Simple Workflow Example Parameter Properties on page 98
You can set the parameter properties in the workflow editor. Setting the parameter properties affects
the behavior of the parameter, and places constraints on the possible values for that parameter.
11 Set the Layout of the Simple Workflow Example Input Parameters Dialog Box on page 100
You create the layout or presentation of the input parameters dialog box in the workflow editor. The
input parameters dialog box opens when users run a workflow that needs input parameters to run.
12 Validate and Run the Simple Workflow Example on page 101
After you create a workflow, you can validate it to discover any possible errors. If the workflow
contains no errors, you can run it.
80 VMware, Inc.
Chapter 1 Developing Workflows
Create the Simple Workflow Example
You must begin the workflow development process by creating the workflow in the Orchestrator client.
Prerequisites
Verify that the following components are installed and configured on the system.
vCenter Server, controlling some virtual machines, at least one of which is powered off
n
Access to an SMTP server
n
A valid email address
n
For information about how to install and configure vCenter Server, see the vSphere Installation and Setup
documentation. For information about how to configure Orchestrator to use an SMTP server, see Installingand Configuring VMware vCenter Orchestrator.
To write a workflow, you must have an Orchestrator user account with at least View, Execute, Inspect, Edit,
and preferably Admin permissions on the server or on the workflow folder in which you are working.
Procedure
1Click the Workflows view.
2Right-click the root of the workflows list and select Add folder.
3Name the new folder Workflow Examples and click OK.
4Right-click the Workflow Examples folder and select New workflow.
5Name the new workflow Start VM and Send Email and click OK.
The workflow editor opens.
6In the General tab, click the version number digits to increment the version number.
Because this is the initial creation of the workflow, set the version to 0.0.1.
7Click the Server restart behavior value in the General tab to set whether the workflow resumes after a
server restart.
8Type a description of what the workflow does in the Description text box in the General tab.
For example, you can add the following description.
This workflow starts a virtual machine and sends a confirmation email to the Orchestrator
administrator.
9Click Save at the bottom of the General tab.
You created a workflow called Start VM and Send Email, but you did not define its functions.
What to do next
Create the workflow's schema.
VMware, Inc. 81
Developing with VMware vCenter Orchestrator
Create the Schema of the Simple Workflow Example
You can create a workflow's schema in the workflow editor. The workflow schema contains the elements
that the workflow runs and determines the logical flow of the workflow.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Click the Schema tab in the workflow editor.
2From the Generic menu, drag a decision element to the arrow that links the Start element and the End
element in the schema.
3Double-click the decision element and change its name to VM powered on?.
The decision element corresponds to a boolean function that checks whether the virtual machine is
already powered on.
4From the Generic menu, drag an action element to the red arrow that links the decision element and an
End element.
The dialog box for action selection appears.
5Type start in the Filter text box, select the startVM action from the filtered list of actions, and click
Select.
6Drag the following action elements, one after the other, to the blue arrow that links the startVM action
element to an End element.
vim3WaitTaskEnd
Suspends the workflow run and pings an ongoing vCenter Server task at
regular intervals, until that task is finished. The startVM action starts a
virtual machine and the vim3WaitTaskEnd action makes the workflow wait
while the virtual machine starts up. After the virtual machine starts, the
vim3WaitTaskEnd lets the workflow resume.
vim3WaitToolsStarted
Suspends the workflow run and waits until VMware Tools starts on the
target virtual machine.
7From the Generic menu, drag a scriptable task element to the blue arrow that links the
vim3WaitToolsStarted action element to an End element.
8Double-click the scriptable task element and rename it to OK.
9Drag another scriptable task element to the green arrow that links the VM powered on? decision element
to an End element , and name this scriptable task element Already started.
10 Modify the linking of the Already started scriptable task element.
aDrag the Already started scriptable task element to the left of the startVM action element.
bDelete the blue arrow that connects the Already started scriptable task element to an End element.
cLink the Already started scriptable task element to the vim3WaitToolsStarted action element with
a blue arrow.
82 VMware, Inc.
Chapter 1 Developing Workflows
11 From the Generic menu, drag the following scriptable task elements into the schema.
Drag a scriptable task element to the startVM action element and name the scriptable task element
n
Start VM Failed.
Drag a scriptable task element to the vim3WaitTaskEnd action element and name the scriptable task
n
element Timeout 1.
Drag a scriptable task element to the vim3WaitToolsStarted action element and name the scriptable
n
task element Timeout 2.
Drag a scriptable task element to the blue arrow that links the OK scriptable task element to an End
n
element, name the new scriptable task element Send Email, and drag it to the right of the OK
scriptable task element.
Link the Start VM Failed, Timeout 1, and Timeout 2 scriptable task elements to the Send Email
n
scriptable task element with blue arrows.
Drag a scriptable task element to the Send Email scriptable task element, name the new scriptable
n
task element Send Email Failed, drag it to the right of the Timeout 2 scriptable task element, and
link it to the End element with a blue arrow.
12 Drag the End element to the right of the Send Email scriptable task element.
13 Click Save at the bottom of the Schema tab.
The following figure shows the layout of the Start VM and Send Email workflow schema elements.
Figure 1‑3. Linking the Elements of the Start VM and Send Email Example Workflow
VMware, Inc. 83
Developing with VMware vCenter Orchestrator
What to do next
You can highlight different zones in the workflow.
(Optional) Create the Simple Workflow Example Zones
You can emphasize different zones in workflow by adding workflow notes of different colors. Creating
different workflow zones helps to make complicated workflow schema easier to read and understand.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Drag a workflow note element from the Generic menu into the workflow editor.
2Position the workflow note over the Already started scriptable task element.
3Drag the edges of the workflow note to resize it so that it surrounds the Already started scriptable task
element.
4Double-click the text and add a description.
For example, Path if virtual machine is already powered on.
5Press Ctrl+E to select the background color.
6Repeat the preceding steps to highlight other zones in the workflow.
Place a note over the vertical sequence of elements from the VM powered on? decision element to the
n
OK element. Add the description Start VM path.
Place a note over the startVM failed, both Timeout scriptable task elements and the Send Email
n
Failed scriptable task element. Add the description Error handling.
Place a note over the Send Email scriptable task element. Add the description Send email.
n
The following figure shows what the example workflow zones should look like.
84 VMware, Inc.
Figure 1‑4. Start VM and Send Email Example Workflow Zones
Chapter 1 Developing Workflows
What to do next
You must define the workflow's attributes and input and output parameters.
Define the Parameters of the Simple Workflow Example
In this phase of workflow development, you define the input parameters that the workflow requires to run.
For the example workflow, you need an input parameter for the virtual machine to power on, and a
parameter for the email address of the person to inform about the result of the operation. When users run
the workflow, they will be required to specify the virtual machine to power on and an email address.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Click the Inputs tab in the workflow editor.
2Right-click within the Inputs tab and select Add Parameter.
A parameter named arg_in_0 appears in the Inputs tab.
3Click arg_in_0.
4Type the name vm in the Choose Attribute Name dialog box and click OK.
VMware, Inc. 85
Developing with VMware vCenter Orchestrator
5Click the Type text box and type vc:virtualm in the search text box in the parameter type dialog box.
6Select VC:VirtualMachine from the proposed list of parameter types and click Accept.
7Add a description of the parameter in the Description text box.
For example, type The virtual machine to power on.
8Repeat Step 2 through Step 7 to create a second input parameter, with the following values.
Name: toAddress
n
Type: String
n
Description: The email address to send the result of this workflow to
n
9Click Save at the bottom of the Inputs tab.
You defined the workflow's input parameters.
What to do next
Define the bindings between the element parameters.
Define the Simple Workflow Example Decision Bindings
You bind a workflow's elements together in the Schema tab of the workflow editor. Decision bindings
define how decision elements compare the input parameters received to the decision statement, and
generate output parameters according to whether the input parameters match the decision statement.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1
On the Schema tab, click the Edit icon () of the VM Powered On? decision element.
2On the Decision tab, click the Not set (NULL) button and select vm as the decision element's input
parameter from the list of proposed parameters.
3Select the state equals statement from the list of decision statements proposed in the drop-down menu.
A Not set button appears in the value text box, which presents you with a limited choice of possible
values.
4Select poweredOn.
5Click Save at the bottom of the workflow editor's Schema tab.
You have defined the true or false statement against which the decision element will compare the value of
the input parameter it receives.
What to do next
You must define the bindings for the other elements in the workflow.
86 VMware, Inc.
Chapter 1 Developing Workflows
Bind the Action Elements of the Simple Workflow Example
You can bind a workflow's elements together in the workflow editor. Bindings define how the action
elements process input parameters and generate output parameters.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1
On the Schema tab, click the Edit icon () of the startVM action element.
2Set the following general information on the Info tab.
OptionAction
Interaction
Business Status
Description
Select No External interaction.
Select the check box and add the text Sending start VM.
Leave the text Start / Resume a VM. Return the start task.
3Click the IN tab.
The IN tab displays the two possible input parameters available to the startVM action, vm and host.
Orchestrator automatically binds the vm parameter to vm[in-parameter] because the startVM action can
only take a VC:VirtualMachine as an input parameter. Orchestrator detects the vm parameter you
defined when you set the workflow input parameters and so binds it to the action automatically.
4Set host to NULL.
This is an optional parameter, so you can set it to null. However, if you leave it set to Not set, the
workflow cannot validate.
5Click the OUT tab.
The default output parameter that all actions generate, actionResult, appears.
6For the actionResult parameter, click Not set.
7Click Create parameter/attribute in workflow.
The Parameter information dialog box displays the values that you can set for this output parameter.
The output parameter type for the startVM action is a VC:Task object.
8Name the parameter powerOnTask and provide a description.
For example, Contains the result of powering on a VM.
9Click Create workflow ATTRIBUTE with the same name and click OK to exit the Parameter
information dialog box.
VMware, Inc. 87
Developing with VMware vCenter Orchestrator
10 Repeat the preceding steps to bind the input and output parameters to the vim3WaitTaskEnd and
vim3WaitToolsStarted action elements.
“Simple Workflow Example Action Element Bindings,” on page 88 lists the bindings for the
vim3WaitTaskEnd and vim3WaitToolsStarted action elements.
11 Click Save at the bottom of the workflow editor's Schema tab.
The action elements' input and output parameters are bound to the appropriate parameter types and values.
What to do next
Bind the scriptable task elements and define their functions.
Simple Workflow Example Action Element Bindings
Bindings define how the simple workflow example's action elements process input and output parameters.
When defining bindings, Orchestrator presents parameters you have already defined in the workflow as
candidates for binding. If you have not defined the required parameter in the workflow yet, the only
parameter choice is NULL. Click Create parameter/attribute in workflow to create a new parameter.
vim3WaitTaskEnd Action
The vim3WaitTaskEnd action element declares constants to track the progress of a task and a polling rate. The
following table shows the input and output parameter bindings that the vim3WaitTaskEnd action requires.
Table 1‑7. Binding Values of the vim3WaitTaskEnd Action
Bind to Existing or
Parameter NameBinding Type
task
progress
INBind
INCreate
Create Parameter?Binding Values
n
Local Parameter: powerOnTask
Source parameter:
n
task[attribute]
n
Type: VC:Task
Description:
n
Contains the result of
powering on a VM.
n
Local Parameter: progress
Source parameter:
n
progress[attribute]
Type: Boolean
n
Value: No (false)
n
Description:
n
Log progress while waiting
for the vCenter Server task
to complete.
88 VMware, Inc.
Table 1‑7. Binding Values of the vim3WaitTaskEnd Action (Continued)
Bind to Existing or
Parameter NameBinding Type
pollRate
actionResult
INCreate
OUTCreate
Create Parameter?Binding Values
Chapter 1 Developing Workflows
n
Local Parameter: pollRate
Source parameter:
n
pollRate[attribute]
Type: number
n
n
Value: 2
Description:
n
Polling rate in seconds at
which vim3WaitTaskEnd
checks the advancement of
the vCenter Server task.
Local Parameter:
n
actionResult[attribute]
Source parameter:
n
returnedManagedObject[attri
bute]
Type: Any
n
Description:
n
The returned managed object
from the waitTaskEnd
action.
vim3WaitToolsStarted Action
The vim3WaitToolsStarted action element waits until VMware Tools have installed on a virtual machine,
and defines a polling rate and a timeout period. The following table shows the input parameter bindings the
vim3WaitToolsStarted action requires.
The vim3WaitToolsStarted action element has no output, so requires no output binding.
VMware, Inc. 89
Developing with VMware vCenter Orchestrator
Table 1‑8. Binding Values of the vim3WaitToolsStarted Action
Parameter NameBinding Type
vm
pollingRate
timeout
Bind to Existing or
Create Parameter?Binding Values
INAutomatic binding
INBind
INCreate
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Value: Not editable, variable is
n
not a workflow attribute.
Description:
n
The virtual machine to
start.
n
Local Parameter: pollRate
Source parameter:
n
pollRate[attribute]
Type: number
n
Description:
n
The polling rate in
seconds at which
vim3WaitTaskEnd checks the
advancement of the vCenter
server task.
n
Local Parameter: timeout
Source parameter:
n
timeout[attribute]
Type: number
n
n
Value: 10
Description:
n
The timeout limit that
vim3WaitToolsStarted waits
before throwing an
exception.
Bind the Simple Workflow Example Scripted Task Elements
You bind a workflow's elements together in the Schema tab of the workflow editor. Bindings define how the
scripted task elements process input parameters and generate output parameters. You also bind the
scriptable task elements to their JavaScript functions.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1
On the Schema tab, click the Edit icon (
) of the Already Started scriptable task element.
90 VMware, Inc.
2Set the following general information in the Info tab.
OptionAction
Interaction
Business Status
Description
Select No External interaction.
Select the check box and add the text VM already powered on.
Leave the text The VM is already powered on, bypassing startVM and
waitTaskEnd, checking if the VM tools are up and running..
3Click the IN tab.
Because this is a custom scriptable task element, no properties are predefined for you.
4
Click the Bind to workflow parameter/attribute icon ().
5Select vm from the proposed list of parameters.
6Leave the OUT and Exception tabs blank.
This element does not generate an output parameter or exception.
7Click the Scripting tab.
8Add the following JavaScript function.
//Writes the following event in the vCO database
Server.log("VM '"+ vm.name +"' already started");
Chapter 1 Developing Workflows
9Repeat the preceding steps to bind the remaining input parameters to the other scriptable task
elements.
“Simple Workflow Example Scriptable Task Element Bindings,” on page 91 lists the bindings for the
Start VM failed, both Timeout or Error, Send Email Failed, and the OK scriptable task elements.
10 Click Save at the bottom of the workflow editor's Schema tab.
You have bound the scriptable task elements to their input and output parameters and provided the
scripting that defines their function.
What to do next
You must define the exception handling.
Simple Workflow Example Scriptable Task Element Bindings
Bindings define how the simple workflow example's scriptable task elements process input parameters. You
also bind the scriptable task elements to their JavaScript functions.
When defining bindings, Orchestrator presents parameters you have already defined in the workflow as
candidates for binding. If you have not defined the required parameter in the workflow yet, the only
parameter choice is NULL. Click Create parameter/attribute in workflow to create a new parameter.
Start VM Failed Scriptable Task
The Start VM Failed scriptable task element handles any exceptions that the startVM action throws by
setting the content of an email notification about the failure to start the virtual machine, and writing the
event in the Orchestrator log.
The following table shows the input and output parameter bindings that the Start VM Failed scriptable task
element requires.
VMware, Inc. 91
Developing with VMware vCenter Orchestrator
Table 1‑9. Bindings of the Start VM Failed Scriptable Task Element
Parameter NameBinding Type
vm
errorCode
body
Bind to Existing or
Create Parameter?Binding Values
INBind
INCreate
OUTCreate
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
power on.
n
Local Parameter: errorCode
Source parameter:
n
errorCode[attribute]
Type: string
n
Description:
n
Catch any exceptions while
powering on a VM.
n
Local Parameter: body
Source parameter:
n
body[attribute]
Type: string
n
n
Description: The email body
The Start VM Failed scriptable task element performs the following scripted function.
body = "Unable to execute powerOnVM_Task() on VM '"+vm.name+"', exception found: "+errorCode;
//Writes the following event in the vCO database
Server.error("Unable to execute powerOnVM_Task() on VM '"+vm.name, "Exception found:
"+errorCode);
Timeout 1 Scriptable Task Element
The Timeout 1 scriptable task element handles any exceptions that the vim3WaitTaskEnd action throws by
setting the content of an email notification about the failure of the task, and writing the event in the
Orchestrator log.
The following table shows the input and output parameter bindings that the Timeout 1 scriptable task
element requires.
92 VMware, Inc.
Table 1‑10. Bindings of the Timeout 1 Scriptable Task Element
Bind to Existing or
Parameter NameBinding Type
vm
errorCode
body
INBind
INBind
OUTBind
Create Parameter?Binding Values
Chapter 1 Developing Workflows
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
start.
n
Local Parameter: errorCode
Source parameter:
n
errorCode[attribute]
Type: string
n
Description:
n
Catch any exceptions while
powering on a VM.
n
Local Parameter: body
Source parameter:
n
body[attribute]
Type: string
n
n
Description: The email body
The Timeout 1 scriptable task element requires the following scripted function.
body = "Error while waiting for poweredOnVM_Task() to complete on VM '"+vm.name+"', exception
found: "+errorCode;
//Writes the following event in the vCO database
Server.error("Error while waiting for poweredOnVM_Task() to complete on VM '"+vm.name,
"Exception found: "+errorCode);
Timeout 2 Scriptable Task Element
The Timeout 2 scriptable task element handles any exceptions that the vim3WaitToolsStarted action throws
by setting the content of an email notification about the failure of the task, and writing the event in the
Orchestrator log.
The following table shows the input and output parameter bindings that the Timeout 2 scriptable task
element requires.
VMware, Inc. 93
Developing with VMware vCenter Orchestrator
Table 1‑11. Bindings of the Timeout 2 Scriptable Task Element
Parameter NameBinding Type
vm
errorCode
body
Bind to Existing or
Create Parameter?Binding Values
INBind
INBind
OUTBind
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
power on.
n
Local Parameter: errorCode
Source parameter:
n
errorCode[attribute]
Type: string
n
Description:
n
Catch any exceptions
while powering on a VM.
n
Local Parameter: body
Source parameter:
n
body[attribute]
Type: string
n
n
Description: The email body
The Timeout 2 scriptable task element requires the following scripted function.
body = "Error while waiting for VMware tools to be up on VM '"+vm.name+"', exception found:
"+errorCode;
//Writes the following event in the vCO database
Server.error("Error while waiting for VMware tools to be up on VM '"+vm.name, "Exception found:
"+errorCode);
OK Scriptable Task Element
The OK scriptable task element receives notice that the virtual machine has started successfully, sets the
content of an email notification about the successful start of the virtual machine, and writes the event in the
Orchestrator log.
The following table shows the input and output parameter bindings that the OK scriptable task element
requires.
Table 1‑12. Bindings of the OK Scriptable Task Element
Bind to Existing or
Parameter NameBinding Type
vm
body
INBind
OUTBind
Create Parameter?Binding Values
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
power on.
n
Local Parameter: body
Source parameter:
n
body[attribute]
Type: string
n
n
Description: The email body
94 VMware, Inc.
Chapter 1 Developing Workflows
The OK scriptable task element requires the following scripted function.
body = "The VM '"+vm.name+"' has started successfully and is ready for use";
//Writes the following event in the vCO database
Server.log(body);
Send Email Failed Scriptable Task Element
The Send Email Failed scriptable task element receives notice that the sending of the email failed, and writes
the event in the Orchestrator log.
The following table shows the input parameter bindings that the Send Email Failed scriptable task element
requires.
Table 1‑13. Bindings of the Send Email Failed Scriptable Task Element
Bind to Existing or
Parameter NameBinding Type
vm
toAddress
emailErrorCode
INBind
INBind
INCreate
Create Parameter?Binding Values
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
power on.
n
Local Parameter: toAddress
Source parameter:
n
toAddress[in-parameter]
Type: string
n
Description:
n
The email address of the
person to inform of the
result of this workflow
Local Parameter:
n
emailErrorCode
Source parameter:
n
emailErrorCode[attrbute]
Type: string
n
Description:
n
Catch any exceptions while
sending an email
The Send Email Failed scriptable task element requires the following scripted function.
//Writes the following event in the vCO database
Server.error("Couldn't send result email to '"+toAddress+"' for VM '"+vm.name, "Exception found:
"+emailErrorCode);
Send Email Scriptable Task Element
The purpose of the Start VM and Send Email workflow is to inform an administrator when it starts a virtual
machine. To do so, you must define the scriptable task that sends an email. To send the email, the Send
Email scriptable task element needs an SMTP server, addresses for the sender and recipient of the email, the
email subject, and the email content.
The following table shows the input and output parameter bindings that the Send Email scriptable task
element requires.
VMware, Inc. 95
Developing with VMware vCenter Orchestrator
Table 1‑14. Bindings of the Send Email Scriptable Task Element
Parameter NameBinding Type
vm
toAddress
body
smtpHost
fromAddress
subject
Bind to Existing or
Create Parameter?Binding Values
INBind
INBind
INBind
INCreate
INCreate
INCreate
n
Local Parameter: vm
n
Source parameter: vm[inparameter]
n
Type: VC:VirtualMachine
Description:
n
The virtual machine to
power on.
n
Local Parameter: toAddress
Source parameter:
n
toAddress[in-parameter]
Type: string
n
Description:
n
The email address of the
person to inform of the
result of this workflow
n
Local Parameter: body
Source parameter:
n
body[attribute]
Type: string
n
n
Description: The email body
n
Local Parameter: smtpHost
Source parameter:
n
smtpHost[attribute]
Type: string
n
Description:
n
The email SMTP server
n
Local Parameter: fromAddress
Source parameter:
n
fromAddress[attribute]
Type: string
n
Description:
n
The email address of the
sender
n
Local Parameter: subject
Source parameter:
n
subject[attribute]
Type: string
n
Description:
n
The email subject
The Send Email scriptable task element requires the following scripted function.
//Create an instance of EmailMessage
var myEmailMessage = new EmailMessage() ;
//Apply methods on this instance that populate the email message
myEmailMessage.smtpHost = smtpHost;
myEmailMessage.fromAddress = fromAddress;
myEmailMessage.toAddress = toAddress;
myEmailMessage.subject = subject;
myEmailMessage.addMimePart(body , "text/html");
96 VMware, Inc.
Chapter 1 Developing Workflows
//Apply the method that sends the email message
myEmailMessage.sendMessage();
System.log("Sent email to '"+toAddress+"'");
Define the Simple Workflow Example Exception Bindings
You define exception bindings in the Schema tab in the workflow editor. Exception bindings define how
elements process errors.
The following elements in the workflow return exceptions: startVM, vim3WaitTaskEnd, Send Email, and
vim3WaitToolsStarted.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
“Bind the Action Elements of the Simple Workflow Example,” on page 87.
n
“Bind the Simple Workflow Example Scripted Task Elements,” on page 90.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1
On the Schema tab, click the Edit icon () of the startVM action element.
2Click the Exception tab.
3Click the Not set button.
4Select errorCode from the proposed list.
5Repeat the preceding steps to set the exception binding to errorCode for both vim3WaitTaskEnd and
vim3WaitToolsStarted.
6
Click the Edit icon () of the Send Email scriptable task element.
7Click the Exception tab.
8Click the Not set button.
9Select emailErrorCode from the proposed list.
10 Click Save at the bottom of the workflow editor's Schema tab.
You have defined the exception binding for the elements that return exceptions.
What to do next
You must set the read and write properties on the attributes and parameters.
VMware, Inc. 97
Developing with VMware vCenter Orchestrator
Set the Read-Write Properties for Attributes of the Simple Workflow Example
You can define whether parameters and attributes are read-only constants or writeable variables. You can
also set limitations on the values that users can provide for input parameters.
Setting certain parameters to read-only allows other developers to adapt the workflow or to modify it
without breaking the workflow's core function.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
“Bind the Action Elements of the Simple Workflow Example,” on page 87.
n
“Bind the Simple Workflow Example Scripted Task Elements,” on page 90.
n
“Define the Simple Workflow Example Exception Bindings,” on page 97.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Click the General tab at the top of the workflow editor.
Under Attributes is a list of all the defined attributes, with check boxes next to each attribute. When you
select these check boxes, you set attributes as read-only.
2Select the check boxes to make the following attributes read-only constants:
progress
n
pollRate
n
timeout
n
smtpHost
n
fromAddress
n
subject
n
You have defined which of the workflow's attributes are constants and which are variables.
What to do next
Set the parameter properties and place constraints on the possible values for that parameter.
Set the Simple Workflow Example Parameter Properties
You can set the parameter properties in the workflow editor. Setting the parameter properties affects the
behavior of the parameter, and places constraints on the possible values for that parameter.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
98 VMware, Inc.
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
“Bind the Action Elements of the Simple Workflow Example,” on page 87.
n
“Bind the Simple Workflow Example Scripted Task Elements,” on page 90.
n
“Define the Simple Workflow Example Exception Bindings,” on page 97.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Click the Presentation tab in the workflow editor.
The two input parameters you defined for this workflow are listed.
2Click the (VC:VirtualMachine)vm parameter.
3Add a description in the General tab in the bottom half of the screen.
For example, type The virtual machine to start.
4Click the Properties tab in the bottom half of the screen.
On this tab, you can set the properties for the (VC:VirtualMachine)vm parameter.
Chapter 1 Developing Workflows
5
Click the Add property icon ().
6From the list of proposed properties, select the Mandatory input property, click Ok, and set its value to
Yes.
When you enable this property, users cannot run the Start VM and Send Email workflow without
providing a virtual machine to start.
7
Click the Add property icon ().
8From the list of proposed properties, select Select value as, click Ok, and select list from the list of
possible values.
When you set this property, you set how the user selects the value of the (VC:VirtualMachine)vm input
parameter.
9Click the (string)toAddress parameter in the top half of the Presentation tab.
10 Add a description in the Description tab in the bottom half of the screen.
For example, type The email address of the person to notify.
11
Click the Properties tab for (string)toAddress and click the Add property icon (
).
12 From the list of proposed properties, select the Mandatory input property, click Ok, and set its value to
Yes.
13
Click the Add property icon ().
14 From the list of proposed properties, select Matching regular expression and click Ok.
This property allows you to set constraints on what users can provide as input .
15 Click the Value text box for Matching regular expression and set the constraints to
[a-zA-Z0-9_%-+.]+@[a-zA-Z0-9-.]+\.[a-zA-Z]{2,4}.
Setting these constraints limits user input to characters that are appropriate for email addresses. If the
user tries to input any other character for the email address of the recipient when they start the
workflow, the workflow does not start.
VMware, Inc. 99
Developing with VMware vCenter Orchestrator
You have made both parameters mandatory, defined how the user can select the virtual machine to start,
and limited the characters that can be input for the recipient's email address.
What to do next
You must create the layout, or presentation, of the input parameters dialog box in which users specify a
workflow's input parameter values when they run it.
Set the Layout of the Simple Workflow Example Input Parameters Dialog Box
You create the layout or presentation of the input parameters dialog box in the workflow editor. The input
parameters dialog box opens when users run a workflow that needs input parameters to run.
The layout you define in the Presentation tab also defines the layout of the input parameter dialog boxes for
workflows you run using a Web view.
Prerequisites
Complete the following tasks.
“Create the Simple Workflow Example,” on page 81.
n
“Create the Schema of the Simple Workflow Example,” on page 82.
n
“Define the Parameters of the Simple Workflow Example,” on page 85.
n
“Define the Simple Workflow Example Decision Bindings,” on page 86.
n
“Bind the Action Elements of the Simple Workflow Example,” on page 87.
n
“Bind the Simple Workflow Example Scripted Task Elements,” on page 90.
n
“Define the Simple Workflow Example Exception Bindings,” on page 97.
n
“Set the Read-Write Properties for Attributes of the Simple Workflow Example,” on page 98.
n
“Set the Simple Workflow Example Parameter Properties,” on page 98.
n
Open the workflow for editing in the workflow editor.
n
Procedure
1Click the Presentation tab in the workflow editor.
2Right-click the Presentation node in the presentation hierarchical list and select Create display group.
A New step node and a New group sub-node appear under the Presentation node.
3Right-click New step and select Delete.
Because this workflow has only two parameters, you do not need multiple layers of display sections in
the input parameters dialog box.
4Double-click New group to edit the group name and press Enter.
For example, name the display group Virtual Machine.
The text you enter here appears as a heading in the input parameter dialog box when users start the
workflow.
5In the Description text box of the General tab at the bottom of the Presentation tab, provide a
description for the new display group.
For example, type Select the virtual machine to start.
The text you type here appears as a prompt in the input parameter dialog box when users start the
workflow.
100 VMware, Inc.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.