Metadata-Version: 2.5
Name: trytond_score_analytics
Version: 8.0.0.2
Summary: Score Workflow Engine — KPIs, Cycle Time and Bottleneck Analysis
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: analytics,bottleneck,engine,kpi,score,sla,tryton,workflow
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Requires-Python: >=3.10
Requires-Dist: trytond-company<8.1,>=8.0
Requires-Dist: trytond-score-timer<8.1,>=8.0
Requires-Dist: trytond-score<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Requires-Dist: trytond-score-task<8.1,>=8.0; extra == 'test'
Description-Content-Type: text/x-rst

Score Analytics Module
======================

The ``score_analytics`` module turns the history of the ``score``
workflow engine into management information: how long work takes, where
it piles up, how the throughput evolves, and how many promises were
broken.

The engine moves a run and records what it did - every firing writes a
row of ``score.instance.log``, and the runtime holds where each run
stands right now - but that material is an audit of one run, not an
answer to the questions a deployment asks about itself.  This module is
that answer: six windows read from the history and the runtime, each of
them a screen, a board and a line of the report.

The definitions it is built on are few.  The cycle time of a transition
is the dwell time of the state it goes from, which is what makes the
time a run waits for a person and the time a run waits for a machine the
same measurement; a percentile is computed in the database rather than
in Python; and a bottleneck is a rank among the states of one workflow
rather than an absolute duration, because a rank is what is relative to
a definition by nature.

Every figure is a query.  The models that carry them declare a
``table_query`` - the idiom of the reporting models of the core - so
trytond reads through them and refuses to write to them, and no counter
is kept beside the history that a firing would have to keep in step.
The grouping happens in the database as well: none of the models loops
over the instances of a deployment, so the cost of a report is the cost
of scanning the history through its indexes.

A deployment whose history is too large to be grouped at every read may
ask trytond to materialise the heavier queries as materialised views;
the module ships the job that refreshes them and does nothing at all
while the deployment has not asked for a materialisation.

Two jobs of ``ir.cron`` are added, both shipped deactivated: the refresh
of the materialised aggregates, and a periodic report that renders the
figures of the month that just ended once and keeps them as an
attachment, so that the management information of a period is a record
of what the deployment saw at the time.

``score_task`` is an optional dependency.  The breaches of a group of
people are read from the work items of a run, so the window that reads
them, its screen and its access rules are registered and loaded only
when that module is activated; a deployment that runs the engine without
the work items of a task has no assignee to attribute a breach to.
