Interface NoneMatchCombinator
- All Known Subinterfaces:
WorkflowExecutionOperations
- All Known Implementing Classes:
NoneMatchCombinatorDelegate,WorkflowExecutionOperationsDelegation
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
-
Method Summary
Modifier and TypeMethodDescriptionnoneMatch(Predicate<WorkflowStepResult> predicate, WorkflowStepResult... results) Guard combinator — ensures no completed result matches the given predicate.
-
Method Details
-
noneMatch
CombinatorWorkflowStepResult noneMatch(Predicate<WorkflowStepResult> predicate, WorkflowStepResult... results) 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 returnstruewhen any completed result matches the predicate or when all results have reached a terminal state.Cancellation
cancel()andcancel(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
CombinatorWorkflowStepResultprovidesmatched()andunmatched()to access categorized sub-results. FornoneMatch(WorkflowStepResult::failure, failingStep, slowStep)where failingStep fails (short-circuits) and slowStep is still running:matched()→ [failingStep] — results that satisfiedfailure()(violators!)unmatched()→ [slowStep] — all other results, including those not yet completed
- 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.
-