How to use ArrayList globally in several rule files?

Hi.
I use ArrayList in my rules, file is grow to 120k, and it is hard to navigate and designer checks syntax too slow.
Can i declare val AlarmListActiveIDs = newArrayList globally to have access from several rule files?
Thank you.

No you can’t.

What on earth are you doing that you need that sort of ArrayList structure?

Have you considered moving some of this state to Items and using a Group or Groups as your ArrayLists? That would shrink your Rules files AND let you access them from any of your .rules files.

Hi @rlkoshak, thank you for your help.
I use ArrayList to store alarm list messages ("Door open, Door lock not locked, Water Leaks, CO2 too high, … ")
This for “Door lock not locked”:

AlarmList.add("Door lock not locked")
Alarm.sendCommand(ON)

I have oled+esp8266 mqtt screens that shows this messages, and sometimes more than 1 alarm is showing at same time (3 or 4):

var int OledLineId = 0
AlarmList.forEach[ str |
	publish ( MqttBroker, "/oled1/line" + OledLineId.toString, str.toString )
	OledLineId = OledLineId + 1 
]

If alarm is off:

AlarmList.remove("Door lock not locked")

You right, as you advised i create items on every alarmID, move it to group.