Skip to content

resolveDomainProcessBindings

resolveDomainProcessBindings(records): DomainProcessBindingRow[]

Defined in: packages/simply-aep-core/src/at4dxDomainProcessResolve.ts:69

Resolve raw DomainProcessBinding__mdt records into rows sorted by execution order within each (SObject, process context, trigger operation/domain method token) scope, flagging orderCollision where AT4DX itself doesn’t guarantee a deterministic tiebreak.

Unlike Application Factory bindings, there’s no “winner” here — every active record in a scope runs, in OrderOfExecution__c order. Within a scope, rows are sorted by order ascending and, for a Criteria and an Action sharing an order, Criteria first — a human reading the table wants to see everything gating a sequence before the actions that sequence runs, not an arbitrary interleaving. That display ordering is independent of collision detection: two active records of the same type sharing an order within a scope is the one thing worth flagging, since AT4DX’s Custom Metadata query has no ORDER BY tiebreak for equal order values within a type, so which one actually runs first isn’t something this command can determine (the same “flag it, don’t guess” precedent at4dxResolve.ts applies to ambiguous Domain bindings). A Criteria and an Action sharing an order never collide, since AT4DX’s runtime map keys them separately. Inactive records never contribute to a collision, since AT4DX skips them entirely.

RawDomainProcessBindingRecord[]

The raw binding records to resolve, as returned by scanOrgDomainProcessBindings/scanLocalDomainProcessBindings.

DomainProcessBindingRow[]

The resolved rows, grouped in first-seen order, sorted by order ascending (Criteria before Action on a tie) within each group.