GetAllWorkflowStatistics API¶
Returns the statistics of every workflow definition of a domain/library, or of all the caller's libraries, in one call. Each entry is what GetWorkflowStatistics returns for one workflow, so a workflow report needs no call per workflow.
Endpoint¶
Methods¶
- GET
/srv.asmx/GetAllWorkflowStatistics?authenticationTicket=...&domainName=...&startDate=...&endDate=... - POST
/srv.asmx/GetAllWorkflowStatistics(form data) - SOAP Action:
http://tempuri.org/GetAllWorkflowStatistics
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
domainName |
string | No | The library whose workflows are wanted. Empty returns the workflows of every library the caller is a member of. |
startDate |
DateTime | No | Start of a date range. With endDate, each entry also carries SubmittedInRange, CompletedInRange and PendingInRange. |
endDate |
DateTime | No | End of the date range. |
Response¶
Success Response¶
A <Workflows> element with one <WorkflowStatistics> per workflow definition, active or not. DomainName and WorkflowName say which workflow an entry is of. The elements are those of GetWorkflowStatistics, including the two overdue counts explained there.
<response success="true" error="">
<Workflows>
<WorkflowStatistics>
<DomainName>Invoices</DomainName>
<WorkflowName>AP Invoice Approval</WorkflowName>
<ActiveFolderPath>\Invoices</ActiveFolderPath>
<AverageTimeSpanInHours>192</AverageTimeSpanInHours>
<AverageTimeSpanInText>8 Days</AverageTimeSpanInText>
<TotalPending>9</TotalPending>
<TotalCompleted>0</TotalCompleted>
<TotalOverdue>0</TotalOverdue>
<TotalWithOverdueTasks>9</TotalWithOverdueTasks>
</WorkflowStatistics>
<WorkflowStatistics>
...
</WorkflowStatistics>
</Workflows>
</response>
Without a date range the three ...InRange elements are present and nil, as in the single call.
Error Response¶
Required Permissions¶
Any authenticated (not anonymous) user. The workflows are the ones GetWorkflowDefinitions returns for the same domainName.
Example¶
Request (POST)¶
POST /srv.asmx/GetAllWorkflowStatistics HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=abc123&domainName=Invoices
Notes¶
- With
domainNameempty the libraries are those the caller is a member of, not every library in the system. This is the ruleGetWorkflowDefinitionshas. TotalWithOverdueTasksis the count of running workflows that have a task past its due date;TotalOverdueis the count past the workflow's own due date. See How overdue is counted.- The numbers of each workflow are counted as
GetWorkflowStatisticscounts them, one workflow after the other. The call saves the request and sign-in per workflow, not the counting.
Related APIs¶
- GetWorkflowStatistics - The statistics of one workflow
- GetWorkflowDefinitions - The workflow definitions
- GetAllDomainStatistics - The statistics of every library in one call
Error Codes¶
errorCode |
When |
|---|---|
4010 |
[901] the ticket is expired or unknown, or the caller is anonymous |
4041 |
domainName is not a library the caller can see |