Conditions
A condition is a high-level, logical test that defines the syntax for a rule.
A condition can be:
- A comparison
- A logical operator
- A looping construct
- A collection
Condition | Description | Parameters | Child Nodes |
---|---|---|---|
Comparison |
A comparison compares two values using a relationship and returns true or false to indicate whether the values fulfil the relationship. The data types of values that can be used depends on the relationship. |
None |
|
Reference |
Test for a reference between two objects. Specify the two objects and the name of the reference between them. The condition is satisfied if the first object refers to the second object using the given reference. |
|
None |
Test in Range |
Test that a value lies in the range between two other values. Specify whether or not the end points of the range should be included in the comparison ( i.e. > or ≥ ). The values can be integers, reals or strings. |
|
|
AND |
Logical AND condition. Used to combine two or more other conditions (supplied as child objects) and check that they are all true. |
None |
|
OR |
Logical OR condition. Used to combine two or more other conditions (supplied as child objects) and check of any of them are true. |
None |
|
XOR |
Logical XOR condition. Used to combine two or more conditions (as child nodes) and return true only if exactly one (but no more than one) of the conditions is true, or false otherwise. |
None |
|
NOT |
Logical NOT condition. Used to invert the result of another condition (supplied as a child object). For example, if the child condition is true, this condition returns false and vice-versa. |
None |
|
IF... THEN... ELSE |
This must have two or three child conditions. The first condition is checked and if it holds then the overall result is the result of checking the second condition. Otherwise, if the first condition does not hold, the overall result is the result of checking the third condition, or true if the third condition is omitted. |
None |
|
Existence |
This may be used to check for the existence (or absence) of related objects satisfying a condition specified in a clause. The objects in the clause are identified by the class and object label pair. You specify a qualifier ("at least", "at most", or "exactly"), a number of objects and another class name. The condition checks that there exists at least one object for which the child condition holds. To check for the absence of objects satisfying a condition, look for exactly 0 objects. |
|
|
For All |
Check that all related objects satisfy some other condition. This condition must have two child conditions. The first condition finds a set of objects, the second condition then checks that these objects meet certain requirements. |
|
|
Existence in Collection |
Checks whether the required number of elements exist in an object collection or an array that match the condition in the clause. |
|
|
For All in Collection |
Checks all objects or elements in a collection satisfy a condition. The condition requires a value which should be an array or a collection of objects, and a condition to check. For a collection of simple types, or objects of unspecified class, the class label may be omitted. Otherwise the class label specifies the type of object in the collection. |
|
|