Howdy,
I'm trying to extract common logic from some of my rules into scripts so there is a "one stop" location for such logic. However, as I've mentioned before, scripts has a very "step-child" feel compared to scripts (no import, no overall closure, etc). I'm working around most of these one way or another.
One that has come up a few times is the need to have a variable that is shared between a rule and a script. In the particular case I have, I'm creating a timer and need to be able to cancel and/or restart the timer. The timer needs to be "shared" between a rule that is run sometimes and a script that is run from several other rules.
I cannot isolate the timer to a script because scripts don't seem to run in a closure (or some sort of context) and script variables are not available for subsequent executions of the script (although, if someone knows a way around that, I'd love to solve it that way instead).
I'd be curious if any more advanced rule/script folks have a solution?
Thanks!!
Gerry