OH3 Variable Doesn't work --> ruleFilename

I just discovered the OH 2.x variable (ruleFilename) doesn’t work with OH3.x.

// This must reside at the end of the rule file
rule "Rule File Parsed - default.rules"
	when
        System started
	then
		systemStarted.postUpdate(ON)	
        logInfo("RuleParsed", ruleFilename);
end

Best, Jay

Is that documented somewhere?
I know there was talk of it two rules engine versions ago

sure that you didn’t use a global variable in your DSL file ?
For 2.5.12 I use a global variable with the name ruleFilename. Wouldn’t that be a naming conflict in case OH 2.5.12 itself would support that name and it is defined as variable in a DSL file ?

1 Like

You are correct, my bad.

It was a global variable that wasn’t there after me trying to get my v2.4 rule base to run on v3.x and testing with just 1 rule.

Best, Jay

1 Like