4.0

Table Of Contents
getWorkflowForId Operation
The getWorkflowForId operation retrieves a workflow identified by its unique ID.
If you know the ID of a specific workflow, you can use the getWorkflowForID operation to obtain the workflow
object. Multiple workflows running through different plug-ins might have the same name. The safest way to
obtain workflows is to use the getWorkflowsWithName operation to obtain their ID, rather than by obtaining
them by name.
You can find out a workflow ID by checking the workflow's workflowID property, as the following example
shows.
String workflowId = workflows[0].getId();
The getWorkflowForId operation is declared as follows.
public Workflow getWorkflowForId(String workflowId, String username, String password);
Type Value Description
String
workflowId
ID of the workflow to retrieve.
String
username
Orchestrator user name.
String
password
Orchestrator password.
Return Value
Returns the Workflow object that corresponds to the provided ID. Returns null if you pass it an invalid
parameter.
getWorkflowsWithName Operation
The getWorkflowsWithName operation searches for workflows by their name.
The getWorkflowsWithName operation is declared as follows.
public Workflow[] getWorkflowsWithName(String workflowName, String username, String password);
If you know the name (or a part of the name) of a particular workflow, you can obtain this workflow by calling
getWorkflowsWithName. The getWorkflowsWithName operation returns an array of workflows, so it can be used
to find several workflows at one time.
IMPORTANT The getWorkflowsWithName operation is a convenient means of obtaining workflows, but you
should not use it in production applications because workflow names can change. Use the getWorkflowForId
operation rather than the getWorkflowsWithName operation in production applications.
Type Value Description
String
workflowName
Name of the workflow to find.
The value of the workflowName property can be a full name or a wildcard (*), which returns all
the workflows available to the user. You can also search for partial names. For example, if you
enter *Clone or Clone* as the workflowName, this returns all workflows with names that contain
the word Clone.
String
username
Orchestrator user name.
String
password
Orchestrator password.
Chapter 8 Developing a Web Services Client
VMware, Inc. 275