5.5.1
Table Of Contents
- Developing with VMware vCenter Orchestrator
- Contents
- Developing with VMware vCenter Orchestrator
- Developing Workflows
- Key Concepts of Workflows
- Phases in the Workflow Development Process
- Access Rights for the Orchestrator Client
- Testing Workflows During Development
- Creating and Editing a Workflow
- Provide General Workflow Information
- Defining Attributes and Parameters
- Workflow Schema
- Obtaining Input Parameters from Users When a Workflow Starts
- Requesting User Interactions While a Workflow Runs
- Add a User Interaction to a Workflow
- Set the User Interaction security.group Attribute
- Set the timeout.date Attribute to an Absolute Date
- Calculate a Relative Timeout for User Interactions
- Set the timeout.date Attribute to a Relative Date
- Define the External Inputs for a User Interaction
- Define User Interaction Exception Behavior
- Create the Input Parameters Dialog Box for the User Interaction
- Respond to a Request for a User Interaction
- Calling Workflows Within Workflows
- Running a Workflow on a Selection of Objects
- Developing Long-Running Workflows
- Configuration Elements
- Workflow User Permissions
- Validating Workflows
- Debugging Workflows
- Running Workflows
- Resuming a Failed Workflow Run
- Generate Workflow Documentation
- Use Workflow Version History
- Restore Deleted Workflows
- Develop a Simple Example Workflow
- Create the Simple Workflow Example
- Create the Schema of the Simple Workflow Example
- Create the Simple Workflow Example Zones
- Define the Parameters of the Simple Workflow Example
- Define the Simple Workflow Example Decision Bindings
- Bind the Action Elements of the Simple Workflow Example
- Bind the Simple Workflow Example Scripted Task Elements
- Define the Simple Workflow Example Exception Bindings
- Set the Read-Write Properties for Attributes of the Simple Workflow Example
- Set the Simple Workflow Example Parameter Properties
- Set the Layout of the Simple Workflow Example Input Parameters Dialog Box
- Validate and Run the Simple Workflow Example
- Develop a Complex Workflow
- Create the Complex Workflow Example
- Create a Custom Action for the Complex Workflow Example
- Create the Schema of the Complex Workflow Example
- Create the Complex Workflow Example Zones
- Define the Parameters of the Complex Workflow Example
- Define the Bindings for the Complex Workflow Example
- Set the Complex Workflow Example Attribute Properties
- Create the Layout of the Complex Workflow Example Input Parameters
- Validate and Run the Complex Workflow Example
- Scripting
- Orchestrator Elements that Require Scripting
- Limitations of the Mozilla Rhino Implementation in Orchestrator
- Using the Orchestrator Scripting API
- Access the Scripting Engine from the Workflow Editor
- Access the Scripting Engine from the Action or Policy Editor
- Access the Orchestrator API Explorer
- Use the Orchestrator API Explorer to Find Objects
- Writing Scripts
- Add Parameters to Scripts
- Accessing the Orchestrator Server File System from JavaScript and Workflows
- Accessing Java Classes from JavaScript
- Accessing Operating System Commands from JavaScript
- Exception Handling Guidelines
- Orchestrator JavaScript Examples
- Developing Actions
- Creating Resource Elements
- Creating Packages
- Creating Plug-Ins by Using Maven
- Index
5 Click the Not set button to set the Output Exception Binding value.
n
Select a parameter to bind to the exception output parameter from the exception attribute binding
dialog box.
n
Click Create parameter/attribute in workflow to create an exception output parameter.
6 Click the target element that defines the exception handling behavior.
7 Click the IN tab in the schema element properties tabs at the bottom of the Schema tab.
8 Right-click in the IN tab and select Bind to workflow parameter/attribute.
9 Select 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.
n
Right-click in the OUT tab and select Bind to workflow parameter/attribute to select an output
parameter for the exception handling element to generate.
n
Click the Scripting tab and use JavaScript to define the behavior of the exception handling element.
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.
Developing with VMware vCenter Orchestrator
38 VMware, Inc.