wait

suspend fun <C : Any> CommandClient.wait(command: C, aggregateId: String? = null, block: CommandRequest.Builder<C>.() -> Unit = {}): CommandResult

Sends command to the aggregate aggregateId names, with the fields block sets (wait(plan) among them), and waits for its result: CommandClient.wait of command's toCommandRequest.


suspend fun <C : Any> CommandClient.wait(command: C, to: AggregateRef, block: CommandRequest.Builder<C>.() -> Unit = {}): CommandResult

Sends command to the aggregate the ref to names and waits for its result; see wait of an id.