# Logic+ Subroutine (/docs/workflows/reference/category/controlFlow/subroutine)

> For the complete documentation index, see [llms.txt](https://docs.tandemcx.ai/llms.txt). Any page on this site can be fetched as Markdown by appending `.md` to its URL.

Execute another Workflow+ as a subroutine within the current conversation, sharing the same conversation variables.

Runs another workflow inline as a subroutine, then returns to continue the current flow. The subroutine shares this conversation's variables, so values set with `$(name)` before the call are visible inside it, and changes it makes are visible after it returns. Use this to factor common logic into a reusable workflow instead of duplicating the same nodes across flows. If the called workflow fails, or cannot start, this node takes its `fallback` exit. A workflow cannot start when it is not found, has no published version, has no starting node, is the calling workflow or the workflow that called it, or cannot be loaded. An unwired `fallback` goes to an enclosing Try / Catch or Loop Group, the same as for any other node. When nothing handles the `fallback`, the calling workflow ends with an error, and an AI agent that handed the call to it is told the workflow failed.

**Category:** Control Flow  
**Provider:** Core  
**Latest version:** 1.0.0

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| WorkflowId (`workflowId`) | dynamicDropdown | Yes | The Workflow+ to execute as a subroutine. |

## Exits

- `default` (required)
- `invalidInput` (system)
- `fallback` (system)

System exits (auto-injected, hidden when unwired): `invalidInput`, `fallback`.
