Add "before" and "after" states + data to EventBus #4247
dlhck
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
Sometimes you need to run a process only if certain condition is filled.
When listening to Entity-updates, the specific data that the process depends on might not have changed and this would cause an unnecessary execution each time the update happens.
Describe the solution you'd like
There should be a "before"-object which contains the Entity-data before the update happened and an "after"-object which would then contain the data after the update.
This way you could filter out the unnecessary code executions by checking if the specific data-field is the same as before.
Describe alternatives you've considered
Include a map of fields that had changes with the before/after-values.
Additional context
N / A
All reactions