The Logic Condition is logical combination of other conditions.
Overview
The Logic Condition is a logical combination of other conditions. The logical connection between the member conditions is termed by an LDAP String filter identifying the involved conditions by index and introducing the relationship between them via operators. For example, the expression:(|(&(0=true)(1=false))(2=true))states that the Logic Condition will be satisfied if its first condition is satisfied and its second one is not satisfied, or if its third one is satisfied. The following paragraphs explain the term "satisfied" in detail:
When a condition is activated, that is, there is a change in the associated parameter, the condition can be satisfied or not and after the activation has finished it remains in this state.
The satisfaction of condition depends on its type. The condition types which represent comparable conditions have a constraint value, comparison operation and a triggering value which is the last parameter value which has lead to activating the condition ("triggering value). The triggering value and constraint value are compared by the comparison operation and the satisfaction of condition is the result from the operation. In this way a comparable condition can stay satisfied after the moment when it has been activated.
The non-comparable conditions become satisfied only at the moment of activation. For example, a timer condition is satisfied when it is activated and not satisfied in the rest of the time.
The logic condition can be activated when any of the participating conditions becomes active and it must recalculate the satisfied state of all participants and then apply the logic operation over these values.
Managing Logic Conditions
Via Java API
After creating a condition as described in Managing Conditions you can configure it by using the following methods:
After you configure your condition, call the save method. The Condition Provider will save the condition in Config Tree.
Via ConfigTree
All conditions are stored in the Config Tree, which allows you to import/export them and to add/edit them by simply creating and modifying XML files.
The following snippet contains one Logic condition which is triggered when IntervalTimerCondition1 evaluates to false and StatusCondition3 evaluates to true.
<config name="LogicCondition4">
<property key="expression" value="(&(0=true)(1=false))" type="string"/>
<config name="1">
<property key="condition_id" value="IntervalTimerCondition1" type="string"/>
<property key="condition_type" value="IntervalTimerCondition" type="string"/>
</config>
<config name="0">
<property key="condition_id" value="StatusCondition3" type="string"/>
<property key="condition_type" value="StatusCondition" type="string"/>
</config>
</config>