Part of epic #24.
Port and adapt TaskDefinition from casehub-poc's casehub-core as a higher-level authoring API.
What it does
TaskDefinition lets users define case behaviour (entry criteria, produced keys, execution logic) without constructing Worker + Binding pairs directly against the raw engine model. The framework compiles a TaskDefinition into the corresponding engine primitives at registration time.
POC reference
io.casehub.core.TaskDefinition — interface with entryCriteria(), producedKeys(), execute(CaseFile), timeout, and retry policy.
io.casehub.core.TaskDefinitionRegistry — registration with circular dependency validation.
Scope
- Decide whether
TaskDefinition belongs in api/ (shared across repos) or is app-local to this service
- Port the interface, adapting
CaseFile references to the current engine model (CaseContext)
- Implement compilation:
TaskDefinition → Worker + Binding at registration time
- Port circular dependency validation from
TaskDefinitionRegistry
Open question
Whether entryCriteria / producedKeys semantics map cleanly to the current engine's Worker + Binding model, or need adaptation.
Depends on
Part of epic #24.
Port and adapt
TaskDefinitionfrom casehub-poc'scasehub-coreas a higher-level authoring API.What it does
TaskDefinitionlets users define case behaviour (entry criteria, produced keys, execution logic) without constructingWorker+Bindingpairs directly against the raw engine model. The framework compiles aTaskDefinitioninto the corresponding engine primitives at registration time.POC reference
io.casehub.core.TaskDefinition— interface withentryCriteria(),producedKeys(),execute(CaseFile), timeout, and retry policy.io.casehub.core.TaskDefinitionRegistry— registration with circular dependency validation.Scope
TaskDefinitionbelongs inapi/(shared across repos) or is app-local to this serviceCaseFilereferences to the current engine model (CaseContext)TaskDefinition→Worker+Bindingat registration timeTaskDefinitionRegistryOpen question
Whether
entryCriteria/producedKeyssemantics map cleanly to the current engine'sWorker+Bindingmodel, or need adaptation.Depends on
TaskDefinition-compiled workers need to coexist with YAML definitions