__PACKAGE__->register_method(
method => "fire_circ_events",
api_name => "open-ils.circ.fire_circ_trigger_events",
- authoritative => 1,
signature => q/
General event def runner for circ objects. If no event def ID
is provided, the hook will be used to find the best event_def
__PACKAGE__->register_method(
method => "fire_circ_events",
api_name => "open-ils.circ.fire_hold_trigger_events",
- authoritative => 1,
signature => q/
General event def runner for hold objects. If no event def ID
is provided, the hook will be used to find the best event_def
__PACKAGE__->register_method(
method => "fire_circ_events",
api_name => "open-ils.circ.fire_user_trigger_events",
- authoritative => 1,
signature => q/
General event def runner for user objects. If no event def ID
is provided, the hook will be used to find the best event_def
sub fire_circ_events {
my($self, $conn, $auth, $org_id, $event_def, $hook, $granularity, $target_ids, $user_data) = @_;
- my $e = new_editor(authtoken => $auth);
+ my $e = new_editor(authtoken => $auth, xact => 1);
return $e->event unless $e->checkauth;
my $targets;
return $e->event unless $e->allowed('VIEW_CIRCULATIONS', $org_id);
$targets = $e->batch_retrieve_action_circulation($target_ids);
}
+ $e->rollback; # FIXME using transaction because of pgpool/slony setups, but not
+ # simply making this method authoritative because of weirdness
+ # with transaction handling in A/T code that causes rollback
+ # failure down the line if handling many targets
- $e->rollback; # paranoia
return undef unless @$targets;
return $U->fire_object_event($event_def, $hook, $targets, $org_id, $granularity, $user_data);
}
var self = this;
fieldmapper.standardRequest(
- ['open-ils.circ', 'open-ils.circ.fire_circ_trigger_events.authoritative'],
+ ['open-ils.circ', 'open-ils.circ.fire_circ_trigger_events'],
{
async : true,
params : params,
var self = this;
fieldmapper.standardRequest(
- ['open-ils.circ', 'open-ils.circ.fire_circ_trigger_events.authoritative'],
+ ['open-ils.circ', 'open-ils.circ.fire_circ_trigger_events'],
{
async : true,
params : params,