User Story
As a process modeler, I want the agentic subprocess orchestrator to treat a startable activity and all downstream activities connected by sequence flows as a single tool invocation, so that the LLM only resumes when the complete fragment has finished executing.
Background
Today the orchestrator signals tool completion when the selected startable activity ends. This can result in the LLM resuming while downstream activities in the same process fragment are still executing.
The workflow engine already tracks execution completion correctly across sequence flows, gateways, conditions, and loops. The orchestrator should align its completion signal with the engine's notion of fragment completion.
Acceptance Criteria
- Tool completion is not triggered when the startable activity ends if downstream activities remain active.
- Tool completion is triggered only when the entire executable fragment has completed.
- Sequence flows following the startable activity are included automatically.
- Gateways and conditional paths are handled correctly using the engine's existing execution semantics.
- Loops within the fragment are handled correctly.
- The LLM receives exactly one completion event per tool invocation.
- Existing single-activity tools continue to function unchanged.
Technical Approach
- Hook into the existing plugin extension point where the engine determines that a child execution has fully completed.
- Use the engine's execution completion semantics as the source of truth.
- Add parse-time validation to ensure agent subprocesses disable engine auto-complete behaviour.
- Fail deployment when incompatible completion settings are detected.
Based on #53
User Story
As a process modeler, I want the agentic subprocess orchestrator to treat a startable activity and all downstream activities connected by sequence flows as a single tool invocation, so that the LLM only resumes when the complete fragment has finished executing.
Background
Today the orchestrator signals tool completion when the selected startable activity ends. This can result in the LLM resuming while downstream activities in the same process fragment are still executing.
The workflow engine already tracks execution completion correctly across sequence flows, gateways, conditions, and loops. The orchestrator should align its completion signal with the engine's notion of fragment completion.
Acceptance Criteria
Technical Approach
Based on #53