An event is an exceptional item of data, defined by specifying a query expression against items in a data package. When a record matches the event condition, it causes an agent to perform tasks.
When an agent runs, it checks the data for any event instances.
For example, you can specify an event condition as follows:
[Account_Balance] < 0
An event instance is a single row of data that matches
the event query expression. When an agent monitors data, it detects
each event instance. The agent then follows the task execution rules to
determine if it should perform a task.
Some types of tasks are performed only once by the agent. Other types of tasks are repeated for each event instance. For more information, see Task Frequency.
An event list shows the events processed by the agent. Each event is categorized by one of the following statuses:
new
ongoing but changed
ongoing and unchanged
ceased
When an agent runs, it derives the status by comparing the detected events with those detected in the previous run. There is only one event list per agent, and it is updated each time the agent runs.
For each task in an agent, the event list is checked against
the task execution rules . The task is performed for each event that
conforms to the rules.
An event key is used to determine whether an event is new, ongoing but changed, ongoing and unchanged, or ceased. Event Studio compares the event instances detected in each agent run with those detected in the previous run. To ensure it correctly matches the event instances for comparison, you must define an event key. The event key is the combination of data items that uniquely defines an event instance.
For example, you are dealing with orders that were placed for out-of-stock goods. You define Order Number as the event key, because each order placed has a unique number. If Order Number 1234 appears in this run and in the previous run, it is an ongoing event. If Order Number 4567 appears in this run, but not in the previous run, it is a new event. If Order Number 7890 appeared in the last run but not this one, it has ceased.
When an agent runs, it uses the event key to compare
the event instances it detects with those of the previous run. The
agent allocates a status to each event - new, ongoing but changed,
ongoing and unchanged, or ceased. If no event instances are detected,
the status is no events. The task execution rules specify the event
status for which each task is performed. You can optionally specify
that an event must also pass a Boolean test before it is used in
a task. If you do not set any execution rules, the agent performs
its tasks for all the event instances it detects.
You can also set a special task to execute if the agent fails, for example, if the agent condition fails or one of the agent’s tasks fails to complete. This special task can include items from the agent’s run history, such as its run time, status, and error messages.
You want to receive an email message advising you whenever a Gold category customer phones technical support about a new problem.
You specify that an email task be performed only when the event status is new. You receive an email when the call record from a Gold customer is first placed in the call database. However, even if the call record is still open the next time the agent runs, you receive no further emails because the status of the event is now ongoing.
You want a report to run if the account balance of an overdrawn customer changes.
You specify that a report task be performed only when the event status is ongoing but changed.
You want to receive a daily email that reassures you that none of your company’s accounts has a balance less than zero.
You define the following event condition:
[Account_Balance] < 0
You specify that an email task be performed if the event status is no events.
In this example, you may also want to create another task that sends an urgent email if any of the account balances does become less than zero. That is, you create another email task that is performed if the event status is new.
You want to email your Regional Managers whenever a very large order is received from a customer in their territory.
You create four calculated data items containing Boolean expressions:
Add four email tasks to the agent, one addressed to each Regional Manager. Add the appropriate task-level filter to each task. In this example, the task that emails the Northern Regional Manager includes only orders that pass the test Region = ‘North’.