Workflow operations

When a workflow has been registered as a Web Service, the WDSL script that is created provides two operations, named Start Workflow() and EndWorkflow().

StartWorkflow()

The StartWorkflow() operation starts the workflow identified in the WSDL file. The inputs for the operation are the input parameters that were set for the workflow by the Register Workflow as Web Service Wizard. The result of the operation contains the following items:

token

A unique identifier for the workflow. This identifier is used in calls to the EndWorkflow() operation.

interval

The recommended polling interval after which the workflow’s status should be checked, in seconds. This may vary dynamically between calls.

EndWorkflow()

The EndWorkflow() operation obtains the execution status for a workflow. The input for the operation is a workflow token returned by the StartWorkflow() operation. The result of the operation contains the following items:

status

The execution status for the workflow. This may be set to one of the following:

Status Description
QUEUED The workflow has been queued because the limit for the number of workflows that may run concurrently has been reached. If you have LiveCompare Administrator permissions, this limit may be set using the MaxConcurrentProcesses setting in the Configuration - General screen. The workflow will run when it reaches the front of the queue and the number of running workflows drops below the MaxConcurrentProcesses limit.
RUNNING The workflow is running.
COMPLETED The workflow has run to completion.
FAILED The workflow started, but an error occurred while it was running.
UNRECOGNIZED_TOKEN The token used by the EndWorkflow() operation is no longer valid. A token becomes invalid after a call to EndWorkflow() for the token returns a status of either COMPLETED or FAILED.

message

If the workflow’s execution status is FAILED, ‘message’ contains a textual description of the error that occurred.

interval

The recommended polling interval after which the workflow’s status should be checked, in seconds. This may vary dynamically between calls.

workflowResult

If the workflow’s execution status is COMPLETED, ‘workflowResult’ contains the result of the workflow. This is the value of the output parameter that was set for the workflow by the Register Workflow as Web Service Wizard.

Related topics

Run a workflow from an external program

Run a workflow from an external program - Adder example