Summary
Implements the full architecture defined in ADR-0007: four co-equal execution models feeding a shared execution kernel, pluggable context bridging from CaseContext through WorkflowContext to AgenticScope and beyond, complete causal lineage across all nested boundaries, and frictionless langchain4j-agentic integration.
Design References
Child Epics
Epic
Area
#202
Agnostic routing layer and execution kernel
#203
ContextBridge protocol and worker-level context selection
#204
Scope propagation, return-path tracking, and write-through
#205
Complete causal lineage across all execution boundaries
#206
Orchestration — workflow-based (FlowWorker ↔ WorkOrchestrator)
#207
Orchestration — rules-based (Drools/DMN → WorkOrchestrator)
#208
Plan-based execution (PlanExecutor, Plan model, PlanSource SPI)
#209
langchain4j-agentic integration (AgenticScopeBridge, CasehubPlanner, AgentListener)
#210
Cancellation, timeout, and error recovery across boundaries
#211
Observability — lineage queries, context stack visibility, A2A tracing
Guiding Principles (from ADR-0007)
All four execution models share one execution kernel. Only the router differs.
No execution model is privileged — choreography is not the default.
Context model is worker-level, not case-level. Null bridge = CaseContext directly (backward compatible).
Every unit of work at every level emits a `CaseLedgerEntry`. `causedByEntryId` chains are complete.
langchain4j: `AgenticScope` ↔ `WorkflowContext` ↔ `CaseContext` — three distinct contexts, bridged not merged.
`ContextBridge` SPI makes future execution models and context types pluggable.
Suggested implementation order
epic: agnostic routing layer and execution kernel #202 Routing kernel (foundation for everything)
epic: ContextBridge protocol and worker-level context selection #203 ContextBridge (foundation for context work)
epic: scope propagation, return-path tracking, and context write-through #204 Scope propagation (enables correct multi-level context flow)
epic: complete causal lineage across all execution boundaries #205 Lineage (enables observability on all work done above)
epic: orchestration — workflow-based (FlowWorker ↔ WorkOrchestrator bridge) #206 Workflow orchestration (largest gap, highest demand)
epic: plan-based execution — PlanExecutor, Plan data model, PlanSource SPI #208 Planning (enables LLM-driven execution)
epic: langchain4j-agentic integration — AgenticScopeBridge, CasehubPlanner, AgentListener #209 langchain4j integration (builds on all of the above)
epic: orchestration — rules-based (Drools/DMN → WorkOrchestrator) #207 Rules orchestration (lower priority, existing primitives mostly cover it)
epic: cancellation, timeout, and error recovery across execution boundaries #210 Cancellation/error recovery (needed for production hardening)
epic: observability — cross-boundary lineage queries, context stack visibility, A2A tracing #211 Observability (builds on epic: complete causal lineage across all execution boundaries #205 ; progressive enhancement)
Summary
Implements the full architecture defined in ADR-0007: four co-equal execution models feeding a shared execution kernel, pluggable context bridging from CaseContext through WorkflowContext to AgenticScope and beyond, complete causal lineage across all nested boundaries, and frictionless langchain4j-agentic integration.
Design References
Child Epics
Guiding Principles (from ADR-0007)
Suggested implementation order