Restrictions being RetiredRule 4.0 is no longer going to have a section to define Restrictions. Restrictions were specified conditions that would prevent a rule from running. These are being retired for two reasons:
- Restrictions are no longer needed, as all of the conditions can be incorporated directly in a rule.
- Restrictions introduce unneeded overhead for every rule, while most rules do not use them. Thus, by retiring them, all rules will become more efficient.
- Nothing is logged when a rule is Restricted. This offers no insight to what might be going on.
If you have a Rule 4.0 that has Restrictions, they will still be present and continue to work in 2.1.3. In the next release, 2.1.4, they will become fully retired. In 2.1.4 Those rules that have Restrictions will no longer follow the Restrictions, and they will disappear from the rule. In the meantime, before the release of 2.1.4, all Restrictions should be reworked into the logic of your rule.
Here is a guide to one way to incorporate the Restrictions into your rule. In many cases, you may find a better way than what is shown below.
Only between two times:
IF (NOT Time Between X and Y) Exit Rule
Only on certain days of the week:
IF (NOT Day in [Tuesday, Wednesday]) Exit Rule
Only between two dates:
IF (NOT Between July 1 and July 31) Exit Rule
Only when mode is:
IF (NOT Mode in Evening, Night) Exit Rule
Switch to disable rule:
IF (Switch On) Exit Rule
Disable with Private Boolean:
IF (Private Boolean false) Exit Rule
Notice that for most of these it uses NOT Condition as part of a Simple Conditional Action. This could be simplified by not using NOT, but restating the condition in the reverse sense. For example, instead of
NOT Time Between X and Y, you could use
IF (Time Between Y and X) and get the same result. Also, each of these simply exits the rule when the Restriction is true (what the former Restrictions did as well). This could be changed so that the Restriction is a top level IF-THEN around all of the actions.