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.