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.

Complete the following tasks.

Create the Complex Workflow Example.

Create a Custom Action for the Complex Workflow Example.

Open the workflow for editing in the workflow editor.

1

Click the Schema tab in the workflow editor.

2

Add the following schema elements to the workflow schema.

Element Type

Element Name

Position in Schema

Scriptable task

Initializing

Below the Start element

Decision

VMs to Process?

Below the Initializing scriptable task element

Scriptable task

Pool Has No VMs

Below the VMs to Process? custom decision element, linked with a red arrow

Custom decision

Remaining VMs?

Right of the VMs to Process? custom decision element, linked with a green arrow

Action

getVMDiskModes

Right of the Remaining VMs? custom decision element, linked with a green arrow

Custom decision

Create Snapshot?

Right of the getVMDiskModes action element, linked with a blue arrow

Workflow

Create a snapshot

Above the Create Snapshot? custom decision element, linked with a green arrow

Scriptable task

VM Snapshots

Left of the Create a snapshot workflow, linked with a blue arrow

Scriptable task

Increment

Left of the VM Snapshots scriptable task element, linked with a blue arrow

Scriptable task

Set Output

Right of the Pool Has No VMs scriptable task element, linked with a blue arrow

3

Add a Log Exception scriptable task element.

a

Create an exception handling link from the Create a snapshot workflow to an End element.

b

Drag a scriptable task element to the red dashed arrow that links the Create a snapshot workflow to an End element.

c

Double-click the scriptable task element and rename it to Log Exception.

d

Move the Log Exception scriptable task element to above the VM Snapshots scriptable task element.

4

Unlink all End elements except the End element that is at the right of the Set Output scriptable task element.

5

Link the remaining elements as described in the following table.

Element

Link to

Type of Arrow

Description

getVMDiskModes action element

Log Exception scriptable task element

Red dashed

Exception handling

Create Snapshot? custom decision element

Increment scriptable task element

Red

False result

Log Exception scriptable task element

Increment scriptable task element

Blue

Normal workflow progression

Increment scriptable task element

Remaining VMs? custom decision element

Blue

Normal workflow progression

Remaining VMs? custom decision element

Set Output scriptable task element

Red

False result

6

Click Save at the bottom of the Schema tab.

The following figure shows what the linked elements of the Take a Snapshot of All Virtual Machines in a Resource Pool workflow should look like.

Linking of the Take a Snapshot of All Virtual Machines in a Resource Pool Example Workflow
Linking of the Take a Snapshot of All Virtual Machine in a Resource Pool workflow.

You can optionally define workflow zones by using workflow notes.