Workflow Statistic REST API
We have now two new REST-Endpoints available:
https://developer.axonivy.com/api-browser?configUrl=https://developer.axonivy.com/doc/11.1/openapi/config.json&urls.primaryName=workflow#/
/designer/api/workflow/tasks/stats
/designer/api/workflow/cases/stats
Already important fields of task and cases are in the Elasticsearch index and can be used for aggregation (agg
) as for filtering (filter
) for given aggregations. Custom-Fields are available for task and cases are available, too.
Example
There is an example project how these statistic APIs can be used to render charts:
https://github.com/axonivy/workflow-stats-demo


Performance
According to our performance specialist @Jacek Lajdecki, the creation of the index (1mio cases, and 2mio tasks) takes 45 minutes. We can improve these times, heavily. The aggregation of so much data, takes no longer than 20ms, faster than Max Verstappen in Formel 1 🏎. Also the sizes of the indicies are totally fine. But depends on the amount of custom fields.

Sugar
You can now add to any rest service a query param called pretty
. Then the service will format the json output in a more human readable format.

Audience
- Process Developers
- System Operators
- Workflow Admins
Value
- Provide Insights about your Workflows
- Provide Interfaces to get data of Axon Ivy
Version
Discussion
Next steps
- Improve Indexing Performance
- May invest in reliable indexing
- No longer bound core rest endpoints to specific ivy applications (remove app in url)
- Improve debugging of Elasticsearch problems
- Now we need feedback from Team WaWa. We no longer will improve the REST API otherwise.