Metadata-Version: 2.5
Name: trytond_score_notification
Version: 8.0.0.1
Summary: Score Workflow Engine — Transition-Driven Notifications
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: email,engine,notification,score,tryton,webhook,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<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Requires-Dist: trytond-ensemble-communication<8.1,>=8.0; extra == 'test'
Requires-Dist: trytond-notification-email<8.1,>=8.0; extra == 'test'
Requires-Dist: trytond-score-task<8.1,>=8.0; extra == 'test'
Description-Content-Type: text/x-rst

Score Notifications
===================

The ``score_notification`` module tells the right people that something
needs attention, without duplicating the notification infrastructure a
deployment already runs.

It adds four kinds of action to the library of the ``score`` engine:

* **Notify User** notifies a user, named explicitly by the action or
  resolved from the record by a PYSON expression, or taken from the
  assignee of the work item of the run when ``score_task`` is installed.
* **Notify Group** notifies every member of a group.
* **Notify Party** notifies the party a PYSON expression resolves on the
  record the workflow drives.
* **Notify Webhook** posts a JSON payload to a URL, exactly like the
  webhook kind of the base engine.

Where the delivery goes is decided by the deployment: the module builds
on ``notification_email`` and on ``ensemble_communication`` when they are
installed, and falls back to the plain message and to the user inbox of
the core when they are not.  The dependency is soft: the module imports
neither, and it asks the pool which models are installed.

The message is rendered from a template record
(``score.notification.template``), with the record, the run, the
transition and the user in the evaluation context; when
``ensemble_communication`` is installed, an action may name one of its
message templates instead.

Identical notifications for the same instance, transition, action and
recipient are collapsed within a configurable window, so that a retried
transition does not spam the people it already told; and a delivery that
fails never rolls the transition back - it is recorded on the delivery
and retried according to the ``on_error`` policy of the action.
