![]() |
Vishnu Logic |
Vishnu sets your logical expression (LogicalExpression, see also Configuration and parameters) internally into a corresponding tree structure (Tree), which is processed logically and which you will ultimately find again in the normal representation ("Logical Task Tree"). What this looks like in detail and which logical expressions Vishnu understands can be read in this chapter.
During processing, the logical result of a node is derived from the results of its sub-nodes. Let's take another look at the demo job A simple Example for clarification.
The "CheckDiskSpace" node is displayed in red because the Checker of the sub-node "Check_D" returned "false" ("Free" with 143636 MB was smaller than "Minimum" with 200000 MB). Since "CheckDiskSpace" connects its sub-nodes with a logical AND, "Check_DiskSpace" consequently goes also to "false" (red). This is then propagated upwards in the tree and "Check All" also goes to "false" (red).
We need to take a closer look at the "CheckServers" node. This node is green (true), although one of its "grandchild" nodes "Local_Backup" is red, i.e. has reported "false". As you can see from the following excerpt from the JobDescription.xml, the problematic node "Local_Backup" is connected to the node "Local" via an OR and this connection is bracketed as a whole.
... <LogicalName>CheckServers</LogicalName> <LogicalExpression>(Google AND Heise) AND (Local OR Local_Backup)</LogicalExpression> ...
Since it is sufficient for a logical OR if one of the two partners is "true" (green), the anonymous intermediate node inserted by Vishnu instead of the brackets becomes "true" (green). The other anonymous intermediate node, which connects "Google" and "Heise" via AND, is green anyway, which means that "CheckServers" ultimately also becomes green. Vishnu always creates intermediate nodes when a logical expression contains several operators (AND, OR, etc.) with different binding strengths (e.g. AND binds more tightly than OR) or when you have placed brackets.
![]() |
---|
You can also use parentheses when they are not necessary from a purely logical point of view to make Vishnu create anonymous intermediate nodes and thus make the screen display more compact. |
LogicalExpressions can be formulated in two slightly different ways (shown in our example above):
<LogicalExpression>(Google AND Heise) AND (Local OR Local_Backup)</LogicalExpression>
<LogicalExpression><![CDATA[(Google AND Heise) AND (Local OR Local_Backup)]]></LogicalExpression>
The second form, in which the logical expression is additionally enclosed in "<![CDATA[" und "]]>", has the advantage that special characters may also appear in the logical expression. This makes it possible, to write Operators in their short form (see operator table below).
Operator |
Syntax |
Short forms |
---|---|---|
Is equal (identity) |
'IS' |
':' |
Is not (negation) |
'NOT' |
'!' |
Logical AND |
'AND' |
'&' |
Logical OR |
'OR' |
'|' |
Exclusive-OR (either or) |
'XOR' |
'><' |
Implication (it follows) |
'IMP' |
'=>' |
not AND |
'NAND' |
'!&' |
not OR |
'NOR' |
'!|' |
not exclusive-OR |
'XNOR' |
'!><' |
Opening Bracket |
'GROUP' |
'(', '[', '{' |
Closing Bracket |
UNGROUP' |
')', ']', '}' |
Is equal |
'EQ' |
'==', '=' |
Is not equal |
'NE' |
'<>' |
Is less than |
'LT' |
'<' |
Is less than or equal to |
'LE' |
'<=' |
Is greater than |
GT' |
'>' |
Is greater than or equal to |
'GE' |
'>=' |
Threshold value 10%, 20%, ... , 80%, 90% |
'TR10', 'TR20', ... , 'TR80', 'TR90' |
--- |
![]() |
---|
A variable in a LogicalExpression such as "Google" or "Heise" can occur several times in more complex logical constructs. Vishnu then displays it multiple times in the tree, but internally ensures that an associated Checker is only executed once. |
Further information
The Threshold logic checks
whether a certain percentage of the job's subordinate nodes
have returned the result . If the percentage
(threshold) set by the selected operator is reached or
exceeded, the entire job goes to
(green display).
In the example below with a total of 10 checkers, the
threshold value of 50% was passed via the
TR50 operator. As can be seen, from the
5th green checker onwards, the job also goes to green
(true).
Operators can usually be used in a chain with a total of more than two arguments. This means that, for example, more than just two Checkers can be related using the XOR operator (see image below). The same applies, for example, to comparison operators.