4.2.1

Table Of Contents
//Apply the method that sends the email message
myEmailMessage.sendMessage();
System.log("Sent email to '"+toAddress+"'");
Define the Simple Example Workflow 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
You must have created the Start VM and Send Email workflow, defined its parameters, and laid out its schema.
Procedure
1 Click the startVM action element.
2 Click the Exceptions tab at the bottom of the Schema tab.
3 Click the Not set button.
4 Select errorCode from the proposed list.
5 Repeat the preceding steps to set the exception binding to errorCode for both vim3WaitTaskEnd and
vim3WaitToolsStarted.
6 Click the Send Email scriptable task element.
7 Click the Exceptions tab at the bottom of the Schema tab.
8 Click the Not set button.
9 Select 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.
Set the Simple Workflow Example Attribute Read-Write Properties
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
You must have created a workflow, laid out and linked its schema, and defined the IN, OUT, and exception
bindings for all elements.
Procedure
1 Click the General tab at the top of the workflow editor.
Under Attributes is a list of all the attributes you defined, with check boxes next to each attribute. When
you check these checkboxes, you set attributes as read-only.
Developing with VMware vCenter Orchestrator
82 VMware, Inc.