Add durable workflow triggers and waits

This commit is contained in:
2026-08-01 20:57:26 +02:00
parent 55f98d1b65
commit a1cea1d162
12 changed files with 2213 additions and 275 deletions
+18 -9
View File
@@ -116,18 +116,22 @@ The first executable slice now provides:
- an operator dialog for starting, inspecting, and advancing instances
- an owner-side Service launcher that starts an authorized active definition,
retains the exact Service/binding provenance, and safely replays Portal calls
- activation-bound API, one-time/interval schedule, platform-event, and
parent-workflow trigger registrations with exact-revision dispatch
- durable duration/deadline/event wait subscriptions and scale-out-safe claims
- a separate transactional platform-event consumer with bounded JSON filters
and variable mappings, idempotent delivery, and current-authority rechecks
The next execution slices should provide:
The next execution depth should provide:
- static workflow definition registration from configuration packages
- event, API, schedule, and parent-workflow start dispatchers
- guard hooks implemented through capability calls
- registry-driven generic module-action execution records
- action/effect previews for transitions that call other modules
- explicit blocked, retryable, quarantined, manual-required, and
compensation-required states
- dashboard summary provider
- event emission and audit integration
- cron/calendar scheduling through a governed scheduler adapter
## Permissions
@@ -165,11 +169,13 @@ Current tables:
- `workflow_instances`
- `workflow_instance_steps`
- `workflow_instance_events`
- `workflow_triggers`
- `workflow_trigger_deliveries`
- `workflow_wait_states`
Future generic action execution and timers may add:
Future generic action execution may add:
- `workflow_command_records`
- `workflow_timers`
Definitions should be immutable by version after activation. Instances should
reference the exact version used at start.
@@ -196,8 +202,11 @@ Minimum tests:
- events are emitted for start/transition/completion
- configuration package can install a simple workflow definition
## Open Decisions
## Bounded Decisions
- Whether long-running timers use Celery beat, a module scheduler, or an ops
scheduler abstraction.
- How workflow variables are redacted and retained.
- Native scheduling deliberately supports one-time and minimum-60-second
interval triggers. Cron/calendar semantics belong to a future governed
scheduler adapter rather than an unbounded expression evaluator in Engine.
- Platform events contain sanitized lifecycle context, not raw instance
variables. Definition mappings can select only bounded event fields; broader
variable retention/redaction remains policy-controlled product depth.