Closed czosel closed 3 years ago
I think we're coming back to what we discussed a few weeks ago, in the context of integrating other software components that need to do something when something in Caluma hapens.
Triggering configurable webhooks on certain events seems to be the most simple and generic way to implement this.
The data format surely needs some in-depth consideration, but in short, it should provide enough information so that a receiving system will be able to query more information if needed (ie. provide case/document/workitem identifiers etc). If we choose the webhook data format properly, we should be able to directly post to mattermost/slack etc, but also be able to install a custom notification service to send emails or some webapp notification etc.
One question with such systems is how we deal with network outages: Should we retry in case a target service is not reachable, or would it be acceptable to just do "fire and forget"?
Another thought would be if we should consider using a message queue system. But since Caluma is a rather low-frequency system, I think simple webhooks (in whatever form) would be enough.
I like the idea of webhooks as it is loose coupling.
if we used a message queue with the help of celery a requirement like Notify the addressed group of a work item when it's deadline is about to end
could be easier implemented and Caluma is more reliable.
Question as mentioned is what actual webhooks are needed (I would say only start with the once where there is a real use case) and what data is sent.
I think we can close this, as we do have thorough support for events now (see #970)
A very common use-case in workflow systems are notifications that inform users, typically when a new work item has been added to their todo list. In one of our projects we have the following requirement:
Notify the addressed group when a new work item has been created
Notify the creator of a multilple instance work item / of a child case when all work item instances have been completed
Notify the addressed group of a work item when it's deadline is about to end
Some way to manage notifcation preferences
Things to think about:
/cc @winged @kaldras @open-dynaMIX @sliverc