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
answerWorkflowInput Operation
The answerWorkflowInput operation passes information from a user or an external application to a workflow
while the workflow is running.
If a running workflow reaches a stage that requires an input from a user action or external application, the
WorkflowToken enters the waiting state until it receives the input from answerWorkflowInput. The
answerWorkflowInput operation provides input in the form of an array of WorkflowTokenAttribute objects.
The answerWorkflowInput operation is declared as the following example shows.
public void answerWorkflowInput(String workflowTokenId, WorkflowTokenAttribute[] answerInputs,
String username, String password);
The Web service performs only a simple validation of the input attributes you provide for running a
workflow. The Web service verifies only that the attributes that you set in the WorkflowTokenAttribute
objects are of the expected type. The Web service does not perform complex validation to verify that you set
all of the WorkflowTokenAttribute objects' properties correctly. The Web service does not access the
parameter properties that the workflow developer set in the workflow Presentation. If one of the
WorkflowTokenAttribute objects' properties is not set, or if an attribute value is not one that the workflow
expects, the Web service sends the answerWorkflowInput request, with the invalid WorkflowTokenAttribute
object. If a WorkflowTokenAttribute object is invalid, the workflow fails, entering the failed state without
informing the Web service application. Your Web service application can check whether a workflow runs
correctly or fails by calling the getWorkflowTokenStatus operation during and after the workflow runs.
Type Value Description
String
workflowTokenId
The ID of a running workflow that is
waiting for input from a user
interaction or external application
Array of WorkflowTokenAttribute
objects
answerInputs
The result of the user interaction or
external application, passed as input to
the waiting workflow
String
username
Orchestrator user name
String
password
Orchestrator password
Return Value
No return value. Throws an exception if you pass it an invalid parameter.
cancelWorkflow Operation
The cancelWorkflow operation cancels a workflow.
The behavior of the cancelWorkflow operation depends on the workflow that it cancels. A canceled
workflow stops running in the Orchestrator server and enters the canceled state, but the actions that it has
already run or started running do not stop or reverse themselves. For example, if a workflow is performing
a Power On Virtual Machine operation when you cancel it, the virtual machine does not stop powering on,
nor does it power itself off if it has already started.
The cancelWorkflow operation is declared as follows.
public void cancelWorkflow(String workflowTokenId, String username, String password);
Developing a Web Services Client for VMware vCenter Orchestrator
80 VMware, Inc.