update_sub_flow
Replaces the cc:steps body of a named sub-flow in assembly.xml to fill TODO stubs from planning, preserving async-mediation settings and validating XML before writing a backup.
Instructions
Replaces the cc:steps body of a named sub-flow in assembly.xml. Use this to fill in a TODO stub generated by plan_integration.
Finds <cc:async-mediation id="Do{sub_flow_id}"> and replaces its cc:steps content with steps_xml. Everything else on the async-mediation is preserved: routes-to, handle-downstream-errors, and the trailing cc:send-error.
steps_xml format:
Provide the step elements that go INSIDE cc:steps. Do not include the wrapper.
Use \t for tabs. Steps should sit at 4-tab depth (matching skeleton indent).
Example for a RAAS fetch + eval: \t\t\t\t<cc:workday-out-rest id="GetWorkers" routes-response-to="TODO_next" \t\t\t\t extra-path="@{intsys.reportService.getExtrapath('alias')}"/>
TOP-LEVEL ELEMENTS WARNING (Studio schema rule confirmed in multiple production builds): The following elements CANNOT appear inside steps_xml — they MUST be top-level elements placed directly inside cc:assembly, not inside cc:steps:
cc:workday-out-rest
cc:splitter
cc:http-out
cc:email-out
cc:workday-out-soap If your sub-flow needs to call any of these, place them as top-level elements in the assembly and chain to them via routes-to on the async-mediation itself. The validate_assembly tool will catch this mistake automatically.
A .bak backup is written before every change. XML well-formedness is validated before the write is committed.
To also change the routes-to on the async-mediation itself (e.g. from "EndGetWorkers" to "Splitter"), use write_integration_file for a full rewrite.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_name": "<project_name>",
"sub_flow_id": "<sub_flow_id>",
"steps_xml": "<steps_xml>"
},
"name": "update_sub_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps_xml | Yes | New step elements for inside <cc:steps>. Omit the <cc:steps> wrapper. Use \t for tabs at 4-tab depth. | |
| sub_flow_id | Yes | Base id used in plan_integration, e.g. "GetWorkers" (NOT "DoGetWorkers"). The tool looks for id="Do{sub_flow_id}" in the assembly. | |
| project_name | Yes | Project name, e.g. "INT145_My_Integration" |