Skip to content

Release v22.88.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 17:06
fca0f4a

Summary

Reactors can handle the refusal of a command they invoke instead of failing the observer: they say which refusals they expect and what to record when one happens.

Added

  • Invoke.Command(command) returns a command invocation from a reactor, with .OnRefused(Refused.X, refusal => …) branches that append the returned events and .Acknowledge(Refused.X) to record that a refusal was handled. The first matching branch wins, and a handled refusal stops the remaining invocations of that reactor call (#3058)
  • Refused.ByValidation, Refused.ByConstraint(name), Refused.ByAnyConstraint, Refused.ByAuthorization and Refused.Any select refusals; Refused.Any covers validation and constraint refusals but not authorization (#3058)
  • CommandResult.GetRefusal() classifies a refused command as a validation, constraint (with all violated constraint names) or authorization refusal. Concurrency conflicts, exceptions, authorization configuration failures and framework failures are not refusals, so they still fail the observer and are retried (#3058)
  • Decision record https://github.com/Cratis/Arc/blob/main/decisions/0010-declarative-reactor-command-refusals.md describes the contract (#3058)

Changed

  • Validation results that Arc composes itself after stream completion use the new reason frameworkFailure instead of rule (#3058)