This is a two pronged question and our Test environment is currently down so I haven't been able to test it, but wanted to reach out to the community to see if others had any thoughts/experience in this particular area.
Right now we have a few processes that run on update for any idea/project to calculate risk/alignment scores. There are various weight factors used in these calculations. Currently, a custom object "Weight Factors" was created that stores the different values ("alignment_quality=3", "risk_funding=2", etc). On each process run, a SELECT query runs on the DB to grab the required values (one process for alignment, one process for risk each for project and idea, depending). These values very rarely change, maybe once in the last year.
I am in the process of re-writing these scripts in prep for our 13.2/3 upgrade (currently 13.0) to use XOG instead of direct sql:update commands.
My question is if there is a better way to handle this sort of thing? This is the first instance I've come across but I'm sure there are similarly designed scripts I haven't begun on yet. Is it better to use an array with the values (align[quality]=3, risk[funding]=2, etc) and place that in a globally persisting variable? I've not yet tried to use arrays or persisting variables so I'm not sure what the implications of either would be, so I'm looking for some opinions.
How are global variables created? With an otherwise "empty" script that only has their declarations and manually execute that script any time a value is changed?