Issue of the topic: How to setup a FIFO queue to send commands
var pw = this.ctx[‘widget_password’];
However, whenever I try to submit the widget form, I get an error in the logs:
Failed to execute rule r_encrypt_credentials: TypeError: Cannot read property “widget_password” from undefined: TypeError: Cannot read property “widget_password” from undefined
at execute (credentials.js:12)
at doExecute (webpack://openhab/./node_modules/openhab/rules/rules.js?:242)
Note that unless you are careful this password can end up in the logs.
I assume you are not using Nashorn JS. That’s the Nashorn JS syntax. For GraalVM it’s just var pw = widget_password;. Nothing fancy. It’s just there.
I never tried this with file based rules. It might be the case that the way the execute function is set up and configured that it doesn’t get anything except the event passed into it. I don’t use file based rules so I don’t have any knowledge to draw on here. @florian-h05, I hate to tag you but is this another spot where file based and UI based rules are different? Are the passed in values even available? If not I think it should be. I can file an issue if it needed.