GetFolderFlows API¶
Returns the workflow definitions that are active on a specified folder. Optionally includes workflows inherited from parent folders.
Step definitions are not included in the response. Use GetFlowDef to retrieve the full definition with steps and tasks for a specific workflow.
Endpoint¶
Methods¶
- GET
/srv.asmx/GetFolderFlows?AuthenticationTicket=...&FolderPath=...&IncludeInheritedFlows=... - POST
/srv.asmx/GetFolderFlows(form data) - SOAP Action:
http://tempuri.org/GetFolderFlows
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
AuthenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
FolderPath |
string | Yes | Full infoRouter path of the folder (e.g. /Corporate/Contracts). |
IncludeInheritedFlows |
boolean | Yes | true to also include workflows inherited from parent folders; false to return only workflows directly assigned to this folder. |
Response¶
Success Response¶
<response success="true">
<FlowDefs>
<FlowDef
FlowDefID="126"
FlowName="ContractApproval"
DomainId="45"
DomainName="Corporate"
ActiveFolderPath="/Corporate/Contracts"
RequiresStartUpPlayers="false"
Active="true"
OnEndMoveToPath="/Corporate/Archive"
OnEndEventUrl=""
Hide="False">
<Supervisors>
<User id="7" UserName="john.smith" FullName="John Smith" />
</Supervisors>
</FlowDef>
<FlowDef ... />
</FlowDefs>
</response>
An empty result (no workflows on the folder) returns:
Error Response¶
FlowDef Attributes¶
| Attribute | Description |
|---|---|
FlowDefID |
Unique numeric identifier of the workflow definition. |
FlowName |
Name of the workflow definition. |
DomainId |
Numeric ID of the owning domain/library. |
DomainName |
Name of the owning domain/library. |
ActiveFolderPath |
Full infoRouter path of the folder where the workflow is active. |
RequiresStartUpPlayers |
true if the workflow requires startup players to be assigned at submission time. |
Active |
true if the workflow is currently active and accepting new submissions. |
OnEndMoveToPath |
Path documents are moved to when the workflow completes. Empty string if disabled. |
OnEndEventUrl |
Webhook URL called when the workflow completes. Empty string if disabled. Called with an HTTP POST when the workflow ends; see CreateFlowDef3. |
Hide |
True if the workflow is hidden from the folder UI. |
The <Supervisors> element lists the workflow-level supervisors: <User id="..." UserName="..." FullName="..."/> and <Group id="..." GroupName="..." DomainName="..."/>. Send a user back to UpdateWorkflowDefinition by its UserName (or as ~U<id>).
Required Permissions¶
Any authenticated user may call this API.
Example¶
GET Request¶
GET /srv.asmx/GetFolderFlows
?AuthenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&FolderPath=/Corporate/Contracts
&IncludeInheritedFlows=false
HTTP/1.1
Host: yourserver
POST Request¶
POST /srv.asmx/GetFolderFlows HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded
AuthenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&FolderPath=/Corporate/Contracts&IncludeInheritedFlows=false
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;
}
Lists the definitions whose active folder this is. With IncludeInheritedFlows=true the definitions
of the folders above it are listed too.
const root = await call('GetFolderFlows', {
authenticationTicket: ticket,
FolderPath: '/Public/Invoices',
IncludeInheritedFlows: false
});
for (const flowDef of root.querySelectorAll('FlowDef')) {
console.log(flowDef.getAttribute('FlowName'), flowDef.getAttribute('Active'));
}
A call with no ticket is the anonymous user rather than an error, and it answers with an empty list.
Notes¶
- Step and task definitions are not included. To get the full workflow definition with all steps and tasks, call GetFlowDef with the
FlowNameandDomainNamefrom the response. - Use
IncludeInheritedFlows=trueto see all workflows a document in this folder could be submitted to, including those defined on ancestor folders. - Use
IncludeInheritedFlows=falseto see only workflows whoseActiveFolderPathis exactly this folder. - To list all workflows for a domain regardless of folder, use GetDomainFlows.
Related APIs¶
- GetDomainFlows -" List all workflow definitions for a domain.
- GetFlowDef -" Get the full definition of a single workflow including steps and tasks.
- SubmitDocumentToFlow -" Submit a document to a workflow.
- CreateFlowDef -" Create a new workflow definition.
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown |
4041 |
no folder at that path, or one the caller cannot see |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |