</fields>
<links>
<link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
+ <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<actions>
}
# tell the world we activated a PO
- $U->create_events_for_hook('acqpo.activate', $po, $po->ordering_agency);
+ $U->create_events_for_hook('acqpo.activated', $po, $po->ordering_agency);
return undef;
}
use OpenILS::Utils::Fieldmapper;
use OpenILS::Application::AppUtils;
use OpenILS::Application::Acq::EDI;
+use OpenSRF::Utils::Logger q/$logger/;
INIT {
$debug = 1;
}
}
},
- order_by => {atev => 'add_time'}
+ order_by => {atev => ['add_time']}
};
$query->{limit} = $remaining if $remaining > 0;
print "Event definition ", $def->id, " has ", scalar(@$events), " event(s)\n";
foreach (@$events) {
- my $event = $e->retrieve_action_trigger_event($_);
+
+ my $event = $e->retrieve_action_trigger_event([
+ $_->{id},
+ {flesh => 1, flesh_fields => {atev => ['template_output']}}
+ ]);
+
my $message = Fieldmapper::acq::edi_message->new;
$message->create_time('NOW'); # will need this later when we try to update from the object
print "Event ", $event->id, " targets PO ", $event->target, ":\n"; # target is an opaque identifier, so we cannot flesh it