After the workflow completes its run, you can retrieve the results by calling the getWorkflowTokenResult( ) operation.

You must have implemented how workflows start in the Orchestrator server in the Web services client.


Obtain the results of a running workflow by calling the getWorkflowTokenResult( ) operation.

The getWorkflowTokenResult( ) operation stores the results as an array of attributes.

 WorkflowTokenAttribute[] retAttributes = 
                           username, password);

The preceding example code obtains the result of a workflow token with a specific identifier.


(Optional) Print the workflow results.

WorkflowTokenAttribute resultCode = retAttributes[0];
WorkflowTokenAttribute resultMessage = retAttributes[1];
System.out.println("Workflow output code ... (" + resultCode.getValue() + ")");
System.out.println("Workflow output message... (" + resultMessage.getValue() + ")");

Emit the workflow token's result attributes for display or for use by other applications.

for (int ii = 0; ii < retAttributes.length; ii++) {
          System.out.println("\tName:'" + retAttributes[ii].getName() 
                    + "' - Type:'" + retAttributes[ii].getType() 
                    + "' - Value:'" + retAttributes[ii].getValue()

The preceding example code prints out the name, type, and value of the workflow token's result attributes.

You defined a Web services client that finds objects in Orchestrator, runs workflows on them, interacts with the running workflows, and extracts the results of running those workflows.