OpalScript task outcomes in Flow
An Action calling a public async component method exposes completed, canceled, and failed execution outputs. The original out connection remains immediate and is labeled Started in the editor. Existing graphs keep that behavior. Connect an outcome to continue after a task settles.
result carries a completed Task<T> value with a port type derived from T. status is completed, canceled, or failed; reason carries the cancellation reason or failure message; object is the ID of the acted-on object. Void tasks have no result pin. Entity and asset results cross into Flow as IDs, and lists cross as copied stored values through the source component's conversion boundary. Outcome values are scoped to that invocation's continuation. Two overlapping calls cannot overwrite one another's results.
Each targeted object has its own task outcome. A group action can therefore emit several completions, each with its own Object and Result. Connect failure and cancellation branches where a game needs recovery behavior. A missing target or missing component takes the failure path.
Outcome continuations run on a later active outer game frame, even when the task completes synchronously or before Flow's phase in the current frame. They pause with the game. Only connected outcome branches create subscriptions. The Started branch retains its immediate completion semantics, including inside a Flow Function; an outcome branch is a separate continuation and does not complete the Started subtree twice.
Reset, shutdown, graph replacement, and incompatible component API replacement release pending outcome subscriptions and retire queued continuations. Replacing an object under the calling object's saved ID does not give the new instance an old continuation. Task ownership still controls the operation itself: unsubscribing Flow does not cancel a component's task. A caller can use the component's authored cancel action when it intends to stop the operation.
An authored async action may compose operations with Task.All, Task.All<T> or Task.Race<T> and expose its resulting outcome through these same pins. There is no second Flow scheduler for composition. All cancels unfinished inputs on failure/cancellation; Race preserves its first terminal outcome and cancels unfinished losers. A race failure follows the failed branch, rather than waiting for another input to succeed.
Native Sprite Animator actions Play Animation and Wait and Wait for Animation Marker also return these task outcomes. Play completes after the actual last frame hold; a marker wait returns its zero-based frame index. Canceling a marker observer alone does not stop playback. The separate Animation Marker event exposes name, key, and frame through the existing component event route.