Short Version: Does a running WHILE loop (repeating actions) terminate when a rule is re-triggered?
Long Version: I have two rules...let's call them Rule A and Rule B. Rule A is triggered when my thermostat mode (home, away, etc.) changes. It sets some zone occupancy states (various HVAC zones are declared occupied or unoccupied) and then Runs rule B. Rule B is triggered by either Rule A or by a change in my thermostat's operating state (idle, heating, cooling, etc.). If idle, the rule exits. If heating or cooling, the rule evaluates the temperatures and occupancy states of each zone and closes any zone damper to spaces that are either unoccupied or where the setpoint is already satisfied. A while loop continues to check each zone every minute or so and closes off each zone that becomes satisfied. Once the heating or cooling cycle is done, the operating state returns to idle, the WHILE loop terminates and the rule opens all the dampers before exiting.
I'm tinkering with the rule tonight to change some things and am seeing some undesireable behavior. It seems I have a timing issue. There are some cases where the mode changes (triggering Rule A) while there is an active heating or cooling cycle (Rule B is already running). When Rule A completes and triggers Rule B (which is already running and repeating actions), the two instances of Rule B are conflicting with each other. Is this accurate? Or am I looking at this the wrong way? If I'm right, is there a way that Rule A can terminate the repeating actions of Rule B before re-triggering it?
I should also add that I use a local boolean in Rule B. The rule has a predicate condition for the boolean to be TRUE. The first action of Rule B is to set the local boolean to FALSE, and then back to TRUE before the rule exits. If the local boolean is false, will the "Run Actions" command from Rule A even work?