Skip to content

Hello World

New

Never opened Orchestrator before? Start here. In about fifteen minutes you build two small workflows. The first writes one line to the log. The second gets the same line from an action, a reusable piece of script. Every other recipe in this book builds on these few clicks. New

Getting ready

  • A login to VCF Automation with a role that can create Orchestrator content, such as an organization administrator, or a login to a standalone Orchestrator appliance (chapter 1).
  • Nothing else. These workflows don’t touch vCenter or any other system.

How to do it

Open Orchestrator

  1. Open the Orchestrator Client:
    • Embedded in VCF Automation: log in to VCF Automation, open your organization portal, and select the Orchestrator tab at the top (in the provider organization it’s called Orchestrate). Recipe 1.1 has the details.
    • Standalone appliance: browse to the appliance, for example https://vco01.vmw.lab, and log in.
  2. The client opens on the Dashboard. The menu on the left has four groups: Library, Activity, Assets and Administration. Workflows live in Library.
Figure H.1. The Orchestrator Client, with the menu on the left.

Create the workflow

  1. Go to Library > Workflows and click New Workflow.
  2. Enter the name Hello World and click Create. The workflow editor opens on the Summary tab.
  3. On Summary, set the Version to 1.0.0 and the Description to My first workflow. If you want to keep it tidy, pick a folder too, such as VCF Orchestrator Guide/Hello World. Click Save.
Figure H.2. A new workflow's Summary tab.

Add a scriptable task

  1. Open the Schema tab. The canvas shows a green start element and an end element, joined by an arrow. On the left is the palette of elements you can add.
  2. In the palette, find Scriptable task (in the Generic group) and drag it onto the arrow between start and end. Drop it when the arrow is highlighted, so it’s connected on both sides.
  3. Click the new element. A properties pane opens on the right. On its General tab, change the Name to Say hello.
Figure H.3. A scriptable task dropped between the start and end elements.

Write the script

  1. In the properties pane, open the Scripting tab and enter one line:
Hello World — Say hello
System.log("Hello World, this is vRO!");

System.log writes a line to the run’s log. It’s the line you’ll use most in this book.

  1. Click Save at the bottom of the editor.
Figure H.4. The script of the scriptable task.

Run it

  1. Click Run at the top of the editor. The workflow has no inputs, so it starts at once.
  2. When it finishes, the run shows Completed. Open its Logs tab: there’s one line, Hello World, this is vRO!
Figure H.5. The first run and its log.

That’s a workflow: a schema of steps, run by the Orchestrator server, with everything it does written to a log you can read afterwards. Every run is also kept under Activity > Workflow Runs.

A script inside a scriptable task belongs to that one workflow. An action is a script with its own inputs and a return value, kept in Library > Actions, so any workflow can use it.

Create the action

  1. Go to Library > Actions and click New Action.
  2. Enter the name sayHello and the module com.vcfguide.hello. A module is a folder for actions, named like a Java package. Click Create.
  3. On the General tab, set the Version to 1.0.0.
  4. On the Script tab, add an input name of type string, set the Return type to string, enter this script, and click Save:
com.vcfguide.hello/sayHello
// Returns a greeting and writes it to the log.
var who = name ? name : "World";
var greeting = "Hello " + who + ", this is vRO!";
System.log(greeting);
return greeting;
Figure H.6. An action with one input and a return type.

Try the action on its own

  1. Click Run, enter your own name, and click Run. The Last Run Details panel under the editor shows the result, such as Hello Mayank, this is vRO!, on Result / Inputs, and the same line on Logs.

Use it in a workflow

  1. Go back to Library > Workflows, click New Workflow, and create Hello World with an action, with the version 1.0.0.
  2. Open the Schema tab. In the palette on the left, type sayHello in the search box, and drag sayHello onto the arrow between start and end. Orchestrator wraps it in an action element.
  3. A banner at the top of the canvas says the element’s inputs and outputs aren’t bound yet. Click Promote. In the dialog, set name to Input and actionResult, the action’s return value, to Output, and click Promote. Orchestrator creates the workflow input and output and binds them for you. On the Inputs/Outputs tab, rename the output from actionResult to greeting; its binding follows the new name.
  4. Click Save, then Run. Enter World and run it. The log shows Hello World, this is vRO!, and the run’s Variables tab shows the output greeting with the same text.
Figure H.7. A workflow that calls an action.
Checked on an embedded Orchestrator 9.1.1, inside VCF Automation, 2 Dec 2026. Both workflows and the action, as they are in the lab: Hello World logged Hello World, this is vRO!, and Hello World with an action with World returned greeting = Hello World, this is vRO!

How it works

Workflows are schemas, actions are functions. A workflow is a drawing: elements joined by arrows, with inputs, outputs and variables carrying data between them. It can wait, ask a person, run for days and pick up again after a restart. An action is a single function: inputs in, one value out, finished in one go. Most real workflows are a few elements that call well-named actions.

Bindings move the data. The action element doesn’t read the workflow input by itself. Promote in step 20 told Orchestrator which workflow value goes into which action input, and where the result goes. That’s the same for every element you’ll ever add: what goes in, what comes out.

The script is plain JavaScript. Orchestrator runs scripts on Mozilla Rhino, a JavaScript engine for Java, in the style of 2011 (ES5): var, function, and + to join strings. Recipe 4.1 explains why and what to avoid.

There's more

What next? Follow the Learning path for the rest of the building blocks in learning order, or go to 3.1 Workflow basics for inputs, outputs and variables in depth, and 4.2 Writing and reusing actions for actions.

Where things went. Everything you made is ordinary Orchestrator content: the workflows in Library > Workflows, the action in Library > Actions under com.vcfguide.hello, and the two runs in Activity > Workflow Runs. Delete them when you’re done, or keep them as a reference.