# uip maestro case process & job

> Syntax and options for `uip maestro case process`, `processes`, `job`, `instances`, and `incidents` — running and inspecting Case Management processes and their executions.

Runtime commands for `uip maestro case`: `process` runs a case process and manages its settings/variable tags, `job` inspects one execution attempt, `instances` inspects/steers the resulting process instance, `processes` gives a cross-process summary view, and `incidents` reads incidents. Refer to [Case overview](./uip-maestro-case.md) for concepts shared across the whole `case` subsystem.

All subcommands require `uip login` and honor [global options](./global-options.md). Exit codes follow the [standard contract](./exit-codes.md).

`instances`, `incidents`, and `processes` behave like the equivalent [BPMN](./uip-maestro-bpmn-instances.md) and [Flow](./uip-maestro-flow-instances.md) commands, scoped to Case processes (`processType: "CaseManagement"`).

## Synopsis

```
uip maestro case process list --folder-key <key> [--filter <odata>] [-l, --limit <n>] [--offset <n>] [--login-validity <minutes>]
uip maestro case process get <process-key> <feed-id> --folder-key <key> [--login-validity <minutes>]
uip maestro case process run <process-key> <folder-key> [--inputs <json|@file>] [--release-key <key>] [--feed-id <id>] [--robot-ids <ids>] [--validate] [--login-validity <minutes>]
uip maestro case process settings get <process-key> --folder-key <key>
uip maestro case process settings set <process-key> --folder-key <key> --inputs <json|@file>
uip maestro case process variable-tags list <process-key> --folder-key <key> [--process-version <version>]
uip maestro case process variable-tags create <process-key> --folder-key <key> (--variables <variable...> | --all) [--dry-run] [--process-version <version>]
uip maestro case process variable-tags delete <process-key> --folder-key <key> (--variables <variable...> | --all --yes) [--dry-run] [--process-version <version>]

uip maestro case processes list [--folder-key <key>] [--limit <n>] [--offset <n>] [--status <status>]
uip maestro case processes incidents <process-key> --folder-key <key>
uip maestro case processes diagnose <process-key> --folder-key <key>
uip maestro case processes error-codes <process-key> --folder-key <key>

uip maestro case job traces <job-key> [--folder-key <key>] [--poll-interval <ms>] [--traces-service <name>] [--pretty] [--login-validity <minutes>]
uip maestro case job status <job-key> [--folder-key <key>] [--detailed] [--login-validity <minutes>]

uip maestro case instances list [--folder-key <key> | --folder-path <path>] [-l <limit>] [--next-page <cursor>] [--process-key <k>] [--package-id <id>] [--error-code <code>] [--status <status>]... [--from-date <iso-8601>] [--to-date <iso-8601>]
uip maestro case instances get <instance-id> (--folder-key <key> | --folder-path <path>)
uip maestro case instances pause|resume|cancel|retry <instance-id> (--folder-key <key> | --folder-path <path>) [--comment <text>]
uip maestro case instances migrate <instance-id> <new-version> (--folder-key <key> | --folder-path <path>) [--comment <text>]
uip maestro case instances incidents|asset|cursors|element-executions|variables-all|global-variables <instance-id> (--folder-key <key> | --folder-path <path>)
uip maestro case instances variables <instance-id> (--folder-key <key> | --folder-path <path>) [--parent-element-id <id>]
uip maestro case instances variables-set <instance-id> (--folder-key <key> | --folder-path <path>) --inputs <json|@file>
uip maestro case instances goto <instance-id> <transitions> (--folder-key <key> | --folder-path <path>)
uip maestro case instances elements cancel|retry <instance-id> <element-id> (--folder-key <key> | --folder-path <path>) [--comment <text>]
uip maestro case instances messages send (--folder-key <key> | --folder-path <path>) [--inputs <json|@file>]

uip maestro case incidents summary [--folder-key <key>] [-l <limit>] [--offset <n>] [--process-key <k>]
uip maestro case incidents get <incident-id> --folder-key <key>
```

## uip maestro case process

Manage Case processes: list what's published to a folder, inspect an entry point's input/output schema, and run one.

:::note
`process run` takes `<folder-key>` as a **positional argument**, not a flag — different from every other verb on this page (`list`/`get`/`settings`/`variable-tags`), which all use `--folder-key`/`-f`. This asymmetry is real, not a typo — verify against your own CLI version's `--help` if a copy-pasted example seems to fail.
:::

### uip maestro case process list

List Case processes published to a folder.

#### Options

| Option | Required | Description |
|---|---|---|
| `-f, --folder-key <key>` | **yes** | Folder key (GUID). |
| `--filter <odata>` | no | Additional OData filter. |
| `-l, --limit <number>` | no | Return at most this many processes. Default: all. |
| `--offset <number>` | no | Skip this many processes before the first one returned. Default `0`. |
| `--login-validity <minutes>` | no | Minimum minutes before token expiration to trigger a refresh. Default `10`. |

Without `--limit` and `--offset`, the command returns every process published to the folder.

#### Data shape

```json
{
  "Code": "CaseProcessList",
  "Data": [
    {
      "name": "InvoiceReview",
      "processKey": "a1b2c3d4-0000-0000-0000-000000000001:1.0.0",
      "releaseKey": "e5f6a7b8-0000-0000-0000-000000000001",
      "folderKey": "c3d4e5f6-0000-0000-0000-000000000001",
      "feedId": "default",
      "folderId": 42,
      "active": "Yes",
      "latest": "Yes"
    }
  ]
}
```

### uip maestro case process get

Get a process's entry-point schemas — the input/output shape `process run` expects.

#### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<process-key>` | yes | Process key. |
| `<feed-id>` | yes | Feed ID, from `process list`'s `feedId` field. |

#### Options

| Option | Required | Description |
|---|---|---|
| `-f, --folder-key <key>` | **yes** | Folder key (GUID). |
| `--login-validity <minutes>` | no | Default `10`. |

#### Data shape

```json
{
  "Code": "CaseProcessGet",
  "Data": [
    {
      "Path": "/content/caseplan.json.bpmn#Trigger_1",
      "DisplayName": "Start",
      "Type": "CaseManagement",
      "InputSchema": "{\"type\":\"object\",\"properties\":{}}",
      "OutputSchema": "{\"type\":\"object\",\"properties\":{}}"
    }
  ]
}
```

`Data` is an array — one entry per entry point the process exposes, not a single object. Fails with an explicit error if the process has zero entry points.

### uip maestro case process run

Start a Case process instance.

#### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<process-key>` | yes | Process key. |
| `<folder-key>` | yes | Folder key (GUID) — **positional here**, not a flag. |

#### Options

| Option | Required | Description |
|---|---|---|
| `-i, --inputs <json>` | no | Input parameters as a JSON string or `@file.json`. Omit to read from stdin instead; omit both for empty inputs (`{}`). |
| `--release-key <key>` | no | Release key (GUID), from `process list`. |
| `--feed-id <id>` | no | Feed ID for package lookup. |
| `--robot-ids <ids>` | no | Comma-separated numeric robot IDs. Fails fast if any entry isn't a number. |
| `--validate` | no | Run basic client-side validation (required fields + primitive types) against the process's input schema before submitting. Prints ✅/❌ and exits `1` on failure without starting a job. |
| `--login-validity <minutes>` | no | Default `10`. |

#### Example

```bash
uip maestro case process run a1b2c3d4-0000-0000-0000-000000000001 c3d4e5f6-0000-0000-0000-000000000001 \
  --inputs '{"amount":100}'
```

#### Data shape

```json
{
  "Code": "CaseJobStarted",
  "Data": {
    "jobKey": "b2c3d4e5-0000-0000-0000-000000000001",
    "state": "Pending",
    "traceId": "d4e5f6a7-0000-0000-0000-000000000001"
  }
}
```

The success message points you at `uip maestro case job traces <jobKey>` to watch execution.

### uip maestro case process settings

Read or replace a process's raw settings object (the same object `variable-tags` reads/writes one field of).

| Verb | Arguments | Options | Notes |
|---|---|---|---|
| `get` | `<process-key>` | `-f, --folder-key <key>` **required** | `Code: "ProcessSettingsGet"`. |
| `set` | `<process-key>` | `-f, --folder-key <key>` **required**, `--inputs <json\|@file>` | Read-modify-write: GETs current settings, PUTs your payload as the new object. `Code: "ProcessSettingsSet"`. |

### uip maestro case process variable-tags

List, tag, and untag the variables that Case process instances can be filtered by. The commands read the variables that the deployed process version declares and save the whole selection in one write.

Every verb takes `<process-key>`, the process key (GUID) that `process list` returns as `releaseKey`, and `-f, --folder-key <key>` (**required**). `--process-version <version>` picks the process version whose variables are offered. Default: the version that new instances run.

`create` and `delete` name a variable as `<name>`, `<element>.<name>`, or `<element>.<name>.<field>`, or by the `Id` that `list` returns. A name that matches more than one variable fails with `ErrorCode: "invalid_argument"` and lists the matching IDs. A name that matches no variable fails with `ErrorCode: "not_found"`.

| Verb | Options | Notes |
|---|---|---|
| `list` | — | `Code: "ProcessVariableTagsList"`. `Data` is an array with one row per variable: `Element`, `Variable`, `Id`, `Tagged`, `Label`, `Stale`, `Note`. `Stale` is `true` for a saved variable that this version no longer declares. |
| `create` | `--variables <variable...>` or `--all`, `--dry-run` | Each variable is `<variable>` or `<variable>=<label>`. Labels are unique within a process. `--all` tags every variable that can be tagged. `Code: "ProcessVariableTagsCreated"`. `Data` holds the variables that are tagged after the write. |
| `delete` | `--variables <variable...>` or `--all --yes`, `--dry-run` | `--all` untags every variable, including the ones that the process no longer declares, and requires `--yes` or `--dry-run`. `Code: "ProcessVariableTagsDeleted"`. `Data` holds the variables that are still tagged, and is `[]` when none are. |

Passing both `--variables` and `--all`, or neither, fails with `Result: "ValidationError"` and exit code `3`. With `--dry-run`, the response has `Code: "ProcessVariableTagsDryRun"` and nothing is saved.

#### Example

```bash
# See what can be tagged, then tag the "amount" variable with a label
uip maestro case process variable-tags list e5f6a7b8-… --folder-key <key>
uip maestro case process variable-tags create e5f6a7b8-… --folder-key <key> --variables amount="Invoice amount"
```

## uip maestro case processes

Cross-process summary view — list every process's aggregate counts, or drill into one by key. Shares implementation with [BPMN `processes`](./uip-maestro-bpmn-process.md) and Flow's equivalent, filtered to `processType: "CaseManagement"`.

| Verb | Arguments | Options | Notes |
|---|---|---|---|
| `list` | — | `--folder-key <key>`, `-l/--limit <n>`, `--offset <n>`, `--status <status>` | The CLI applies the four options to the full list that the service returns. `--status` keeps the processes that have at least one instance in that status: `Canceling`, `Cancelled`, `Completed`, `Faulted`, `Paused`, `Pausing`, `Pending`, `Resuming`, `Retrying`, `Running`, or `Upgrading`. Any other value fails with `Result: "ValidationError"` and exit code `3`. `Code: "ProcessList"`. |
| `incidents` | `<process-key>` | `--folder-key <key>` **required** | `Code: "ProcessIncidents"`. |
| `diagnose` | `<process-key>` | `--folder-key <key>` **required** | Correlates summary + incidents + error codes in one call. `Code: "ProcessDiagnostics"` with `FaultedCount`/`RunningCount`/`IncidentCount`/`ErrorCodeCount` rollups. When the process is in another folder than `--folder-key`, the command fails with `Result: "ValidationError"` and exit code `3`. |
| `error-codes` | `<process-key>` | `--folder-key <key>` **required** | `Code: "ProcessIncidentErrorCodes"`. |

## uip maestro case job

Inspect one execution attempt (a job) of a Case process.

### uip maestro case job traces

Stream execution trace events for a running or recently completed job.

#### Options

| Option | Default | Description |
|---|---|---|
| `--folder-key <key>` | — | Folder key (GUID) of the job's folder. Without it, the job is read unscoped. |
| `--poll-interval <ms>` | `2000` | Polling interval. |
| `--traces-service <name>` | `llmopstenant_` | Traces service name. |
| `--pretty` | off | Human-readable trace lines instead of raw JSON. |
| `--login-validity <minutes>` | `10` | Token-refresh threshold. |

Traces stream directly to output — no final `Data` payload. Exit code `0` on success, `1` otherwise.

### uip maestro case job status

Get a job's status.

#### Options

| Option | Required | Default | Description |
|---|---|---|---|
| `--folder-key <key>` | no | authenticated folder | Folder key (GUID, from `process list`). **Optional here** — omit to let the backend resolve your default folder. |
| `--detailed` | no | off | Full response instead of the curated summary. |
| `--login-validity <minutes>` | no | `10` | Token-refresh threshold. |

#### Data shape (default summary)

```json
{
  "Code": "CaseJobStatus",
  "Data": {
    "key": "b2c3d4e5-0000-0000-0000-000000000001",
    "state": "Successful",
    "runtimeType": "…",
    "processType": "CaseManagement",
    "startTime": "2025-04-15T10:30:00Z",
    "endTime": "2025-04-15T10:32:11Z",
    "creationTime": "…",
    "inputArguments": "…",
    "outputArguments": "…",
    "info": "…",
    "releaseName": "InvoiceReviewProcess",
    "processKey": "a1b2c3d4-0000-0000-0000-000000000001",
    "robotName": "…",
    "hostMachineName": "…"
  }
}
```

## uip maestro case instances

Inspect and steer individual **process instances** — one execution of a case process. `instance` is an alias for `instances`, `message` for `messages`, and `element` for `elements`.

Every `instances` subcommand except `list` requires a folder: pass `-f, --folder-key <key>`, the folder key (GUID) that `instances list` returns as `FolderKey`, or `--folder-path <path>`, for example `Shared/Sub`. Passing both, or neither, fails with `Result: "ValidationError"` and exit code `3`. On `list`, the folder is optional and keeps only the instances of that folder.

```
uip maestro case instances list                                  [-f <folder-key> | --folder-path <path>] [-l <limit>] [--next-page <cursor>] [--process-key <guid>] [--package-id <id>] [--error-code <code>] [--status <status>]... [--from-date <iso>] [--to-date <iso>]
uip maestro case instances get                 <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances pause               <instance-id>     (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances resume              <instance-id>     (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances cancel              <instance-id>     (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances retry               <instance-id>     (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances migrate             <instance-id> <new-version> (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances variables           <instance-id>     (-f <folder-key> | --folder-path <path>) [--parent-element-id <id>]
uip maestro case instances variables-set       <instance-id>     (-f <folder-key> | --folder-path <path>) --inputs <json|@file>
uip maestro case instances variables-all       <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances global-variables    <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances incidents           <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances asset               <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances cursors             <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances goto                <instance-id> <transitions> (-f <folder-key> | --folder-path <path>)
uip maestro case instances element-executions  <instance-id>     (-f <folder-key> | --folder-path <path>)
uip maestro case instances messages send                         (-f <folder-key> | --folder-path <path>) --inputs <json|@file>
uip maestro case instances elements cancel     <instance-id> <element-id> (-f <folder-key> | --folder-path <path>) [--comment <text>]
uip maestro case instances elements retry      <instance-id> <element-id> (-f <folder-key> | --folder-path <path>) [--comment <text>]
```

| Verb | Purpose | Data shape |
|---|---|---|
| `list` | List Case process instances. Filters are applied server-side, except `--folder-key` and `--folder-path`, which the CLI applies, so a page can hold fewer rows than `--limit`: keep paging while `Pagination.HasMore` is `true`. Results page by cursor: read `Pagination.NextPage` and pass it back with `--next-page`. `--limit` is 1–500, default `50`. `--offset` isn't supported by this API: `--offset 0` is accepted as a no-op, and any other value fails. | `Code: "InstanceList"`, `Data` is an array of process-instance objects, plus `Pagination` (`Returned`, `Limit`, `HasMore`, `NextPage`). |
| `get` | Get one instance by ID. | `Code: "InstanceGet"` |
| `pause` | Pause a running instance. | `Code: "InstancePaused"` |
| `resume` | Resume a paused instance. | `Code: "InstanceResumed"` |
| `cancel` | Cancel an instance. | `Code: "InstanceCanceled"` |
| `retry` | Retry a faulted instance. | `Code: "InstanceRetried"` |
| `migrate` | Migrate an instance to another package version (`<new-version>`). | `Code: "InstanceMigrated"` |
| `variables` | Get an instance's variables. `--parent-element-id` filters by parent element. | `Code: "InstanceVariables"` |
| `variables-set` | Update a running instance's variables. `--inputs` takes a JSON string, an `@file` path, or stdin. The payload is an object with `globals`, a JSON Patch array, with `elements`, an array of `{ "elementId", "inputs" }` objects where `inputs` is a JSON Patch array, or with both. Any other shape fails with `Result: "ValidationError"` and exit code `3`. | `Code: "InstanceVariablesSet"` |
| `variables-all` | Get every variable, including subprocess variables. | `Code: "InstanceVariablesAll"` |
| `global-variables` | Get an instance's global variables. | `Code: "InstanceGlobalVariables"` |
| `incidents` | Get the incidents raised by an instance. | `Code: "InstanceIncidents"` |
| `asset` | Get the Case definition for an instance. | `Code: "InstanceAsset"` |
| `cursors` | Get the current execution cursor positions. | `Code: "InstanceCursors"` |
| `goto` | Move an execution cursor. `<transitions>` is a JSON array of `{ "sourceElementId", "targetElementId" }` objects. | `Code: "InstanceGoto"` |
| `element-executions` | Get the per-element execution history. | `Code: "InstanceElementExecutions"` |
| `messages send` | Send a message to Case workflow subscriptions. `--inputs` takes the message payload as a JSON string, an `@file` path, or stdin. | `Code: "MessageSent"` |
| `elements cancel` | Cancel one element within an instance. | `Code: "ElementCanceled"` |
| `elements retry` | Retry one faulted element within an instance. | `Code: "ElementRetried"` |

`--comment <text>` on the operation verbs records an optional comment with the operation. For the full option tables of each verb, refer to [`uip maestro bpmn instances`](./uip-maestro-bpmn-instances.md); the option names and defaults are the same.

```bash
# Faulted instances of one process, then retry one element
uip maestro case instances list --folder-key <key> --process-key <process-guid> --status Faulted
uip maestro case instances elements retry <instance-id> <element-id> --folder-key <key>
```

## uip maestro case incidents

Read incidents across processes or by ID. `incident` is an alias for `incidents`.

```
uip maestro case incidents summary [--folder-key <key>] [-l <limit>] [--offset <n>] [--process-key <key>]
uip maestro case incidents get     <incident-id> -f, --folder-key <key>
```

### uip maestro case incidents summary

Get incident summaries across Case processes.

| Option | Description |
|---|---|
| `--folder-key <key>` | Keep only the incidents of this folder. Optional — omit for a tenant-wide rollup. |
| `-l, --limit <number>` | Number of items to return (1-10000). |
| `--offset <number>` | Number of items to skip (0-1000000). Default `0`. |
| `--process-key <process-key>` | Filter by process key. |

The CLI applies `--folder-key`, `--offset`, and `--limit` to the full list that the service returns.

The command does not filter by incident status or severity, because the summary rows carry neither field. Passing `--status` or `--severity` fails with `Result: "ValidationError"` and exit code `3`.

Data shape: `Code: "IncidentSummary"`, `Data` is an array of incident summaries.

### uip maestro case incidents get

Get a single incident by ID.

| Option | Description |
|---|---|
| `-f, --folder-key <key>` | Folder key. **Required.** |

Data shape: `Code: "IncidentGet"`, `Data` is the incident.

```bash
uip maestro case incidents summary --process-key <process-key> --limit 100
uip maestro case incidents get <incident-id> --folder-key <key>
```

## Examples

```bash
# Publish check, then run
uip maestro case process list --folder-key <key>
uip maestro case process get a1b2c3d4-… default --folder-key <key>
uip maestro case process run a1b2c3d4-… <key> --inputs '{"amount":100}'

# Watch it through to completion
JOB_KEY=$(uip maestro case process run a1b2c3d4-… <key> --inputs '{}' --output-filter "jobKey" --output plain)
uip maestro case job traces "$JOB_KEY" --pretty
uip maestro case job status "$JOB_KEY" --detailed

# Diagnose a failing process in one call
uip maestro case processes diagnose a1b2c3d4-… --folder-key <key>
```

## See also

- [Case overview](./uip-maestro-case.md)
- [`uip maestro bpmn instances`](./uip-maestro-bpmn-instances.md) / [`uip maestro flow instances`](./uip-maestro-flow-instances.md) — the same instance commands for BPMN and Flow
- [`uip maestro bpmn incidents`](./uip-maestro-bpmn-incidents.md) — the same incident commands for BPMN
- [Orchestrator jobs](./uip-or-jobs.md)
