5.5

Table Of Contents
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.
n
“Create the Simple Workflow Example,” on page 81.
n
Open the workflow for editing in the workflow editor.
Procedure
1 Click the Schema tab in the workflow editor.
2 From the Generic menu, drag a decision element to the arrow that links the Start element and the End
element in the schema.
3 Double-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.
4 From 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.
5 Type start in the Filter text box, select the startVM action from the filtered list of actions, and click
Select.
6 Drag 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.
7 From the Generic menu, drag a scriptable task element to the blue arrow that links the
vim3WaitToolsStarted action element to an End element.
8 Double-click the scriptable task element and rename it to OK.
9 Drag 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.
a Drag the Already started scriptable task element to the left of the startVM action element.
b Delete the blue arrow that connects the Already started scriptable task element to an End element.
c Link the Already started scriptable task element to the vim3WaitToolsStarted action element with
a blue arrow.
Developing with VMware vCenter Orchestrator
82 VMware, Inc.