elsa-core/test/unit/Elsa.Scheduling.UnitTests
Sipke Schoorstra 2138f0997b
fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup (#8161)
* fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup

Reconcile stored scheduling bookmarks against the workflow-instance store
during CreateSchedulesStartupTask so missing and finished instances are
skipped and deleted instead of being re-scheduled on every rebuild.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): add missing WorkflowStatus using in bookmark reconciler

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): revalidate orphan bookmarks immediately before purge

Collect only bookmark IDs during paged rebuild, reload those rows, and
re-run classification so a candidate whose instance became Running is
not deleted. Still purge missing/blank/terminal bookmarks only.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): schedule revived bookmarks and bound reconcile batches

Revalidation now schedules bookmarks whose instance became Running,
chunks reload/classify/delete by StartupSchedulePageSize, and skips
reconcile when IWorkflowInstanceStore or IBookmarkManager is absent.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 21:03:54 +02:00
..
Extensions Add extensive unit and component tests for scheduling activities (#7036) 2025-11-07 21:54:50 +01:00
ScheduledTasks Fix scheduling startup backlog catch-up 2026-06-21 19:43:09 +02:00
Services fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup (#8161) 2026-09-14 21:03:54 +02:00
StartupTasks fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup (#8161) 2026-09-14 21:03:54 +02:00
Elsa.Scheduling.UnitTests.csproj Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00