How does MarkVision Messenger work?
98
IfThen(EventDataIs("state", "ACTIVE"))
Distribute
}
In this example,
And
was used to build a compound condition. The
While
loop is only entered or
repeated if the event is active for
Tray 3
. The code within the loop is the same as the code for the
Trigger on Active filter, except the
TimeIsAfter
condition is set to wait 1200 seconds (20 minutes).
Trigger on Either Active or Clear filters
Choose the
Trigger on Either Active or Clear
filter if you want to set your Action to execute each
time a condition becomes Active or Cleared.
For example, let's say you want to keep a log of all printer paper jams so you can determine the
average time it takes for a jam to be cleared. When a paper jam occurs, the printer generates an
event with a state of Active. This satisfies the condition of the filter and executes your Action.
When the paper jam is cleared, the printer generates another event with a state of Clear. This event
also satisfies the condition of the filter and executes your Action. You now have two lines in your log
file, one with the time at which the paper jam occurred and another with the time it was cleared.
Trigger on Active filters
Choose the
Trigger on Active
filter if you want to set your Action to execute its command only when
a condition becomes Active.
When you pull out a tray, the printer generates a Paper Tray Missing event with a state of Active.
This satisfies the condition of the filter and executes your Action, perhaps by sending an e-mail
notification.
When you push the tray back into place, the printer generates another Paper Tray Missing event, this
time with a state of Clear, which does not satisfy the condition of the filter. Therefore, your Action is
not executed and no one is notified when the event is cleared.
You can also choose to delay execution of your Action until the condition has been Active for a
specified amount of time. Let's say the e-mail recipient is receiving too many notifications and you
want to wait 20 minutes to see if the condition clears. By using the Delay Time option, you can create
a filter that won't send the e-mail notification unless the Paper Tray Missing condition has been
Active for 20 minutes.
Note:
The Delay Time
value is limited to 10 characters.