--- id: ORC-2 family: RT-ORC level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-orc/orc-2 specification: FlowDrop Workflow Specification 1.0-draft licence: CC BY 4.0 --- # ORC-2 — How the execution strategy for a run is resolved *RT-ORC (Part II) · level: core · profiles: runtime · added in 1.0* Every configured step is checked before it is honoured, so an engine that is configured but not available cannot capture the default and strand a run. ## The rule > **Normative.** This is the rule. > > 1. The strategy for a run is resolved in this order: a run started from a pre-save trigger uses direct synchronous execution; otherwise the strategy configured on the trigger; otherwise the strategy configured for the implementation; otherwise asynchronous. > > 2. A configured strategy is accepted only if it validates as usable, and a step that does not validate is skipped in favour of the next. ## What it means The chain runs presave first, unconditionally. Even where a trigger declares asynchronous and the implementation's own default is state graph, a run fired by a presave event still executes synchronously, because the record's save is still in flight and only an in-request pass can observe it before it lands. What counts as presave is a substring match, not a fixed prefix: any event name that carries `.presave` anywhere in it qualifies. A differently-prefixed event forces the same synchronous strategy as the conventional one. Past that first step, each remaining step in the chain is honoured only if it validates as usable — a step naming a strategy the implementation cannot resolve is skipped in favour of the next, so a stale or uninstalled configuration cannot silently capture the default. ## Example A run whose trigger defaults to asynchronous and whose implementation defaults to state graph, fired by two differently-named presave events: ```json title="A conventionally-prefixed presave event" verdict="synchronous" "entity.node.presave" ``` ```json title="A presave event with an unrelated prefix" verdict="synchronous" "flowdrop.custom.presave.something" ``` Both resolve to the synchronous strategy, ahead of either configured default. ## Related rules - Names: ORC-1, ORC-3, ORC-4 - Referenced by: ORC-1, ORC-3, ORC-4, ORC-12 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.