Embedded Laravel applications can now listen for Workflow\V2\Events\WorkflowCancelled and Workflow\V2\Events\WorkflowTerminated when a run closes.
- Both events carry the existing workflow identity fields, the original command
reasonand the persisted UTCclosedAttimestamp. - Cooperative cancellation notifies after cleanup finishes or its deadline expires. A cancellation request alone emits no terminal notification.
- Notifications follow the run model's actual storage transaction. Rejected commands and rolled-back storage writes emit none; repeated delivery of a closed workflow job emits no duplicate close event.
- Ordinary run timeouts continue to emit
WorkflowFailed. Termination still does not execute workflow cleanup code.
This is an additive PHP event API; no database migration or wire-protocol change is required. These are in-process Laravel notifications, without a durable external-delivery guarantee. Broader transaction/storage work remains tracked in #893.
Implementation and qualification: #946. Delivery and installed-consumer/documentation acceptance: #896.