ActivateFlowDef API¶
Activates a workflow definition, allowing documents to be submitted to the workflow. The workflow must pass all validation rules before it can be activated.
Endpoint¶
Methods¶
- GET
/srv.asmx/ActivateFlowDef?authenticationTicket=...&domainName=...&flowName=... - POST
/srv.asmx/ActivateFlowDef(form data) - SOAP Action:
http://tempuri.org/ActivateFlowDef
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser |
domainName |
string | Yes | Name of the domain/library containing the workflow |
flowName |
string | Yes | Name of the workflow definition to activate |
Response¶
Success Response¶
Error Response¶
Required Permissions¶
- User must be authenticated (anonymous users cannot perform this action)
- User must have administrative rights to the domain containing the workflow
- User must have permission to manage workflow definitions
Workflow Activation Requirements¶
Before a workflow can be activated, it must meet the following criteria:
- At least one step defined - The workflow must contain one or more workflow steps
- Valid step configuration - Each step must be properly configured
- Task assignments - Each step must have at least one task with valid player assignments (users or groups)
- Active folder - The workflow must have a valid active folder path assigned
- No circular dependencies - Step transitions must not create infinite loops
Example¶
Request (GET)¶
GET /srv.asmx/ActivateFlowDef?authenticationTicket=abc123-def456&domainName=Engineering&flowName=DocumentReview HTTP/1.1
Host: server.example.com
Request (POST)¶
POST /srv.asmx/ActivateFlowDef HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=abc123-def456&domainName=Engineering&flowName=DocumentReview
Request (SOAP 1.1)¶
POST /srv.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/ActivateFlowDef"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ActivateFlowDef xmlns="http://tempuri.org/">
<authenticationTicket>abc123-def456</authenticationTicket>
<domainName>Engineering</domainName>
<flowName>DocumentReview</flowName>
</ActivateFlowDef>
</soap:Body>
</soap:Envelope>
Success Response¶
Error Response Example¶
<?xml version="1.0" encoding="utf-8"?>
<response success="false" error="Workflow must have at least one step defined" />
Related APIs¶
CreateFlowDef- Create a new workflow definitionCreateFlowDef1- Create workflow with end folderCreateFlowDef2- Create workflow with supervisorCreateFlowDef3- Create workflow with full optionsDeactivateFlowDef- Deactivate an active workflowGetFlowDef- Get workflow definition detailsGetDomainFlows- List all workflows in a domainAddFlowStepDef- Add a step to workflowAddFlowTaskDef- Add a task to workflow stepSubmitDocumentToFlow- Submit a document to active workflowSubmitDocumentToFlow1- Submit with player assignments
JavaScript¶
Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and
errorCode is the number to report.
async function call(action, params) {
const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
const root = new DOMParser()
.parseFromString(await response.text(), 'text/xml')
.documentElement;
if (root.getAttribute('success') !== 'true') {
throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
}
return root;
}
Turns a definition on so documents can be submitted to it. Every step must have at least one task definition; a step without one is refused and the message names the step number.
await call('ActivateFlowDef', {
authenticationTicket: ticket,
domainName: 'Public',
flowName: 'Invoice approval'
});
Notes¶
- Once activated, documents can be submitted to the workflow using
SubmitDocumentToFlowAPI - An active workflow cannot be modified - it must be deactivated first using
DeactivateFlowDef - The workflow validation checks are performed server-side during activation
- If activation fails due to validation errors, the error message will indicate the specific issue
- Workflows can be re-activated after being deactivated
- Active workflows appear in the workflow submission UI for users with appropriate permissions
Workflow Lifecycle¶
Created (Inactive)
?
[ActivateFlowDef] ? Active (Ready for submissions)
?
[DeactivateFlowDef] ? Inactive (No new submissions)
?
[ActivateFlowDef] ? Active (Can be re-activated)
Best Practices¶
- Test Before Activation: Verify workflow configuration using
GetFlowDefbefore activating - Document Requirements: Ensure all steps and tasks are properly documented for workflow participants
- Permission Review: Verify that all assigned players (users/groups) have appropriate access to the active folder
- Notification Setup: Configure task notification settings before activation
- Version Control: Consider naming conventions for workflow versions (e.g., "DocumentReview_v2")
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown |
4000 |
no definition by that name, or a step has no task definition - the message names the step |
4030 |
the caller may not manage workflows in that library |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |