I have a rule that, when triggered, I don't want to run again until it has completed (i.e. to not run concurrently with itself.
To do this, what I have now, is (snipping out the guts of the rule as its not relevant) as follows:
IF (variable = false) THEN
Set variable to true
Set variable to false
Where variable is a global variable, initially set to false.
Most of the time, this works. However, sometimes, variable gets stuck set to true. This makes no sense to me, unless the rule is somehow exiting before it completes (I have no such commands in the rule, just a bunch of nested ELSE-IF statements) I can't for the life of me figure out why, sometimes, variable doesn't get set back to false. If enable logging of the actions, but have never caught it happen, but from the logs I've looked over, the rule always seems to complete, all the IFs have matching END-IFs etc. so I've no idea.
Anyway, reading through some posts, it looks like one way to do this (which, from some other posts, perhaps is no longer valid) is to use the rule's private boolean. However those posts show a setting to "Enable / Disable with private boolean". I can't find this setting anywhere, so, I'm guessing it has been deprecated?
As far as I can see, what I've implemented should work, but, as I say, sometimes the global variable gets stuck true. I suppose I could hack it and periodically clear it, but that's horrible practice and would much rather figure out what's actually going on, or if there is a preferred method (private boolean?), switch to using that...
Thanks for any suggestions!