4.0

Table Of Contents
Decisions
Workflows can implement decision functions that define different courses of action according to a Boolean
true or false statement.
Decisions are forks in the workflow. Workflow decisions are made according to inputs provided by you, by
other workflows, by applications, or by the environment in which the workflow is running. The value of the
input parameter that the decision element receives determines which branch of the fork the workflow takes.
For example, a workflow decision might receive the power status of a given virtual machine as its input. If the
virtual machine is powered on, the workflow takes a certain path through its logical flow. If the virtual machine
is powered off, the workflow takes a different path.
Decisions are always Boolean functions. The only possible outcomes for each decision are true or false.
Custom Decisions
Custom decisions differ from standard decisions in that you define the decision statement in a script. Custom
decisions return true or false according to the statement you define, as the following example shows.
if (
decision_statement
){
return true;
}else{
return false;
}
Create Decision Element Links
Decision elements differ from other elements in that they have only true or false output parameters. Decision
elements have no exception linking.
Prerequisites
You must have the workflow editor open and the Schema tab must contain elements, including at least one
decision element.
Procedure
1 Click a decision element to link to two other elements to define two possible branches in the workflow.
2 Click the connector tool button in the toolbar at the top of the Schema tab.
3 Move the pointer over the highlighted decision element to link to two other elements.
n
If you hold the pointer over the left side of the decision element, a green arrow appears at the bottom
of the element. The green arrow represents the true path the workflow takes if the input parameter
or attribute received by the decision element matches the decision statement.
n
If you hold the pointer over the right side of the decision element, a red arrow appears at the bottom
of the element. The red arrow represents the false path the workflow takes if the input parameter or
attribute received by the decision element does not match the decision statement.
4 Left-click inside the left side of the decision element, hold down the left mouse button, and move the
pointer to the target element.
A green arrow appears between the two elements and the target element turns green.
5 Release the left mouse button.
The green arrow remains between the two elements. You have defined the path the workflow takes when
the decision element receives the expected value.
vCenter Orchestrator Developer's Guide
36 VMware, Inc.