5.5

Table Of Contents
8 Define the credentials with which to access the remote server.
n
Select Inherit to use the same credentials as the user who runs the calling workflow.
n
Select Dynamic and click Not set to select a set of dynamic credentials that a parameter of the
credentials type defines elsewhere in the workflow.
n
Select Static and click Not set to enter the credentials directly.
9 Click the Add Workflow button in the Workflows tab to select more workflows to add to the nested
workflow element.
10 Repeat Step 2 to Step 8 to define the settings for each of the workflows you add.
11 Click the nested workflow element in the workflow schema.
The number of workflows nested in the element appears as a numeral on the nested workflows
element.
You called several workflows simultaneously from a workflow.
What to do next
You can define long-running workflows.
Running a Workflow on a Selection of Objects
You can automate repetitive tasks by running a workflow on a selection of objects. For example, you can
create a workflow that takes a snapshot of all the virtual machines in a virtual machine folder, or you can
create a workflow that powers off all the virtual machines on a given host.
You can use one of the following methods to run a workflow on a selection of objects.
n
Run the Library > vCenter > Batch > Run a workflow on a selection of objects workflow.
n
Create a workflow that calls the Library > Orchestrator > Start workflows in a series or Start
workflows in parallel workflows.
n
Create a workflow that obtains an array of objects and runs a workflow on each object in the array in a
loop of workflow elements.
n
Run a workflow from JavaScript by calling the Workflow.execute() method in a For loop in a scripted
element in a workflow.
Which method you choose to run a workflow on a selection of objects depends on the workflow to run and
can affect the performance of the workflow. For example, running the Run a workflow on a selection of
objects workflow is the simplest way to run a workflow on multiple objects and requires no workflow
development, but it can only run workflows that take a single input parameter.
Creating a workflow that calls the Start workflows in a series or Start workflows in parallel workflows
allows you to run on multiple objects workflows that take more than one input parameter. The calling
workflow must create a properties array to pass the input parameters to the Start workflows in a series or
Start workflows in parallel workflow. These workflows are only for use in other workflows. Do not run
them directly.
Running a workflow in a For loop in a scripted element is faster than running a workflow in a loop of
workflow elements, but it is less flexible and limits the potential for reuse. Most importantly, running a
workflow in a scripted loop loses the checkpointing that Orchestrator performs when it starts each element
in a workflow run. As a consequence, if the Orchestrator server stops while the scripted loop is running,
when the server restarts, the workflow will resume at the beginning of the scripted element, repeating the
whole loop. If the Orchestrator server stops while running a workflow with a loop of workflow elements,
the workflow will resume at the specific element in the loop that was running when the server stopped.
For more information about the Batch workflows, see Using VMware vCenter Orchestrator Plug-Ins.
Chapter 1 Developing Workflows
VMware, Inc. 61