[OPEN-ILS-DEV] Understanding the action / trigger / hook / reactor / validator architecture

Mike Rylander mrylander at gmail.com
Wed Mar 24 20:26:24 EDT 2010


On Wed, Mar 24, 2010 at 5:54 PM, Dan Scott <dan at coffeecode.net> wrote:
> Some further corrections and answers, based on IRC assistance from Mike
> Rylander, Bill Erickson, and Benjamin Shum today:
>
> On Tue, 2010-03-23 at 16:10 -0400, Dan Scott wrote:
>

[snip]

>> Questions:
>>   * If there are two Owning Libraries for a given Hook - say, CONS and
>> BR1 - does the deeper library in the hierarchy override the definition
>> for the hook, or does the action get triggered for both libraries in the
>> hierarchy for what is essentially the same event?
>
> Bill answered this - the answer is no. However, you can clone the base
> definition, leave that disabled, and enable the clone(s) at the system
> or branch levels with their respective values. Note that if you have one
> branch that wants a different event definition parameter - say,
> processing delay - you will need to create event definitions for all
> branches within the same system, even if the other 99 branches under the
> same system have identical parameters.
>

To talk about this further, the reason that this duplication is
required if one "deeper" org wants something special that cannot be
handled directly in the template is there's no way to say "this is the
same as a more org-specific event definition, so don't use it."

The definition id is different, so we can't use that.  We could look
at hook, but no, we want to be able to do more than one thing when
definitions use, say, checkout.due.  We could look a definition name,
but matching on human-entered strings is brittle at best.  We could
compare some subset of the definition fields, but that's certain to
paint us into a corner.

One thing we could consider doing would be to invent an admin
controlled "purpose" table, and allow the definition creator to select
the purpose of the definition.  Then, when looking for definitions
that we may want to create events for, take the "deepest" per purpose.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list