StopCurrentWorkflow API

Gracefully stops the running workflow on a document. All pending tasks are dropped, email notifications are sent to dropped task assignees, and the workflow submitter and supervisors receive a workflow-finished notification. The on-end event URL is also fired if the workflow definition has one configured.

Unlike RemoveCurrentWorkflow, this operation:

Endpoint

/srv.asmx/StopCurrentWorkflow

Methods

Parameters

Parameter Type Required Description
authenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
path string Yes Full path of the document whose running workflow should be stopped (e.g. /Cabinet/Project/document.pdf).

Response

Success Response

<root success="true" />

Error Response

<root success="false" error="Access Denied" />

Required Permissions

The calling user must be either:

Anonymous access is not permitted.

Preconditions

Condition Required
Document must exist at the specified path Yes
Document must currently be in a workflow (CurrentFlowId > 0) Yes
No restriction on completed tasks

Unlike RemoveCurrentWorkflow, this API does not fail if some tasks have already been completed.

What Happens on Success

  1. All pending workflow tasks are dropped (status set to Dropped).
  2. The running workflow record and related data are marked as stopped.
  3. Email notifications are sent to all dropped task assignees (ON_WORKFLOWSTOPPED event).
  4. An ON_WORKFLOWFINISHED notification is sent to the workflow submitter and all supervisors, indicating who stopped the workflow.
  5. If the workflow definition has an on-end event URL configured, it is called with a JSON payload containing FinishStatus: "Stop" and the workflow details.

Example

GET Request

GET /srv.asmx/StopCurrentWorkflow
    ?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
    &path=/Cabinet/ProjectDocs/proposal.pdf
HTTP/1.1
Host: yourserver

POST Request

POST /srv.asmx/StopCurrentWorkflow HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&path=/Cabinet/ProjectDocs/proposal.pdf

Notes

Error Codes

Error Description
[900] Authentication failed — invalid credentials.
[901] Session expired or invalid authentication ticket.
Document not found No document exists at the specified path.
Document not in workflow The document does not have an active running workflow.
Access Denied Calling user is not the workflow submitter or a workflow supervisor.