Click or drag to resize

TreeEvents

Vishnu generates and processes all significant events within the Tree als TreeEvents. In this chapter you will find out which TreeEvents are available and how you can work with them.

TreeEvents and their use

All essential TreeEvents and their triggers are listed in a table below. Further down, examples are shown of how you can use TreeEvents.

Vishnu-TreeEvents

TreeEvent

Trigger

LogicalResultChanged

The logical result of a node has changed from true (green) to false (red) or vice versa

AnyLogicalResultChanged

The logical result of a node or one of its sub-nodes has changed from true (green) to false (red) or vice versa

True

The logical result of a node has changed to true (green)

False

The logical result of a node has changed to false (red)

ResultChanged

The user result of a node has changed

AnyResultChanged

The user result of a node or one of its sub-nodes has changed

Exception

An unforeseen event (usually an error) has occurred in a node or one of its sub-nodes

You can use TreeEvents via Triggers, Workers and Loggers, see the following example:

JobDescription.xml
<?xml version="1.0" encoding="utf-8"?>
<JobDescription>
  <LogicalName>Check TreeEvents</LogicalName>
  <LogicalExpression>flipflop1 XOR flipflop2</LogicalExpression>
  <JobLogger>
    <PhysicalPath>TextFileLogger.dll</PhysicalPath>
    <Parameters>Exception|LogicalResultChanged</Parameters>
  </JobLogger>
  <Checkers type="array">
    <Checker>
      <LogicalName>flipflop1</LogicalName>
      <PhysicalPath>TrueFalseExceptionChecker.dll</PhysicalPath>
      <Parameters>Null:True:False:Exception</Parameters>
      <Trigger>
        <PhysicalPath>TimerTrigger.dll</PhysicalPath>
        <Parameters>S:10</Parameters>
      </Trigger>
    </Checker>
  </Checkers>
  <Checkers type="array">
    <Checker>
      <LogicalName>flipflop2</LogicalName>
      <PhysicalPath>TrueFalseExceptionChecker.dll</PhysicalPath>
      <Parameters>True:False</Parameters>
      <Trigger>
        <Reference>AnyLogicalResultChanged|Exception</Reference>
        <Parameters>flipflop1</Parameters>
      </Trigger>
    </Checker>
  </Checkers>
  <Workers type="array">
    <Worker>
      <LogicalExpression>flipflop1:Exception</LogicalExpression>
      <SubWorkers type="array">
        <SubWorker>
          <PhysicalPath>ConsoleMessageBox.exe</PhysicalPath>
          <Parameters>%Timestamp%: %Event% from %Source% in %Sender%|%Exception%|Test Error</Parameters>
        </SubWorker>
      </SubWorkers>
    </Worker>
  </Workers>
</JobDescription>