5.5.1

Table Of Contents
//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.
n
“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.
Procedure
1
On the Schema tab, click the Edit icon ( ) of the startVM action element.
2 Click the Exception 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 Edit icon ( ) of the Send Email scriptable task element.
7 Click the Exception 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.
Chapter 1 Developing Workflows
VMware, Inc. 97