call

suspend fun call(model: AggregateModel<*>, command: Command<*>, wait: WaitContext?): CommandResult

Executes command, a synchronous call another context's saga made, as forward does with the call's wait context, and returns its result at COMMITTED, the target's answer to the call:

  • The execution runs in this coordinator's supervised scope and execution context, apart from the caller, as a waited command's does (stream): an HTTP request that is cancelled (its client gave up, its connection closed) does not cancel the command half-way through its commit, and a stopping node joins it. It runs in the caller's trace.

  • Its plan's timeout bounds it: the admission's default wait timeout, capped by the maximum (WaitOptions.defaultTimeout, WaitOptions.maxTimeout). A command whose outcome is not known by then is answered FAILED with ResultCodes.WAIT_TIMEOUT at ACCEPTED and goes on executing, its outcome logged: the calling saga retries with the same request id, which the kernel deduplicates.