OH5 - rule errors

I haven’t even checked that, if so, it’s a total red herring. I just tried to find something that changed that could explain why something that used to be initialized in 4.x isn’t always in 5.x, and the fact that re-saving the rules sometimes helps is also strange if the rule is always compiled when running.

DSL might compile and cache internally …
Maybe it’s a startup issue and you could try starting DSL later?

It’s pretty clearly a “startup issue” as I see it in that the code is executed before ScriptStandaloneSetup has been initialized. But, it is initialized by the rule engine when it starts, so if the rule engine is the first thing that executes/compiles a rule, the initialization should already have taken place. Also, the things I’ve looked at here, mostly seem to have been the way they are “since the dawn of time”, and yet, this problem is new since around 5.0.

I haven’t reproduced it myself, so it’s hard to analyze in detail, I was just trying to think what could possibly explain this.