4.0

Table Of Contents
Return Value
Returns an array of Workflow objects that correspond to the provided name or name fragment. Workflows are
returned in an array even if only one workflow is found. Returns null if you pass it an invalid parameter.
getWorkflowTokenForId Operation
The getWorkflowTokenForId operation finds the WorkflowToken object for a specific workflow token.
The getWorkflowTokenForId operation is declared as follows.
public WorkflowToken getWorkflowTokenForId(String workflowTokenId, String username,
String password);
Individual threads or functions can run multiple workflows. The getWorkflowTokenForId operation allows a
central process or thread to track the progress of each workflow. Using getWorkflowTokenForId provides access
to all the information about a specific WorkflowToken because, although checking the token status only requires
the ID, it is often useful to obtain all the information about a given token.
Type Value Description
String
workflowTokenId
ID of this run of the workflow
String
username
Orchestrator user name.
String
password
Orchestrator password.
Return Value
Returns a WorkflowToken object for a specific workflow token that corresponds to the provided workflow token
ID.
getWorkflowTokenResult Operation
The getWorkflowTokenResult operation obtains the result of running a given workflow.
You can view the results produced by a WorkflowToken object 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. Consequently, 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, then getWorkflowTokenResult returns the correct dunesURI value.
If the object that getWorkflowTokenResult obtains is a plain Java object, you can perform deserialization on 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 vmware-vmosdk-vc40.jar in the classpath. You find the vmware-vmosdk-
vc40.jar file in
install-directory
\VMware\Orchestrator\app-server\server\vmo\tmp\dars\vmware-vmosdk-
vc40.dar\lib.
vCenter Orchestrator Developer's Guide
276 VMware, Inc.