def execution_dispatch
import bendvy-ecs-core@0.1.0.4/ordinary_app_service_registration.bend as OrdinaryAppServiceRegistrationimport Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_execution_recipe.bend as Exec
import bendvy-ecs-core@0.1.0.4/execution_context.bend as Ctx
import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as Choice
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
import bendvy-ecs-core@0.1.0.4/ordinary_service_declaration.bend as D
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
123# Advanced closed routing composition; selects prior or service runner by retained
124# registration metadata, preserving both owners and tagging the failure branch.
125def execution_dispatch(~S:Data,~C:Type,~R:Type,~E:Data,~Payload:Type,~Rest:Type,~take:R -> Rest & D.Slot<Payload>,~put:Rest -> D.Slot<Payload> -> R,~call:Payload -> Payload,~declaration:D.Declaration<S,R,Payload,Rest,take,put,call>,~scan:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,D.Status<S>>,~Owners:Type,~Rows:Data,~prior:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:Owners -> Owners & List<&2,Records.Fields<S>>,~PriorError:Data,~priorPlan:Owners -> Owners & SP.Plan<S>,~priorDispatch:Owners -> Ctx.Context<W.World<S,C,R,E>> -> U32 -> Owners & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,PriorError,Unit>,~priorProvide:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,SP.Requirement<S>>) -> (Owners & Owner<S,C,R,E,Payload,Rest,take,put,call,declaration,scan>) -> Ctx.Context<W.World<S,C,R,E>> -> U32 -> (Owners & Owner<S,C,R,E,Payload,Rest,take,put,call,declaration,scan>) & Sys.Outcome<Ctx.Context<W.World<S,C,R,E>>,Choice.Choice<PriorError,Unit>,Unit>:
126 Exec.dispatch_pair(~S,~W.World<S,C,R,E>,~Owners,~Owner<S,C,R,E,Payload,Rest,take,put,call,declaration,scan>,~PriorError,~Unit,~fold,~priorDispatch,~execution_run(~S,~C,~R,~E,~Payload,~Rest,~take,~put,~call,~declaration,~scan))
Uses (18)
Used by (0)
No other definition uses this definition.