# InteractionProcessSwarm

A run's place in a tree of sub-interactions. Present on a run whose interaction lets its participants start them, and on every run started in the tree. The tree's counts are kept on its root.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `rootId` | `uuid` | The interaction run at the top of the tree. A tree started by an interaction that an app started is rooted at that interaction, not the app, so this can differ from `rootProcessId`. |
| `depth` | `integer` | 0 at the root; one more at each level below it. |
| `limits` | [`InteractionSwarmLimits`](https://docs.maitento.com/reference/types/interaction-swarm-limits.md) | The tree's limits, settled when its root started. |
| `started` | `integer` | On the root only: how many sub-interactions have been started in the tree so far. 0 on other runs. |
| `running` | `integer` | On the root only: how many sub-interactions in the tree are still going. 0 on other runs. |
| `children` | [`InteractionSubInteraction`](https://docs.maitento.com/reference/types/interaction-sub-interaction.md)`[]` | The sub-interactions this run started. |
| `released` | `boolean` | True once this run has ended and no longer counts towards the tree's `running`. |
| `await` | [`InteractionSwarmAwait`](https://docs.maitento.com/reference/types/interaction-swarm-await.md)`\| null` | What this run is waiting on, while it is `AwaitingChildren`. Null otherwise. |

## Example

```json
{
  "rootId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "depth": 0,
  "limits": {
    "maxDepth": 0,
    "maxConcurrent": 0,
    "maxTotal": 0
  },
  "started": 0,
  "running": 0,
  "children": [
    {
      "processId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "interactionId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "interactionName": "...",
      "participantName": "...",
      "dateStarted": "2026-10-26T12:00:00.0000000Z"
    }
  ],
  "released": false,
  "await": {
    "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
    "processIds": [
      "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
    ],
    "all": false,
    "participantName": "...",
    "threadId": "...",
    "takenBy": {
      "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "version": 0
    },
    "dateStarted": "2026-10-26T12:00:00.0000000Z"
  }
}
```

## Where it's used

- Inside [`InteractionProcess`](https://docs.maitento.com/reference/types/interaction-process.md)
- Inside [`InteractionProcessWithDetails`](https://docs.maitento.com/reference/types/interaction-process-with-details.md)
