Lots of users use Node Red. It’s a good system that has good OH integration.
I am an advanced user and I’ve not encountered a situation where I’ve needed a global variable. Honestly, I don’t even have that many dummy Items (I hate that term, there is nothing dummy or fake about these Items, they are just Items not linked to a device). As Russell asked, I too would be interested to understand more about the nature of the problem. Nothing can ever get fixed without more detail.
I find that most users that have this sort of experience with the Rules DSL have some experience with coding before coming to OH. To put it bluntly, you have to be willing to bend to the Rules DSL or you should use something else. Rules DSL will not bend to the way you want to do something. If you bend, I find it a relatively nice language to code Rules in. If you try to make it work like languages you are used to (though I’m not sure global variables are all that well supported in any modern language to be hionest) you will be unhappy.
Luckily there are at least half a dozen other options for you. If you want to stay within the OH ecosystem there’s JSR223 Rules which does support global variables I believe, at least in-so-far as Jython, JavaScript, or Groovy support them. There is NodeRed of course. @Spaceman_Spiff has developed his own Rules engine. I know there are plenty more options.
Depending on what you need the global variables for, you have lots of options in Rules DSL as well.
- Design Pattern: Encoding and Accessing Values in Rules
- map files and the transform Action a la Design Pattern: Human Readable Names in Messages
- centralize the logic into one Rule/set of Rules: Design Pattern: Separation of Behaviors
- Put the values in separate Items and relate them to each other by name: Design Pattern: Associated Items
- Create tags on the Items to store constants associated with that Item. for example, here is an email address associated with an Item that gets updated with the contents of the email to be sent:
String A0001_Heat_Manual_SendMail (Heat_Manual_SendMail) [ "address@email.com" ]
- If using JSR223 Rules, there is the ability to set and read metadata on an Item from rules providing another way to set properties on an Item without storing it in separate Items or in variables.
There are lots of options available. Each one is more or less appropriate based on what you want to use the global variable for.
I’m not trying to convince you or anyone not to use NodeRed. But I don’t want to leave statements like “no global vars” hanging out there for future readers to assume that there is no support for what they might want to do at all.