- Scripts to run workflows from a YAML context or run inputs (kab_run_workflow.py, with --input name=@file), store per-project discovery connections, bootstrap agent MCP keys, refresh the KAB token, publish reports and build estate snapshots. - Hyperscaler discovery servers extended in place; cloud-knowledge folded into them. - deploy/crucible-kab-dev.yaml: the Discovery package agent and the Assessment agents. - Platform issue write-ups and current-wiring notes under docs/platform-issues/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
5.0 KiB
Markdown
82 lines
5.0 KiB
Markdown
# A workflow can't run or chain another workflow
|
|
|
|
| | |
|
|
|---|---|
|
|
| Date | 2026-11-02 |
|
|
| Environment | `modernization-platform` @ `c89aedcb9`, read from source. Not reproduced on `crucible-kab-dev-aks` |
|
|
| Component | `agent-builder-temporal-workers`: the generic workflow executor and its step types. `agent-builder-api`: execution routes |
|
|
| Severity | Medium. Nothing fails, but a multi-stage engagement has to be wired by hand, workflow by workflow |
|
|
| Status | Open; for the platform team to confirm |
|
|
| Found by | Code review while planning the hand-off from ALZ-F01 Discovery to ALZ-F02 Assessment |
|
|
|
|
## Summary
|
|
|
|
A KAB workflow can't contain another workflow, and nothing starts a workflow when another one completes. Data moves
|
|
between workflows only through project artifacts. A person has to start the next workflow and name the artifact ids it
|
|
reads.
|
|
|
|
That affects any engagement that runs as a chain of workflows. CP1's Agentic Landing Zone runs as seven:
|
|
|
|
1. Discovery
|
|
2. Assessment
|
|
3. Strategy
|
|
4. Business Case
|
|
5. Target Architecture
|
|
6. Wave Planning
|
|
7. Landing Zone
|
|
|
|
Each one consumes the approved output of the one before.
|
|
|
|
How artifacts are registered, and how `select_artifacts` reads them, is covered in
|
|
[artifacts-step-within-a-run](../artifacts-step-within-a-run/report-2026-10-29.md). This report covers what's missing
|
|
around that: running or chaining workflows, and deriving inputs.
|
|
|
|
## What happens
|
|
|
|
| # | Behaviour | Code (`packages/agent-builder-temporal-workers/src/temporal/`) |
|
|
|---|---|---|
|
|
| 1 | The only step types are `sequential`, `parallel` and `conditional`, and every step must name an `agent`. No step type runs a workflow | `workflows/workflow_template_validator.py:14-16`, `:89-108` |
|
|
| 2 | No step activity starts a workflow. The fallback activity map holds agent calls, file parsing, `combine_inputs`, `format_for_ui` and domain activities | `activity_mapper.py:131-154` |
|
|
| 3 | Only two built-in pipelines start child workflows, and they're hard-coded. Designer-built and imported workflows can't do it | `workflows/language_ingestion_pipeline_workflow.py:122`, `workflows/business_rules_workflow.py:120` |
|
|
| 4 | When a run completes, nothing starts another one. The API only broadcasts `execution_complete` over Socket.IO | `agent-builder-api/src/services/execution_service.py:437` |
|
|
| 5 | Inputs can be derived only from inside the run. Sources are `from_steps` (dot paths), `from_workflow` (run inputs), run inputs named `<step_id>_<input>` (auto-mapped), `static` values, `combine_inputs`, and `==` / `!=` conditions over `steps.*` and `inputs.*`. There's no lookup or expression language, so nothing can resolve "the latest approved run of workflow A" | `workflows/generic_workflow_executor.py:194-210`, `:496-517`, `:600-660` |
|
|
|
|
No sub-workflow concept exists in `agent-builder-api/src` or `agent-builder-ui/src`. I searched for `sub_workflow`,
|
|
`subworkflow` and `nested`.
|
|
|
|
## Impact on the CP1 workflows
|
|
|
|
- **Assessment can't call Discovery or follow it automatically.** Each Feature runs on its own, and a person starts the
|
|
next one.
|
|
- **The artifact ids have to be entered by hand.** The Assessment run can take them as the run input
|
|
`<step_id>_artifact_ids` (behaviour 5), so the workflow needn't be edited for each engagement. But someone still has to
|
|
find the ids of the right Discovery run.
|
|
- **The platform doesn't check that the previous stage passed.** Outputs are registered whether or not the run failed,
|
|
the critic failed it, or a person rejected it. Each receiving workflow has to check for itself. Each selected entry
|
|
carries `metadata.status` and `source_execution_id` (`activities/artifacts_activities.py:468-482`), so the check can be
|
|
made.
|
|
|
|
## Workarounds in use
|
|
|
|
1. **Each Feature is its own workflow.** It starts with an Artifacts step, given the exact ids of the previous workflow's
|
|
artifacts as a run input. Never a name or a workflow id: see
|
|
[select-artifacts-tenant-scope](../select-artifacts-tenant-scope/report-2026-11-02.md).
|
|
2. **The receiving workflow checks the previous stage.** Its planner refuses to start unless the previous critic's verdict
|
|
is `pass` and its approval is recorded.
|
|
3. **References survive between runs.** Evidence references carry the producing `execution_id`.
|
|
4. **End-to-end tests run as one workflow.** Two stages can be combined into one workflow and wired with `from_steps`.
|
|
That gives up rerunning one stage on its own.
|
|
|
|
## Questions for the platform team
|
|
|
|
1. Is a workflow step planned that runs another workflow as a Temporal child workflow, waits for it, and exposes its
|
|
outputs to `from_steps`?
|
|
2. Or is a trigger planned: start workflow B when workflow A completes, passing A's registered artifact ids?
|
|
3. Could registered artifacts record the run's outcome (completed or failed, approved or rejected), and could
|
|
`select_artifacts` filter on it?
|
|
4. Could `select_artifacts` take an `execution_id` plus step ids, instead of raw artifact ids?
|
|
|
|
## Evidence
|
|
|
|
Code reading of `modernization-platform` @ `c89aedcb9`. Nothing was run against the platform, and nothing was changed.
|