RemoveCurrentWorkflow API

Permanently removes the running workflow from a document. All workflow tasks, task attachments, running workflow steps, and the workflow execution record are deleted. The document's workflow fields are cleared so it can be submitted to a new workflow.

This is a hard delete with no email notifications. To stop a workflow gracefully (with notifications to task assignees), use StopCurrentWorkflow instead.

Endpoint

/srv.asmx/RemoveCurrentWorkflow

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 removed (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 tasks in the workflow may have been both started and finished Yes

If any task has both a StartDate and a FinishDate set (i.e., it was completed), the operation is rejected. Use StopCurrentWorkflow if completed tasks are present.

What Happens on Success

  1. All workflow task attachments linked to the running workflow are deleted.
  2. All workflow tasks (IRTASKS) belonging to the running workflow are deleted.
  3. All running workflow steps (RUNNINGWFSTEPS) are deleted.
  4. The running workflow record (RUNNINGWF) is deleted.
  5. The document's workflow fields in the PUBLICATION table are cleared (e.g., CurrentFlowId reset to 0).
  6. No email notifications are sent to task assignees or the submitter.

Example

GET Request

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

POST Request

POST /srv.asmx/RemoveCurrentWorkflow 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.
Finished tasks exist One or more tasks have already been completed; the workflow cannot be removed.