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.