openHAB 3.0 Milestone 2 discussion

In the past I’ve noticed that when running an Action Script directly (e.g. by triggering a Rule using the play button or running the rule from another rule) that some things are missing from the context. The mode impactful missing thing is access to the Actions. For example:

var Log = Java.type("org.openhab.core.model.script.actions.Log");
Log.logError("Experiments", "This is an OH error log");
Log.logWarn("Experiments", "This is an OH warn log");
Log.logInfo("Experiments", "This is an OH info log");
Log.logDebug("Experiments", "This is an OH debug log");

This run just fine when the rule i triggered by an Item event. But if it’s triggered by pressing play or triggering it from another rule I get a Class not found exception on org.openhab.core.model.script.actions.Log.

Is this also the case with these scripts? If so it’s a pretty significant limitation and need to be mentioned. If not than “woohoo!” :smiley: