5.5.1

Table Of Contents
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.