RWTH-EBC/FiLiP

Support of `alterationTypes` in subscriptions

Closed this issue · 3 comments

Descriptions
alterationTypes is added as new feature of Subscriptions since Orion 3.8 Orion 3.7, see here.

That allows the activation of subscriptions based on the following settings:

  • entityUpdate: notification is sent whenever a entity covered by the subscription is updated (no matter if the entity actually changed or not)
  • entityChange: notification is sent whenever a entity covered by the subscription is updated and it actually changes (or if it is not an actual update, but forcedUpdate option is used in the update request)
  • entityCreate: notification is sent whenever a entity covered by the subscription is created
  • entityDelete: notification is sent whenever a entity covered by the subscription is deleted

Use case
There can be many use cases. One potential use case is, using entityCreate to trigger some workflows (e.g. generating Grafana dashboard) every time a new entity is created.

Implementation
The data model of subscriptions need to be extended, i.e. subscriptions.subject.condition.alterationTypes

In #190, also need to update the version of supported Orion from 3.7.0 to 3.8.0, if this issue is closed. Maybe there are still other features of 3.8.0 to implement. After this implementation, the Orion version should be updated to 3.7.0

I added the code which checks whether Orion is >=3.6.0 for #190 , describing which functionality would not work, if a lesser version is used. Would you say you want a "hard limit" for the versions, warning about general lack of functionality if a version less then the current one (in this case after closing this issue 3.8.0) is used, or more a structured warning, in which the warnings detail which functionality wont work with the current version.

So for example right now, after closing #190, using 3.5.0 would result in a warning which would describe what wont work. Using 3.6.0 would result in no warning.

When working on the described issue here, one could also add the specific lack of functionality to the cb_version_checker, so that after closing this issue, using 3.6.0 would warn about the lack of functionality which is to be implemented in this issue