4.2

Table Of Contents
5 Create an errorCode attribute.
An errorCode attribute has the following default properties:
n
Name: errorCode
n
Type: string
n
Create: Create workflow ATTRIBUTE with the same name
n
Value: Type an appropriate error message.
6 Click OK to close the Parameter information dialog box.
7 Drag a scriptable task element next to the user interaction element in the workflow schema.
8 Link the exception output of the user interaction element to the scriptable task element.
A dotted red arrow between the two elements represents the exception link. The scriptable task element
binds automatically to the errorCode attribute from the user interaction.
9 Double-click the scriptable task element and provide an appropriate name.
For example, Log timeout.
10 In 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.");
11 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 46.
(Optional) 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
n
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.
Procedure
1 Click the User Interaction element in the workflow schema.
Developing with VMware vCenter Orchestrator
46 VMware, Inc.