From b89897a52fc4a0fd94375bc1ad79aa340cdcabfe Mon Sep 17 00:00:00 2001 From: Robert Soulliere Date: Wed, 6 Oct 2010 11:47:27 -0400 Subject: [PATCH] Add content to action triggers chapter. --- 1.6/admin/actiontriggers.xml | 318 ++++++++++++++++++++++++++++++++++- 1 file changed, 315 insertions(+), 3 deletions(-) diff --git a/1.6/admin/actiontriggers.xml b/1.6/admin/actiontriggers.xml index 2ba9536f56..ff2ad72d5f 100644 --- a/1.6/admin/actiontriggers.xml +++ b/1.6/admin/actiontriggers.xml @@ -2,8 +2,320 @@ - Action Triggers - - + Action Triggers + + Action Triggers were introduced to Evergreen in 1.6. They allow administrators the ability to set up actions for specific events. They are useful for notification events such as + hold notifications. + + + To access the Action Triggers module, select + + Admin + Local Administration + Notifications / Action triggers + + + You must have Local Administrator permissions to access the Action Triggers module. + You will notice four tabs on this page: Event Definitions, Hooks, + Reactors and Validators. + +
+ Event Definitions + Event Definitions is the main tab and contains the key fields when working with action triggers. These fields include: + + Action Trigger Event Definitions + + + + + + Field + Description + + + + + Owning library + The shortname of the library for which the action / trigger / hook is defined. + + + Name + The name of the trigger event, that links to a trigger event environment containing a set of fields + that will be returned to the Validators / Reactors for processing. + + + Hooks + The name of the trigger for the trigger event. The underlying action_trigger.hook table defines the Fieldmapper + class in the core_type column off of which the rest of the field definitions hang. + + + Enabled + Sets the given trigger as enabled or disabled. This must be set to enabled for the Action trigger to run. + + + Processing Delay + Defines how long after a given trigger / hook event has occurred before the associated action (Reactor) + will be taken. + + + Processing Delay Field + Defines the field associated with the event on which the processing delay is calculated. For example, the processing delay + context field on the hold.capture hook (which has a core_type of ahr) is capture_time. + + + Processing Group Context Field + Used to batch actions based on its associated group. + + + Validators + The subroutines receive the trigger environment as an argument (see the linked Name for + the environment definition) and returns either 1 if the validator is true or 0 + if the validator returns false. + + + Reactors + Links the action trigger to the Reactor. + + + Max Event Validity Delay + Define the threshold for how far back the action_trigger_runner.pl script should reach to generate + a batch of events. + + + +
+ + + Creating New Action Triggers + + From the top menu, select + + Admin + Local Administration + Notifications / Action triggers + + + + Click on the New button. + Select an Owning Library. + Create a unique Name for your new action trigger. + Select the Hook. + Check the Enabled check box. + + Create a unique Name for your new action trigger. + Set the Processing Delay in the appropriate format. Eg. 7 days to run 7 days from the trigger event + or 00:01:00 to run 1 hour after the Processing Delay Context Field. + Set the Processing Delay Context Field and Processing Group Context Field. + Select the Validator, Reactor, Failure Cleanup and Success Cleanup. + + Set the Processing Delay Context Field and Processing Group Context Field. + Enter text in the Template text box if required. These are for email messages. Here is an sample + template for sending 90 day overdue notices: + + + + Once you are satisfied with your new event trigger , click the Savebutton located at the bottom of the + form + + A quick and easy way to create new action triggers is to clone an existing action trigger. + + Cloning Existing Action Triggers + + Check the check box next to the action trigger you wish to clone + + + Click the Clone Selected on the top left of the page. + + + An editing window with open. Notice that the fields will be populated with content from the cloned action trigger. Edit as necessary and + give the new action trigger a unique Name. + + + Click Save. + + + + Editing Action Triggers + + Check the check box next to the action trigger you wish to delete + + + Click the Delete Selected on the top left of the page. + + + + Before deleting an action trigger, you should consider disabling it through the editing form. This way you can simply enable it if you decide that you would like to use + the action trigger in the future. + + Deleting Action Triggers + + Check the check box next to the action trigger you wish to delete + + + Click the Delete Selected on the top left of the page. + + +
+
+ Hooks + Hooks define the Fieldmapper class in the core_type column off of which the rest of the field definitions hang. + + Hooks + + + + + + Field + Description + + + + + Hook Key + A unique name given to the hook. + + + Core Type + Used to link the action trigger to the IDL class in fm_IDL.xml + + + Description + Text to describe the purpose of the hook. + + + Passive + Indicates whether or not a hook requires the running of action_trigger_runner.pl with the option to + be processed. False means that the script is required for processing. + + + +
+ You may also create, edit and delete Hooks but the Core Type must refer to an IDL class in the fm_IDL.xml file. +
+
+ Reactors + Reactors link the trigger definition to the action to be carried out. + + Action Trigger Reactors + + + + + + Field + Description + + + + + Module Name + The name of the Module to run if the action trigger is validated. It must be defined as a subroutine in + /openils/lib/perl5/OpenILS/Application/Trigger/Reactor.pm or as a module + in /openils/lib/perl5/OpenILS/Application/Trigger/Reactor/*.pm. + + + Description + Decription of the Action to be carried out. + + + +
+ You may also create, edit and delete Reactors. Just remember that their must be an associated subroutine or module in the Reactor Perl module. +
+
+ Validators + Validators set the validation test to be preformed to determine whether the action trigger is executed. + + Action Trigger Validators + + + + + + + Field + Description + + + + + Module Name + The name of the subroutine in + /openils/lib/perl5/OpenILS/Application/Trigger/Reactor.pm to validate the action trigger. + + + Description + Decription of validation test to run. + + + +
+ You may also create, edit and delete Validators. Just remember that their must be an associated subroutine in the Reactor.pm Perl module. +
+
+ Processing Action Triggers + To run the action triggers, an Evergreen administrator will need to run the trigger processing script /openils/bin/action_trigger_runner.pl + . This should be set up as a cron job to run + periodically. + You will need to add some Hooks to the /openils/conf/action_trigger_filters.json file. Below is an example to add the password.reset_request, + hold.available and checkout.due hooks so that they will be processed by action_trigger_runner.pl. + + + +
-- 2.43.2