In version 3 we changed the way condition and channel synchronization works. In version 3 all conditions and channels are managed in the same way.
-
If you don't define any conditions in the policy, synchronization process will not modify already existing conditions. Example:
PolicyConfiguration configuration = PolicyConfiguration.builder() .policyName("Policy name") .incidentPreference(PolicyConfiguration.IncidentPreference.PER_POLICY) .build()
This configuration will not remove, create or update any existing condition.
-
If you define some conditions in the policy, then:
- conditions which are defined in configuration, but are missing will be created.
- conditions which are defined in configuration and already exist will be updated.
- conditions which are not defined in configuration, but already exist will be removed. Example:
PolicyConfiguration configuration = PolicyConfiguration.builder() .policyName("Policy name") .incidentPreference(PolicyConfiguration.IncidentPreference.PER_POLICY) .condition(condition1) .condition(condition2) .build()
This configuration will create/update condition1 and condition2, and will remove all other conditions.
-
If you define empty conditions list in the policy, then synchronization process will remove all existing conditions. Example:
PolicyConfiguration configuration = PolicyConfiguration.builder() .policyName("Policy name") .incidentPreference(PolicyConfiguration.IncidentPreference.PER_POLICY) .conditions(Collections.emptyList()) .build()
This configuration will not create nor update any conditions, but will remove all existing ones.
In version 2 there was no way to preserve already existing conditions. Existing conditions were removed in both cases: when you provided empty conditions list and when you didn't provide anything at all
In version 2 all conditions were by default disabled. In version 3 it has been changed and conditions are by default enabled