5.5.1

Table Of Contents
5 Writing Scripts on page 127
The Orchestrator scripting engine helps you to write scripts. Automatic insertion of functions and
automatic completion of lines of scripting accelerates the scripting process and minimizes the potential
for writing errors in scripts.
6 Add Parameters to Scripts on page 129
The Orchestrator scripting engine helps you to import available parameters into scripts.
7 Accessing the Orchestrator Server File System from JavaScript and Workflows on page 129
Orchestrator limits access to the Orchestrator server file system from JavaScript and Workflows to
specific directories.
8 Accessing Java Classes from JavaScript on page 130
By default, Orchestrator restricts JavaScript access to a limited set of Java classes. If you require
JavaScript access to a wider range of Java classes, you must set an Orchestrator system property to
allow this access.
9 Accessing Operating System Commands from JavaScript on page 130
The Orchestrator API provides a scripting class, Command, that runs commands in the Orchestrator
server host operating system. To prevent unauthorized access to the Orchestrator server host, by
default, Orchestrator applications do not have permission to run the Command class.
Access the Scripting Engine from the Workflow Editor
The Orchestrator scripting engine uses the Mozilla Rhino 1.7R4 JavaScript engine to help you write scripts
for scripted elements in workflows. You access the scripting engine for scripted workflow elements from the
Scripting tab in the workflow editor.
Procedure
1 Right-click a workflow in the Workflows view of the Orchestrator client and select Edit.
2 Click the Schema tab in the workflows editor.
3 Add a Scriptable Task element or a Custom Decision element to the workflow schema.
4 Click on the scriptable element's Scripting tab.
You accessed the scripting engine to define the scripted functions of workflow elements. The Scripting tab
allows you to navigate through the API, consult documentation about the objects, search for objects, and
write JavaScript.
What to do next
Search the Orchestrator API using the API Explorer.
Chapter 2 Scripting
VMware, Inc. 125