BestowalTodoCompletionListener
in package
implements
EventListenerInterface
Synchronizes bestowal projections and finalizes completed bestowals.
The core ActionItem subsystem stays plugin-agnostic and merely announces an
ActionItem.completed event. The Awards plugin listens for it here, syncs a
newly scheduled bestowal after the surrounding to-do transaction commits,
and flips the lifecycle to "given" once all gating checks are complete.
Best-effort: any failure is logged but never disrupts the to-do transition. One-directional by design — reopening a completed gating item does not revert a bestowal back to "open".
Table of Contents
Interfaces
- EventListenerInterface
Properties
Methods
- __construct() : mixed
- handleCompletedTodo() : void
- Synchronize or finalize the owning bestowal when a gating to-do completes.
- implementedEvents() : array<string, string>
Properties
$finalizationService
private
BestowalFinalizationService
$finalizationService
$syncService
private
BestowalRecommendationSyncService
$syncService
Methods
__construct()
public
__construct([BestowalRecommendationSyncService|null $syncService = null ][, BestowalFinalizationService|null $finalizationService = null ]) : mixed
Parameters
- $syncService : BestowalRecommendationSyncService|null = null
-
Recommendation projection sync.
- $finalizationService : BestowalFinalizationService|null = null
-
Bestowal finalization service.
handleCompletedTodo()
Synchronize or finalize the owning bestowal when a gating to-do completes.
public
handleCompletedTodo(EventInterface $event) : void
Parameters
- $event : EventInterface
-
The ActionItem.completed event.
implementedEvents()
public
implementedEvents() : array<string, string>