This is an old revision of the document!
Table of Contents
Action/Trigger (Notifications)
Author: Bill Erickson
Created on: Dec. 7, 2009
Important Concepts & Terminology
IDL
See the description in Dan Scott's Evergreen Workshop
Hook
A reference to an action within the ILS. This is how we indicate what types of behaviour we want to react to. Examples include "hold.available" (item became ready for pickup from the holds shelf) and "checkout.due" (circulating item is due).
- Hooks have a core object type which defines the primary context object for the action. The core type is represented by the IDL class name. For example, the core type for "checkout.due" is "circ", the core type for "hold.available" is "ahr".
- Hooks can be active or passive. An active hook is one whose event creation occurs in real time. An example of an active hook is "hold.available". It is considered "active", because an action occurs within the ILS from which to fire off the event creation. In other words, a copy was physically scanned in and put on the shelf. Events for passive hooks are created in batch via regularly scheduled (CRON) processes. An example of a passive hook would be "checkout.due". There is no action within the ILS that occurs the moment an item becomes due. It's simply the result of passing time.
Validator
Module that validates context data prior to reaction. This is critical for supporting delayed reactions. Common examples include "HoldIsAvailable", "CircIsOverdue", and "CircIsOpen".
For developers: The system looks for validator modules in the OpenILS::Application::Trigger::Validator namespace. If they are not found, it searches the Perl library path
Reactor
Module that defines how the system should respond to actions that match configured hooks. The most common example is "SendEmail".
For developers: The system looks for reactor modules in the OpenILS::Application::Trigger::Reactor namespace. If they are not found, it searches the Perl library path.
Cleanup
Module that performs post-reaction cleanup operations. The system support success cleanups and failure cleanup modules. This type of module is useful for cleaning up temporary files, etc.
Event Definitions
The Event Definition is the heart of the action/trigger configuration. It ties together a hook, validator, reactor, cleanup(er), template, and other settings to define a single reaction context. If you said, "I want to set up 7-day overdue email notices", you'd be talking about configuring an event definition.
Under normal circumstances, the hooks, validators, reactors, and cleanup modules will already be in place. All an administrator needs to do is set up the event definition to pull those pieces together. Below is a discussion of the event definition fields and how they are used.