CommandResult
The one outward result of a command, answered over HTTP and SSE, carried by wait signals and cross-context receipts: what the command reached at one hop of its wait chain.
function is who produced it: the command's decide function, or the subscription that handled the commit.
version is the aggregate's version after the commit, or the unchanged one.
duplicate: the request was already committed, so it was not decided again; results are then empty, since they are only answered by the first commit.
error is set when status is Status.REJECTED or Status.FAILED.
derived lists, on a saga's hop, the ids of the commands it derived from the commit.
signalTime is when it was produced, in epoch milliseconds.
transformedFrom is the command the request named when a transformer turned it into this one; null when none did.
chainEnded marks the final result of a wait whose chain ended before its plan did: a hop, such as a saga's that derived no command (a declined payment, say), left nothing to reach the plan's later hops. The result stays at that hop, with its own status: it is not the plan's last hop reached. pending lists the hops of the plan that were not reached, in order; it is empty unless chainEnded.
Fields may be added: construct a result with succeeded, rejected or failed, such as a fake of a command gateway answers in a test; the constructor is internal to Wow.
Constructors
Types
Properties
Functions
This CommandResult with the given fields replaced: Wow's own copy, left out of the ABI.