-
Notifications
You must be signed in to change notification settings - Fork 15
feat(case-tool): add troubleshooting step for failed cases #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b17d943
feat(case-tool): add troubleshooting step for failed cases
charlesliu9 9e7f83b
fix wrong references link; remove duplicated CLI commands references
charlesliu9 e731d7f
add error handling; add loop back logic
charlesliu9 dd9811f
add timeout limit
charlesliu9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
skills/uipath-maestro-case/references/troubleshooting-guide.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| # Troubleshooting Failed Cases | ||
|
|
||
| Diagnostic workflow for failed debug runs and deployed case process runs. All commands require `uip login`. | ||
|
|
||
| > **`--folder-key` is required for `incident get`.** Most `instance` subcommands accept `--folder-key <FOLDER_KEY>` and auto-detect from the authenticated folder if omitted, but `incident get` requires it explicitly. Get the folder key from `uip orchestrator folder list --output json` or from the job/process context. | ||
|
|
||
| ## Diagnostic priority | ||
|
|
||
| Investigate in this order — each step adds context, stop when you have enough to diagnose the root cause: | ||
|
|
||
| 1. Incidents (error message + faulting element) | ||
| 2. Runtime variables (data state at failure) | ||
| 3. Case definition correlation (map element to `caseplan.json` node) | ||
| 4. Traces (last resort — verbose full timeline) | ||
|
|
||
| ## Step 1 — Get the instance ID | ||
|
|
||
| The debug output (`Data.instanceId`) or `job status` response contains the instance ID. If you only have a job key: | ||
|
|
||
| ```bash | ||
| uip maestro case job status <JOB_KEY> --output json | ||
| ``` | ||
|
|
||
| Parse the instance ID and folder key from the response. | ||
|
|
||
| > **No instance ID / `job status` fails →** halt. Report job key to user; downstream steps need the instance ID. | ||
|
|
||
| ## Step 2 — Fetch incidents | ||
|
|
||
| Failed cases always have an incident. Start here — incidents give you the error category, message, and the faulting element. | ||
|
|
||
| ```bash | ||
| uip maestro case instance incidents <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json | ||
| ``` | ||
|
|
||
| Drill into a specific incident for full detail: | ||
|
|
||
| ```bash | ||
| uip maestro case incident get <INCIDENT_ID> --folder-key <FOLDER_KEY> --output json | ||
| ``` | ||
|
|
||
| To get a cross-process incident overview: | ||
|
|
||
| ```bash | ||
| uip maestro case incident summary --output json | ||
| ``` | ||
|
|
||
| For all incidents on a specific case process: | ||
|
|
||
| ```bash | ||
| uip maestro case processes incidents <PROCESS_KEY> --folder-key <FOLDER_KEY> --output json | ||
| ``` | ||
|
|
||
| > **Empty incidents →** skip to Step 3. **Invalid instance ID error →** recheck Step 1 output. | ||
|
|
||
| ## Step 3 — Fetch runtime variable state | ||
|
|
||
| Get the variable values at the time of failure to understand what data each stage/task was working with: | ||
|
|
||
| ```bash | ||
| uip maestro case instance variables <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json | ||
| ``` | ||
|
|
||
| Scope to a specific element (stage or task): | ||
|
|
||
| ```bash | ||
| uip maestro case instance variables <INSTANCE_ID> --folder-key <FOLDER_KEY> --parent-element-id <ELEMENT_ID> --output json | ||
| ``` | ||
|
|
||
| > **Empty variables →** skip to Step 4. | ||
|
|
||
| ## Step 4 — Correlate with the case definition | ||
|
|
||
| Use the incident's faulting element ID and the variable state to locate the failure point in `caseplan.json`. Map the element ID to the corresponding stage, task, edges etc., check its `data.inputs[]`, upstream edges, and the variable values flowing into it. | ||
|
|
||
| If the local `caseplan.json` may differ from what was deployed, fetch the deployed case definition: | ||
|
|
||
| ```bash | ||
| uip maestro case instance asset <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json | ||
| ``` | ||
|
|
||
| > **`instance asset` fails →** fall back to local `caseplan.json`. | ||
|
|
||
| Additional instance inspection commands: | ||
|
|
||
| ```bash | ||
| uip maestro case instance element-executions <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json # per-element execution details | ||
| uip maestro case instance cursors <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json # current execution cursor positions | ||
| ``` | ||
|
|
||
| ## Step 5 — Traces (last resort) | ||
|
|
||
| Traces are verbose but contain the full execution timeline. Use them only when incidents and variables are insufficient: | ||
|
|
||
| ```bash | ||
| uip maestro case job traces <JOB_KEY> --output json | ||
| uip maestro case job traces <JOB_KEY> --pretty # human-readable form | ||
| ``` | ||
|
|
||
| > **Always use CLI commands for troubleshooting — never call the underlying APIs directly.** | ||
|
|
||
| ## Stop conditions | ||
|
|
||
| 1. **Stop early on root cause.** Once a step yields actionable cause (error + faulting element + variable state), stop. Skip remaining steps. | ||
| 2. **Empty result → next step.** If a step returns empty/missing data, move to the next step. Do not retry the same command. | ||
| 3. **One retry on transient failure** (auth, network). Second failure: halt that step, continue. | ||
| 4. **Max one full pass through Steps 1–5.** No looping. | ||
| 5. **Escalate to user** if Steps 1–5 yield no root cause, or all paths blocked. Report: instance ID, folder key, incident IDs/messages, faulting element ID, variable snapshot. Do not propose `caseplan.json` edits without confirmed cause. | ||
|
|
||
| ## CLI command reference | ||
|
|
||
| For full flag tables and all subcommands, see [case-commands.md](case-commands.md): | ||
|
|
||
| - `uip maestro case instance` — list/get/incidents/variables/asset/cursors/element-executions and lifecycle (pause/resume/cancel/retry/migrate/goto) | ||
| - `uip maestro case incident` — `summary`, `get` | ||
| - `uip maestro case processes incidents <PROCESS_KEY>` — all incidents on a process | ||
| - `uip maestro case job` — `status`, `traces` | ||
|
|
||
| Append `--output json` to any command whose output you parse. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.