Recipes

Resolve Input conflicts

Enqueue, replace, or reject related Commands before they enter processing.

v0.1.0-dev.2Intermediateusecase_forge
Open source reference

Resolve Input conflicts

UseCaseInputConflictPolicy compares related Entries still in AdmissionQueue or PendingQueue. It does not inspect active Executions.

PolicyEffect
enqueuekeeps every related Entry; this is the default
replaceremoves all related waiting Entries and admits the new one
rejectNewpreserves waiting Entries and rejects the new one
dart
registerCommand<SaveDraft>(
  _save,
  instructions: const UseCaseInstructionOverrides(
    input: UseCaseInputInstructionOverrides(
      conflictPolicy: UseCaseInputConflictPolicy.replace,
    ),
  ),
);

replace and rejectNew require executionKey; enqueue does not. Replaced Entries are reported as replaced, while rejected new Entries use inputConflict. Neither kind becomes history because processing never started.

Choose replace for obsolete queued intent, rejectNew when the first waiting intent owns the slot, and enqueue when every accepted intent remains meaningful.

ARKTELOS

Purpose-built engineering systems for software that has to hold.