Class NoneMatchCombinatorDelegate

java.lang.Object
io.axoniq.framework.workflow.runtime.execution.NoneMatchCombinatorDelegate
All Implemented Interfaces:
NoneMatchCombinator

@Internal public class NoneMatchCombinatorDelegate extends Object implements NoneMatchCombinator
Default implementation of NoneMatchCombinator.
Since:
5.4.0
Author:
Stefan Dragisic
See Also:
  • Constructor Details

    • NoneMatchCombinatorDelegate

      @Internal public NoneMatchCombinatorDelegate(WorkflowExecution workflowExecution)
      Creates a new delegate backed by the given workflow state.
      Parameters:
      workflowExecution - the workflow execution.
  • Method Details

    • noneMatch

      Description copied from interface: NoneMatchCombinator
      Guard combinator — ensures no completed result matches the given predicate. Short-circuits on the first match.

      Short-circuit (match found)

      When a completed result matches the predicate, it becomes the "violator". The composite delegates all state queries to the violating result. Remaining results are not automatically cancelled — the caller is responsible for cancelling if desired.

      Success (all complete, none matched)

      When all results complete without any matching the predicate: isSuccess()=true, result()=empty, isFailure()=false.

      Completion

      isCompleted() is non-blocking and returns true when any completed result matches the predicate or when all results have reached a terminal state.

      Cancellation

      cancel() and cancel(reason) propagate to all results.

      Summary

      Similar to .allMatch() but with guard semantics: succeeds when none match, but short-circuits on first match to avoid cascading errors.

      Result categorization

      The returned CombinatorWorkflowStepResult provides matched() and unmatched() to access categorized sub-results. For noneMatch(WorkflowStepResult::failure, failingStep, slowStep) where failingStep fails (short-circuits) and slowStep is still running:

      • matched() → [failingStep] — results that satisfied failure() (violators!)
      • unmatched() → [slowStep] — all other results, including those not yet completed
      Specified by:
      noneMatch in interface NoneMatchCombinator
      Parameters:
      predicate - the predicate that no result should match.
      results - the step results to guard.
      Returns:
      a composite result which succeeds when no result matches, or short-circuits on the first match.