OutboundEnqueue applied to every non-edi_ table, and per record opened a
system session and queried edi_agreement_document, so every insert and
update of audit, auditDetail, worm_audit_chain, jobs, alerts and the
rest paid for it (and UPDATEs fetched old records for it).
- OutboundSourceTables (per EdiRuntime) caches the source tables that
have an active RECORD_CHANGE outbound document on an active agreement,
loaded from committed data. appliesTo answers from it, so other tables
do no work at all.
- Changes to edi_agreement / edi_agreement_document invalidate it, and
again after their transaction commits (a reload that raced the change
is discarded); until then the changing transaction bypasses the cache
and sees its own definitions. A 60s TTL covers other processes.
- onRecordsChanged resolves definitions (documents + active agreements)
once per event, not once per record. MANUAL and ESB_EVENT enqueue keep
their semantics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>