-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix context being re-used for next execution #2760
Conversation
Trigger information is inserted in the execution context. This information is changed to the new information each time the context is updated with the same keys. If the context of the next execution does not contain values for each key, the old key is re-used, leading e.g. to wrong event information in the context. The solution is to re-set the individual context after each execution. Signed-off-by: Jan N. Klug <github@klug.nrw>
This is not just DSL, it affects all JSR-223 rule engines, too. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
.../org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java
Outdated
Show resolved
Hide resolved
…a/org/openhab/core/automation/module/script/internal/handler/AbstractScriptModuleHandler.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and thanks!
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/triggeringitemname-fails-with-cron/135210/3 |
Trigger information is inserted in the execution context. This information is changed to the new information each time the context is updated with the same keys. If the context of the next execution does not contain values for each key, the old key is re-used, leading e.g. to wrong event information in the context. The solution is to re-set the individual context after each execution. Signed-off-by: Jan N. Klug <github@klug.nrw> GitOrigin-RevId: 6906927
Fixes #2751
Trigger information is inserted in the execution context. This information is changed to the new information each time the context is updated with the same keys. If the context of the next execution does not contain values for each key, the old key is re-used, leading e.g. to wrong event information in the context.
The solution is to remove the content of the triggering context after each execution.
Signed-off-by: Jan N. Klug github@klug.nrw