Workflow engine service.
Orchestrates the full transition lifecycle:
Implements IWorkflowEngine.
Workflow engine service. Orchestrates the full transition lifecycle: 1. Load workflow definition from registry 2. Load workflow instance from store 3. Validate transition (existence, permissions, guards) 4. Persist new state + audit entry 5. Enqueue side-effect jobs (if job-queue provided) Implements IWorkflowEngine.
(create-workflow-service store registry)(create-workflow-service store registry job-queue)(create-workflow-service store registry job-queue guard-registry)(create-workflow-service store registry job-queue guard-registry each-tenant)Create a WorkflowService.
Args:
store - IWorkflowStore implementation
registry - IWorkflowRegistry implementation
job-queue - IJobQueue or nil (optional; required for side-effects)
guard-registry - Map of guard-key -> (fn [ctx] bool?) or nil
each-tenant - With tenancy, (fn [f]) that calls (f tenant) in each
tenant's schema and returns {:results [...] :failed n}
(wagoe.tenant.shell.tenant-iteration/for-each-tenant),
so auto-transitions reach tenant instances too
Returns: WorkflowService implementing IWorkflowEngine
Create a WorkflowService.
Args:
store - IWorkflowStore implementation
registry - IWorkflowRegistry implementation
job-queue - IJobQueue or nil (optional; required for side-effects)
guard-registry - Map of guard-key -> (fn [ctx] bool?) or nil
each-tenant - With tenancy, (fn [f]) that calls (f tenant) in each
tenant's schema and returns {:results [...] :failed n}
(`wagoe.tenant.shell.tenant-iteration/for-each-tenant`),
so auto-transitions reach tenant instances too
Returns:
WorkflowService implementing IWorkflowEnginecljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |