5.5.1
Table Of Contents
- Developing a Web Services Client for VMware vCenter Orchestrator
- Contents
- Developing Web Services Client for VMware vCenter Orchestrator
- Developing a Web Services Client
- Using the vCenter Orchestrator REST API
- Authenticating Against Orchestrator and Third-Party Systems
- Accessing the Reference Documentation for the Orchestrator REST API
- Using the Java REST SDK
- Operations with Workflows
- Working with Tasks
- Finding Objects in the Orchestrator Inventory
- Importing and Exporting Orchestrator Objects
- Deleting Orchestrator Objects
- Setting Permissions on Orchestrator Objects
- REST API Permissions
- Retrieve the Permissions of a Workflow
- Delete the Permissions of a Workflow
- Set the Permissions for a Workflow
- Retrieve the Permissions of an Action
- Delete the Permissions of an Action
- Set the Permissions for an Action
- Retrieve the Permissions of a Package
- Delete the Permissions of a Package
- Set the Permissions for a Package
- Retrieve the Permissions of a Resource
- Delete the Permissions of a Resource
- Set the Permissions for a Resource
- Retrieve the Permissions of a Configuration Element
- Delete the Permissions of a Configuration Element
- Set the Permissions for a Configuration Element
- Performing Operations with Plug-Ins
- Performing Server Configuration Operations
- Performing Tagging Operations
- Writing a Client Application for the Orchestrator SOAP Service
- Process for Creating an Orchestrator Web Service Client Application
- Web Service Endpoint
- Generating the Orchestrator Web Service Stubs
- Accessing the Server from Web Service Clients
- Create a Web Service Client
- Connect to the Orchestrator Web Service
- Find Objects in the Orchestrator Server
- Find Objects by Using the find Operation
- Find Objects by Using the findForId Operation
- Find Objects by Using the findRelation Operation
- Find Workflows in the Orchestrator Server
- Find Workflows by Using the getAllWorkflows Operation
- Retrieve the ID of a Workflow
- Find Workflows by Using the getWorkflowsWithName Operation
- Find Workflows by Using the getWorkflowForID Operation
- Run Workflows from a Web Service Client
- Interact with a Workflow While it Runs
- Obtain Workflow Results
- Time Zones and Running Workflows Through Web Services
- Web Service Application Examples
- Web Service API Object Reference
- Web Service API Operation Reference
- answerWorkflowInput Operation
- cancelWorkflow Operation
- echo Operation
- echoWorkflow Operation
- executeWorkflow Operation
- find Operation
- findForId Operation
- findRelation Operation
- getAllPlugins Operation
- getAllWorkflows Operation
- getWorkflowForId Operation
- getWorkflowInputForId Operation
- getWorkflowInputForWorkflowTokenId Operation
- getWorkflowsWithName Operation
- getWorkflowTokenBusinessState Operation
- getWorkflowTokenForId Operation
- getWorkflowTokenResult Operation
- getWorkflowTokenStatus Operation
- hasChildrenInRelation Operation
- hasRights Operation
- sendCustomEvent Operation
- simpleExecuteWorkflow Operation
- Index
getWorkflowTokenResult Operation
The getWorkflowTokenResult operation obtains the result of running a given workflow.
You can view the results that a WorkflowToken object produces by calling getWorkflowTokenResult. The
results of running a workflow are delivered as an array of WorkflowTokenAttribute objects that contain the
output parameters that the workflow set during its run. The structure of the output WorkflowTokenAttribute
objects is the same as the structure of the input parameters passed to the workflow when it starts. The
parameters have a name, type, and value.
You can obtain the results before the workflow finishes. If the workflow has set its output parameters, you
can obtain their values by calling getWorkflowTokenResult while the workflow runs. This method allows the
workflow to communicate its results to external systems while it is still in the running state. You can also use
getWorkflowTokenResult to obtain results from workflows in the failed, waiting, and canceled states, to
show the results of the workflow up to the point it entered a nonrunning or incomplete state.
Objects of the Any type do not deserialize correctly. You cannot call getWorkflowTokenResult on a workflow
token if one of the token's attributes is of the Any type. If you specify the correct object type, for example,
VC:VirtualMachine, getWorkflowTokenResult returns the correct dunesURI value.
If the object that getWorkflowTokenResult obtains is a plain Java object, you can deserialize it by using the
standard Java API, but to do so you must include the relevant Java class in your classpath. For example, if
the object you obtain is of the type VirtualMachineRuntimeInfo, you must include
VirtualMachineRuntimeInfo.class or o11nplugin-vsphere41.jar in the classpath. You find the o11nplugin-
vsphere41.jar file in install-directory\VMware\Orchestrator\app-
server\server\vmo\tmp\dars\o11nplugin-vsphere41.dar\lib.
The getWorkflowTokenResult operation is declared as follows.
public WorkflowTokenAttribute[] getWorkflowTokenResult(String workflowTokenId,
String username, String password);
Type Value Description
String
workflowTokenId
ID of this specific run of the workflow
String
username
Orchestrator user name.
String
password
Orchestrator password.
Return Value
Returns an array of WorkflowTokenAttribute objects that correspond to the provided workflow token ID or
IDs. Returns null if you pass it an invalid parameter.
getWorkflowTokenStatus Operation
The getWorkflowTokenStatus operation obtains the globalStatus of specific workflow tokens.
The getWorkFlowTokenStatus operation checks the status of a workflow or an array of workflows while they
run. The getWorkFlowTokenStatus operation obtains the globalStatus value from running WorkflowToken
objects, identified by their workflowTokenId. The globalStatus value can be one of the following.
n
running: the workflow is running
n
waiting: the workflow is waiting for runtime parameters, which can be provided by
answerWorkflowInput
n
waiting-signal: the workflow is waiting for an external event
n
canceled: the workflow was canceled by a user or by an application
Developing a Web Services Client for VMware vCenter Orchestrator
90 VMware, Inc.