Reasoning budget
- Match reasoning to step difficulty and bias toward acting; for mechanical / IO / format steps, if a
provided script already covers the task, run it — don't re-derive it.
- Save deep, extended reasoning for the one genuinely hard judgment a script can't make for you.
Working style
- Understand first, then decide. Read this skill's SKILL.md and understand the scripts it ships before you act. Then plan accordingly, such as run a script as-is when it fits, change a script when it's close, or write extra scripts to complement — based on what the scripts actually do, not a guess.
- Plan the whole path up front, then chain. Outline the full sequence of steps before running anything, batch independent steps into one turn, and pipeline the whole plan in as few turns as possible. Don't do things that can be pipelined into one call turn-by-turn.
- Inspect an input ONCE. To learn a file's structure (sheets/columns, pages, form fields, keys), dump it once — ideally to a file you then grep — never re-open the same file field-by-field or retry it with several libraries.
- Don't repeat work. Do not rerun a command when its inputs and relevant state are unchanged, and do not reread an unchanged file, script, or SKILL.md already in context. After a tool or command may modify a file, reread the affected content before relying on it.
- Write code once and reuse. If a step needs code, write it once as a small script (paths/params as CLI args) and call it; don't paste near-duplicate inline python across turns. Keep it terse — no comment banners or narration in inline scripts.
- Keep outputs small. Don't put large tool results and outputs into the context, instead write them into a file and use tools to inspect them. If there is no tool available, you should write your own scripts to inspect the file.
- Don't do anything unnecessary. Don't call tools, read files, or put results into context unless they're immediately needed.
UiPath Maestro BPMN
Work with UiPath Maestro (Process Orchestration) .bpmn projects across their
lifecycle: author, validate, package, operate, and diagnose. Authoring is
registry-driven: every uipath:* extension payload comes from a template the
registry serves; the structural BPMN that holds those nodes together (process
scaffold, sequence flows, gateways, events, boundary events, containers,
multi-instance markers, and the diagram) is authored from the documented spec +
canvas contract. Packaging, operating (upload, publish, run, manage), and
diagnosing are driven through the UiPath CLI, covered in the capability
references below.
When to use
- Create a Maestro
.bpmn from a description.
- Edit
.bpmn structure: gateways, events, boundary events, subprocesses, call
activities, multi-instance loops, sequence-flow conditions, variables.
- Add a UiPath extension node (RPA job, agent, HITL, queue, business rule, API
workflow, Integration Service connector, internal message, timer).
- Validate a
.bpmn against the canvas rules before import.
- Package, upload, publish, or run a project, and manage its jobs and instances.
- Diagnose a failed or misbehaving run.
Editing an existing .bpmn (preserve what you did not author)
The skill can edit an existing file. If the edit introduces one of the shapes in
Patterns, use that guide — inserting a pattern into a running
process is a normal edit, not a reason to skip the shape. Make surgical
edits and preserve content you did not author: unknown uipath:* elements, uipath:migrationVersion,
tags, imported Integration Service payloads, and stable element IDs. Do not
regenerate the whole file or drop extension data the skill does not recognize —
preserve-only structures (see the blocklist in
references/structural-bpmn.md) round-trip
untouched. Never normalize existing nodes to this skill's canonical templates:
do not add missing attributes (e.g. type="json" target="bodyField" on an
existing uipath:input) to elements the edit does not target — on untouched
neighbors only wiring (bpmn:incoming/bpmn:outgoing) may change.
For .flow JSON use uipath-maestro-flow; for XAML/coded workflows use
uipath-rpa; for Python agents use uipath-agents; for Case plans use
uipath-maestro-case.
The model
Two halves make a valid Maestro .bpmn:
uipath:* payloads — registry-owned. Each node's extension XML
(uipath:activity / uipath:event / uipath:mapping, its context,
input, output, and bindingInfo) comes from
uip maestro bpmn registry get <type>'s xmlTemplate. Never hand-author a
uipath:* element from prose.
- Structural BPMN — spec/canvas-owned. The registry emits no
<bpmn:definitions>/<bpmn:process>, no sequence flows, no gateway
conditions/defaults, no event-definition payloads, no boundary-event
attributes, no subprocess/loop structure, and no diagram. Author all of these
from references/structural-bpmn.md, which is
grounded in the registry spec and the Studio Web canvas serializer.
Patterns
Seven recurring process shapes, for building a new process and for extending
one that already runs. Each guide gives a worked-out topology — nodes, wiring,
gateway conditions, variables — and the reasoning behind it. Many topologies
pass validation for the same request; these are known-good shapes, not
specifications. Adapt them: add steps, drop branches, and change
counts as the process needs. Each guide's "Why it works" names the parts that
carry the shape — change those and you are building something else, so say so.
Read the guide for each pattern the process actually uses — one for a simple
process, several for a composed one — and none for a pattern you are not
building.
Every guide's shape table marks each node Entry (omit when inserting into a
process that already runs), Mechanism (changing it changes the pattern), or
Placeholder (bind it, or skip it if the process already does this).
| Pattern |
Reach for it when |
Guide |
ai-decision-review |
AI makes one call; act on it, or a human reviews it |
ai-decision-review-guide.md |
approval-chain |
A request needs sign-off from several people |
approval-chain-guide.md |
smart-triage |
Inbound work sorted into categories, each handled elsewhere |
smart-triage-guide.md |
external-wait |
The process waits on an outside party under an SLA |
external-wait-guide.md |
high-volume-batch |
Many independent items processed in one run |
high-volume-batch-guide.md |
failure-escalation |
Unhandled failures must never disappear silently |
failure-escalation-guide.md |
queue-distribution |
An Orchestrator queue hands work across runtimes |
queue-distribution-guide.md |
Do not reach for a pattern when the ask is a short linear process, a single
node, or a change that does not introduce one of these shapes. A pattern is
never a wrapper to retrofit onto work that does not need one.
Using more than one pattern in one process? Read
references/patterns/composing-guide.md
first — which pattern keeps its start event, the four ways the rest join it, how
variables cross a nesting boundary, and the two placements the engine
constrains. A single pattern needs only its own guide.
Workflow
Work the four steps quickly, but keep the path matched to the user's ask. Treat
requests to discover before authoring, save raw registry JSON/evidence, or "do
not author yet" as discovery-only even if they describe an eventual BPMN. In
that mode, immediately create registry-evidence/, run and save registry pull --output json, registry list --output json or registry search ... --output json, and registry get <type> --output json for each requested type; do not
read deep authoring references or scaffold a project. For authoring asks, author
early: do not pre-read every reference before writing. Read a reference only
when you reach the structure it covers, get the needed templates, then write the
first complete draft before further spelunking. If
references/structural-bpmn.md or
references/expression-authoring.md
directly covers the requested construct, write a first complete draft before
further spelunking.
For registry-evidence-only tasks, be command-first and time-boxed:
- Create
registry-evidence/ before anything else.
- Run the registry command forms the user asked for. For RPA job + internal
message discovery, use
uip maestro bpmn registry list --limit -1 --output json, uip maestro bpmn registry get Orchestrator.StartJob --output json,
and uip maestro bpmn registry get Maestro.ReceiveMessageEvent --output json.
- If
uip is unavailable in a temp/smoke sandbox, or if it writes a valid JSON
failure object such as "Result": "Failure" instead of registry content, do
not search the repo for a replacement CLI or inspect test fixtures. Still
issue the required list and get command forms once each with output
redirected to their evidence files (allowing failure with || true), so the
transcript shows the discovery loop:
uip maestro bpmn registry list --limit -1 --output json and
uip maestro bpmn registry get <type> --output json. Record the failed CLI
attempts in registry-evidence/cli-error.txt, then overwrite any failure JSON
in the expected registry-evidence/*.json files with valid JSON evidence from
skills/uipath-maestro-bpmn/validator/bpmn-spec.json containing the same
extension types and stop. The final evidence files must literally contain the
discovered type names, for example Orchestrator.StartJob and
Maestro.ReceiveMessageEvent.
Discover. uip maestro bpmn registry pull once (cached for the
session — do not re-pull), then list / search to map intent to extension
types; uip is connections list --all-folders for live connections (always
--all-folders — a folder-scoped list silently misses connections). Confirm
every selection with the user (use AskUserQuestion). Never fabricate an identifier.
See references/registry-workflow.md.
Get templates. uip maestro bpmn registry get <type> --output json for
each chosen registry-owned node only. Fetch every chosen template in one
Bash call, not one command per turn — each shell round-trip is a model turn
and dozens of them exhaust the run's time budget before authoring finishes:
for t in TypeA TypeB TypeC; do uip maestro bpmn registry get "$t" --output json; done.
Enrich Intsvc.* connector nodes with --connection-id/--object-name. Do not call registry get for structural
gaps the registry never owns: sequence flows, gateways, events, boundary
events, multi-instance/loop markers, errorMapping/retry structure, or
diagrams. If a registry template's BPMN host tag is PascalCase (for example
<bpmn:SendTask> or <bpmn:ReceiveTask>), normalize the host tag to the
serializer's lower-camel BPMN element (<bpmn:sendTask>,
<bpmn:receiveTask>) while preserving the uipath:* payload exactly.
Assemble. Author directly from the complete minimal file in
references/structural-bpmn.md
plus each node's xmlTemplate (fill placeholders only). That skeleton already
shows variables, the entry point, a branch, and the diagram. Do not
reverse-engineer authoring patterns from task fixtures, generated package
files, or the CLI's compiled bundle (@uipath/cli/dist/*.js) — such
spelunking is the top reason authoring runs out of time.
Add only the structural pieces your process needs (extra
gateways, events, boundary events, containers, multi-instance markers,
expression/error mappings, retry attributes), then run
uip maestro bpmn format <file.bpmn> to generate the diagram. If format reports unknown command, update the CLI (see references/cli-conventions.md); if upgrading is unavailable, use the fallback DI structure in references/structural-bpmn.md. For local authoring prompts, use the
plain project layout <ProjectName>/<ProjectName>.bpmn with
<ProjectName>/project.uiproj; do not create *Solution/, package files, or
.uipx artifacts unless the user explicitly asks to package or operate the
project.
When adding draft or preserve-only case-management variants, include a real
lowercase <uipath:caseManagement version="v1">...</uipath:caseManagement>
payload with synthetic content as a separate preserve-only extension. Do not
treat an Orchestrator.StartCaseMgmtProcess* typed activity shell as a
substitute for that payload when the user asks to preserve case-management
contract variants.
When asked to preserve a generic unsupported uipath:Activity, write the
actual capitalized element <uipath:Activity version="v1">...</uipath:Activity>.
Do not write <uipath:activity><uipath:type value="uipath:Activity" ... />;
that is a lowercase typed shell, not the preserve-only generic payload.
When writing public-safe placeholders into XML attribute values, XML-escape
angle brackets: use <TENANT_URL>, <FOLDER_KEY>, and
<CONNECTION_NAME> in attributes. Raw <PLACEHOLDER> text is only safe
in element text or CDATA; unescaped angle brackets inside attributes make the
BPMN not well-formed.
When routing on an Actions.HITL user task's outcome, the sequence-flow
conditions from the exclusive gateway must reference the exact variable bound
by the HITL template's <uipath:output ... var="..."> (for example
=vars.Var_HitlResult == "approve"), not only a copied or derived script
variable.
For Integration Service draft notes, name every CLI-owned blocker literally,
including the exact phrase connection binding, plus dynamic schemas,
generated outputs, bindings_v2.json, and package metadata. Avoid softer
wording such as "connection and process binding" because it hides the concrete
artifact the CLI must supply.
If the user asks for the package metadata files, or to package or operate,
run uip maestro bpmn update-metadata <file.bpmn> to generate the five
files, and keep its output as written — that shape is the contract pack
consumes. Only fall back to the equivalent hand-authored shape in
references/shared/local-metadata-regeneration-guide.md
when the CLI is unavailable. Every root start event needs a
<uipath:entryPointId value="<uuid>" /> child in its extensionElements or
the project generates zero entry points.
Validate. Run the CLI validator — it runs the full PO.Frontend canvas
rule set (structural rules plus variable, method-call, input-type, and
event-object checks) offline, plus deploy-readiness checks:
uip maestro bpmn validate <file.bpmn> --output json
Exit 0 = valid; exit 1 = validation failed (the envelope lists each issue
with its rule code). Warnings are reported but do not fail the run. Validate
once; fix only error-severity findings. Do not re-validate in a loop chasing
warnings. If validate reports "unknown command" or clearly skips the
structural rules, the installed CLI predates them — update it (see
references/cli-conventions.md). See
references/structural-bpmn.md#validation.
Operate and diagnose
Beyond authoring, this skill packages, ships, runs, and diagnoses Maestro
projects through the UiPath CLI.
- Package and operate (package a project, upload to Studio Web, publish or
deploy, run or debug instances, and manage jobs, instances, incidents, and
lifecycle actions): see references/operate/CAPABILITY.md.
- Diagnose (fetch incidents, variables, and element executions, and trace a
failed run back to its BPMN element): see references/diagnose/CAPABILITY.md.
Any cloud-side change (upload, publish, deploy, run, pause, resume, cancel,
retry, migrate) requires explicit user consent, and local validation should pass
first.
Structural coverage
This skill teaches authoring of the full surface the canvas supports. What the
registry serves a template for vs. what you author by hand:
| Structure |
Source |
Node uipath:* payloads (RPA, agent, HITL, queue, business rule, API workflow, IS connector, internal message, timer, script, variables) |
Registry xmlTemplate |
<bpmn:definitions>/<bpmn:process> scaffold + namespaces |
Authored (registry gap) |
Sequence flows, conditionExpression, gateway default |
Authored (registry gap) |
| Gateways: exclusive, parallel, inclusive, event-based (complex is preserve-only) |
Authored (registry gap) |
| Events + event-definition matrix: message, timer, error, terminate (end-only). Signal/escalation/conditional/link/compensate/cancel/multiple are preserve-only |
Authored (registry gap); payload per canvas serializer |
Boundary events: attachedToRef, interrupting/non-interrupting (cancelActivity) |
Authored (registry gap) |
Subprocess, event subprocess (triggeredByEvent), call activity |
Authored (registry gap); call-activity payloads from registry |
| Multi-instance / loop characteristics |
Authored from canvas contract — registry exposes no template (registry gap) |
bpmndi:BPMNDiagram (shape per node, edge per flow) |
Generated via uip maestro bpmn format <file.bpmn> — registry emits none (registry gap) |
Flagged registry gaps: the registry serves no template for structural BPMN,
sequence-flow conditions, event-definition payloads, boundary-event attributes,
multi-instance markers, or the diagram. These are authored from the spec +
canvas contract in references/structural-bpmn.md
and honestly surfaced to the user as gaps when asked.
Rules
- Registry owns every
uipath:* payload. Author from
registry get templates; never hand-write uipath: XML from prose.
- Never fabricate an identifier. Connection IDs, process/queue/connector
keys, app IDs, folder ids/paths come from discovery or the user.
- Structural BPMN is authored, not invented. Follow the spec/canvas
contract in references/structural-bpmn.md;
flag honestly what the registry does not expose.
BPMN XML element names are case-sensitive: use exact lower-camel tags such
as
<bpmn:startEvent>, <bpmn:intermediateCatchEvent>,
<bpmn:scriptTask>, and <bpmn:endEvent>. Do not write PascalCase tags
like <bpmn:IntermediateCatchEvent>.
- Confirm before authoring. Confirm the chosen connector/connection/process
and the process structure with the user (AskUserQuestion).
- The diagram is mandatory. Import is diagram-driven — every node needs a
BPMNShape, every flow a BPMNEdge, or it will not appear on the canvas.
- Preserve the registry's node-type shape. Most
uipath:activity /
uipath:event / uipath:mapping templates declare their type as a nested
<uipath:type value="<Type>" version="v1" />. Some runtime-authored
templates use the payload's type attribute instead; notably,
Orchestrator.StartAgentJob is a direct child of bpmn:ServiceTask with
<uipath:activity type="Orchestrator.StartAgentJob" version="v1">. Both
declarations are supported. Paste the selected registry template literally
and do not normalize one form into the other.
Event extension types (Intsvc.WaitForEvent, Intsvc.EventTrigger,
Maestro.ReceiveMessageEvent, Maestro.SendMessageEvent) must use
<uipath:event>, including when the BPMN host is task-like such as
<bpmn:receiveTask>.
- No
-- in XML comments. XML forbids -- (double-hyphen) inside
<!-- … -->, so never paste CLI commands or flags (--output,
--connection-id, --object-name) into a comment — it makes the file
unparseable. Keep comments minimal.
- Use
--output json for parsed CLI calls.
- Public-safe always. No customer XML, tenant URLs, real IDs, or private
names — see references/public-safety.md.
- Confirm before any cloud change. Upload, publish, deploy, run, pause,
resume, cancel, retry, and migrate require explicit user consent; validate
locally first.
- Retry is node configuration, never canvas. Handle transient failures
with
uipath:retry on the activity. Never draw a retry loop from gateways
and timer events. See
references/structural-bpmn.md.
- Task SLA is task configuration, never canvas. Approval timers,
reassignment, and escalation-on-breach live on the user task. Do not model
them as boundary timers around it.
- An error event subprocess is interrupting and terminal. When it fires,
the normal path stops and the instance records Completed, not Faulted.
Every path through it must end in an explicitly named outcome, or a handled
failure is indistinguishable from success. For recover-and-continue, attach
an error boundary event instead.
- A different target system is not, by itself, a different shape. Swapping
Document Understanding for a UiPath agent, or Outlook for Gmail, changes a
binding. Reshape when the process genuinely differs — not merely because the
target system did.
- You author the process; you are never a participant in it. Where a shape
calls for reasoning, classification, or extraction at runtime, place and bind
the node that will perform it — a UiPath agent, Document Understanding, a
business rule task. Never do that work at authoring time or hardcode its
result. Bare "agent" in any process description means a UiPath agent, never
you.
References
| Topic |
Read |
| Discover → template → bind → assemble loop |
references/registry-workflow.md |
| Structural BPMN, event matrix, boundary events, containers, multi-instance, diagram, validation |
references/structural-bpmn.md |
| Worked-out topology for a recurring process shape, and how shapes compose |
Patterns table above → references/patterns/*-guide.md |
Runtime expressions, vars./bindings./iterator., =js: (Jint) syntax |
references/expression-authoring.md |
| CLI conventions and the side-effect boundary |
references/cli-conventions.md |
| Keeping content public-safe |
references/public-safety.md |
| Package, upload, publish, run, or manage instances |
references/operate/CAPABILITY.md |
| Diagnose a failed or misbehaving run |
references/diagnose/CAPABILITY.md |
| Project layout and generated package files |
references/shared/project-layout.md |
1---2name: uipath-maestro-bpmn3description: UiPath Maestro BPMN / Process Orchestration: author (registry-driven), validate, package, operate, and diagnose .bpmn projects. For .flow use uipath-maestro-flow; for case plans use uipath-maestro-case.4---56# Reasoning budget7- Match reasoning to step difficulty and bias toward acting; for mechanical / IO / format steps, if a8 provided script already covers the task, run it — don't re-derive it.9- Save deep, extended reasoning for the one genuinely hard judgment a script can't make for you.1011# Working style12- **Understand first, then decide.** Read this skill's SKILL.md and understand the scripts it ships before you act. Then plan accordingly, such as run a script as-is when it fits, change a script when it's close, or write extra scripts to complement — based on what the scripts actually do, not a guess.13- **Plan the whole path up front, then chain.** Outline the full sequence of steps before running anything, batch independent steps into one turn, and pipeline the whole plan in as few turns as possible. Don't do things that can be pipelined into one call turn-by-turn.14- **Inspect an input ONCE.** To learn a file's structure (sheets/columns, pages, form fields, keys), dump it once — ideally to a file you then grep — never re-open the same file field-by-field or retry it with several libraries.15- **Don't repeat work.** Do not rerun a command when its inputs and relevant state are unchanged, and do not reread an unchanged file, script, or SKILL.md already in context. After a tool or command may modify a file, reread the affected content before relying on it.16- **Write code once and reuse.** If a step needs code, write it once as a small script (paths/params as CLI args) and call it; don't paste near-duplicate inline python across turns. Keep it terse — no comment banners or narration in inline scripts.17- **Keep outputs small.** Don't put large tool results and outputs into the context, instead write them into a file and use tools to inspect them. If there is no tool available, you should write your own scripts to inspect the file.18- **Don't do anything unnecessary.** Don't call tools, read files, or put results into context unless they're immediately needed.1920# UiPath Maestro BPMN2122Work with UiPath Maestro (Process Orchestration) `.bpmn` projects across their23lifecycle: author, validate, package, operate, and diagnose. **Authoring is24registry-driven**: every `uipath:*` extension payload comes from a template the25registry serves; the structural BPMN that holds those nodes together (process26scaffold, sequence flows, gateways, events, boundary events, containers,27multi-instance markers, and the diagram) is authored from the documented spec +28canvas contract. Packaging, operating (upload, publish, run, manage), and29diagnosing are driven through the UiPath CLI, covered in the capability30references below.3132## When to use3334- Create a Maestro `.bpmn` from a description.35- Edit `.bpmn` structure: gateways, events, boundary events, subprocesses, call36 activities, multi-instance loops, sequence-flow conditions, variables.37- Add a UiPath extension node (RPA job, agent, HITL, queue, business rule, API38 workflow, Integration Service connector, internal message, timer).39- Validate a `.bpmn` against the canvas rules before import.40- Package, upload, publish, or run a project, and manage its jobs and instances.41- Diagnose a failed or misbehaving run.4243### Editing an existing `.bpmn` (preserve what you did not author)4445The skill can edit an existing file. If the edit introduces one of the shapes in46[Patterns](#patterns), use that guide — inserting a pattern into a running47process is a normal edit, not a reason to skip the shape. Make **surgical**48edits and preserve content you did not author: unknown `uipath:*` elements, `uipath:migrationVersion`,49tags, imported Integration Service payloads, and stable element IDs. Do not50regenerate the whole file or drop extension data the skill does not recognize —51preserve-only structures (see the blocklist in52[references/structural-bpmn.md](references/structural-bpmn.md)) round-trip53untouched. Never normalize existing nodes to this skill's canonical templates:54do not add missing attributes (e.g. `type="json" target="bodyField"` on an55existing `uipath:input`) to elements the edit does not target — on untouched56neighbors only wiring (`bpmn:incoming`/`bpmn:outgoing`) may change.5758For `.flow` JSON use `uipath-maestro-flow`; for XAML/coded workflows use59`uipath-rpa`; for Python agents use `uipath-agents`; for Case plans use60`uipath-maestro-case`.6162## The model6364Two halves make a valid Maestro `.bpmn`:65661. **`uipath:*` payloads — registry-owned.** Each node's extension XML67 (`uipath:activity` / `uipath:event` / `uipath:mapping`, its `context`,68 `input`, `output`, and `bindingInfo`) comes from69 `uip maestro bpmn registry get <type>`'s `xmlTemplate`. **Never hand-author a70 `uipath:*` element from prose.**712. **Structural BPMN — spec/canvas-owned.** The registry emits no72 `<bpmn:definitions>`/`<bpmn:process>`, no sequence flows, no gateway73 conditions/defaults, no event-definition payloads, no boundary-event74 attributes, no subprocess/loop structure, and no diagram. Author all of these75 from [references/structural-bpmn.md](references/structural-bpmn.md), which is76 grounded in the registry spec and the Studio Web canvas serializer.7778## Patterns7980Seven recurring process shapes, for building a new process and for extending81one that already runs. Each guide gives a worked-out topology — nodes, wiring,82gateway conditions, variables — and the reasoning behind it. Many topologies83pass validation for the same request; these are known-good shapes, not84specifications. Adapt them: add steps, drop branches, and change85counts as the process needs. Each guide's "Why it works" names the parts that86carry the shape — change those and you are building something else, so say so.87Read the guide for each pattern the process actually uses — one for a simple88process, several for a composed one — and none for a pattern you are not89building.9091Every guide's shape table marks each node **Entry** (omit when inserting into a92process that already runs), **Mechanism** (changing it changes the pattern), or93**Placeholder** (bind it, or skip it if the process already does this).9495| Pattern | Reach for it when | Guide |96| --- | --- | --- |97| `ai-decision-review` | AI makes one call; act on it, or a human reviews it | [ai-decision-review-guide.md](references/patterns/ai-decision-review-guide.md) |98| `approval-chain` | A request needs sign-off from several people | [approval-chain-guide.md](references/patterns/approval-chain-guide.md) |99| `smart-triage` | Inbound work sorted into categories, each handled elsewhere | [smart-triage-guide.md](references/patterns/smart-triage-guide.md) |100| `external-wait` | The process waits on an outside party under an SLA | [external-wait-guide.md](references/patterns/external-wait-guide.md) |101| `high-volume-batch` | Many independent items processed in one run | [high-volume-batch-guide.md](references/patterns/high-volume-batch-guide.md) |102| `failure-escalation` | Unhandled failures must never disappear silently | [failure-escalation-guide.md](references/patterns/failure-escalation-guide.md) |103| `queue-distribution` | An Orchestrator queue hands work across runtimes | [queue-distribution-guide.md](references/patterns/queue-distribution-guide.md) |104105**Do not reach for a pattern** when the ask is a short linear process, a single106node, or a change that does not introduce one of these shapes. A pattern is107never a wrapper to retrofit onto work that does not need one.108109Using more than one pattern in one process? Read110[references/patterns/composing-guide.md](references/patterns/composing-guide.md)111first — which pattern keeps its start event, the four ways the rest join it, how112variables cross a nesting boundary, and the two placements the engine113constrains. A single pattern needs only its own guide.114115## Workflow116117Work the four steps quickly, but keep the path matched to the user's ask. Treat118requests to discover before authoring, save raw registry JSON/evidence, or "do119not author yet" as discovery-only even if they describe an eventual BPMN. In120that mode, immediately create `registry-evidence/`, run and save `registry pull121--output json`, `registry list --output json` or `registry search ... --output122json`, and `registry get <type> --output json` for each requested type; do not123read deep authoring references or scaffold a project. For authoring asks, author124early: do not pre-read every reference before writing. Read a reference only125when you reach the structure it covers, get the needed templates, then write the126first complete draft before further spelunking. If127[references/structural-bpmn.md](references/structural-bpmn.md) or128[references/expression-authoring.md](references/expression-authoring.md)129directly covers the requested construct, write a first complete draft before130further spelunking.131132For registry-evidence-only tasks, be command-first and time-boxed:133134- Create `registry-evidence/` before anything else.135- Run the registry command forms the user asked for. For RPA job + internal136 message discovery, use `uip maestro bpmn registry list --limit -1 --output137 json`, `uip maestro bpmn registry get Orchestrator.StartJob --output json`,138 and `uip maestro bpmn registry get Maestro.ReceiveMessageEvent --output json`.139- If `uip` is unavailable in a temp/smoke sandbox, or if it writes a valid JSON140 failure object such as `"Result": "Failure"` instead of registry content, do141 not search the repo for a replacement CLI or inspect test fixtures. Still142 issue the required `list` and `get` command forms once each with output143 redirected to their evidence files (allowing failure with `|| true`), so the144 transcript shows the discovery loop:145 `uip maestro bpmn registry list --limit -1 --output json` and146 `uip maestro bpmn registry get <type> --output json`. Record the failed CLI147 attempts in `registry-evidence/cli-error.txt`, then overwrite any failure JSON148 in the expected `registry-evidence/*.json` files with valid JSON evidence from149 `skills/uipath-maestro-bpmn/validator/bpmn-spec.json` containing the same150 extension types and stop. The final evidence files must literally contain the151 discovered type names, for example `Orchestrator.StartJob` and152 `Maestro.ReceiveMessageEvent`.1531541. **Discover.** `uip maestro bpmn registry pull` **once** (cached for the155 session — do not re-pull), then `list` / `search` to map intent to extension156 types; `uip is connections list --all-folders` for live connections (always157 `--all-folders` — a folder-scoped list silently misses connections). Confirm158 every selection with the user (use AskUserQuestion). Never fabricate an identifier.159 See [references/registry-workflow.md](references/registry-workflow.md).1602. **Get templates.** `uip maestro bpmn registry get <type> --output json` for161 each chosen registry-owned node only. Fetch every chosen template in **one**162 Bash call, not one command per turn — each shell round-trip is a model turn163 and dozens of them exhaust the run's time budget before authoring finishes:164 `for t in TypeA TypeB TypeC; do uip maestro bpmn registry get "$t" --output json; done`.165 Enrich `Intsvc.*` connector nodes with `--connection-id`/`--object-name`. Do not call `registry get` for structural166 gaps the registry never owns: sequence flows, gateways, events, boundary167 events, multi-instance/loop markers, `errorMapping`/retry structure, or168 diagrams. If a registry template's BPMN host tag is PascalCase (for example169 `<bpmn:SendTask>` or `<bpmn:ReceiveTask>`), normalize the host tag to the170 serializer's lower-camel BPMN element (`<bpmn:sendTask>`,171 `<bpmn:receiveTask>`) while preserving the `uipath:*` payload exactly.1723. **Assemble.** Author directly from the complete minimal file in173 [references/structural-bpmn.md](references/structural-bpmn.md#a-complete-minimal-file-author-from-this-not-from-examples)174 plus each node's `xmlTemplate` (fill placeholders only). That skeleton already175 shows variables, the entry point, a branch, and the diagram. **Do not176 reverse-engineer authoring patterns from task fixtures, generated package177 files, or the CLI's compiled bundle (`@uipath/cli/dist/*.js`)** — such178 spelunking is the top reason authoring runs out of time.179 Add only the structural pieces your process needs (extra180 gateways, events, boundary events, containers, multi-instance markers,181 expression/error mappings, retry attributes), then run182 `uip maestro bpmn format <file.bpmn>` to generate the diagram. If `format` reports `unknown command`, update the CLI (see [references/cli-conventions.md](references/cli-conventions.md)); if upgrading is unavailable, use the fallback DI structure in [references/structural-bpmn.md](references/structural-bpmn.md). For local authoring prompts, use the183 plain project layout `<ProjectName>/<ProjectName>.bpmn` with184 `<ProjectName>/project.uiproj`; do not create `*Solution/`, package files, or185 `.uipx` artifacts unless the user explicitly asks to package or operate the186 project.187 When adding draft or preserve-only case-management variants, include a real188 lowercase `<uipath:caseManagement version="v1">...</uipath:caseManagement>`189 payload with synthetic content as a separate preserve-only extension. Do not190 treat an `Orchestrator.StartCaseMgmtProcess*` typed activity shell as a191 substitute for that payload when the user asks to preserve case-management192 contract variants.193 When asked to preserve a generic unsupported `uipath:Activity`, write the194 actual capitalized element `<uipath:Activity version="v1">...</uipath:Activity>`.195 Do not write `<uipath:activity><uipath:type value="uipath:Activity" ... />`;196 that is a lowercase typed shell, not the preserve-only generic payload.197 When writing public-safe placeholders into XML attribute values, XML-escape198 angle brackets: use `<TENANT_URL>`, `<FOLDER_KEY>`, and199 `<CONNECTION_NAME>` in attributes. Raw `<PLACEHOLDER>` text is only safe200 in element text or CDATA; unescaped angle brackets inside attributes make the201 BPMN not well-formed.202 When routing on an Actions.HITL user task's outcome, the sequence-flow203 conditions from the exclusive gateway must reference the exact variable bound204 by the HITL template's `<uipath:output ... var="...">` (for example205 `=vars.Var_HitlResult == "approve"`), not only a copied or derived script206 variable.207 For Integration Service draft notes, name every CLI-owned blocker literally,208 including the exact phrase `connection binding`, plus dynamic schemas,209 generated outputs, `bindings_v2.json`, and package metadata. Avoid softer210 wording such as "connection and process binding" because it hides the concrete211 artifact the CLI must supply.212 If the user asks for the package metadata files, or to package or operate,213 run `uip maestro bpmn update-metadata <file.bpmn>` to generate the five214 files, and keep its output as written — that shape is the contract `pack`215 consumes. Only fall back to the equivalent hand-authored shape in216 [references/shared/local-metadata-regeneration-guide.md](references/shared/local-metadata-regeneration-guide.md#minimal-local-metadata-shape)217 when the CLI is unavailable. Every root start event needs a218 `<uipath:entryPointId value="<uuid>" />` child in its `extensionElements` or219 the project generates zero entry points.2204. **Validate.** Run the CLI validator — it runs the full PO.Frontend canvas221 rule set (structural rules plus variable, method-call, input-type, and222 event-object checks) offline, plus deploy-readiness checks:223224 ```bash225 uip maestro bpmn validate <file.bpmn> --output json226 ```227228 Exit 0 = valid; exit 1 = validation failed (the envelope lists each issue229 with its rule code). Warnings are reported but do not fail the run. Validate230 once; fix only error-severity findings. Do not re-validate in a loop chasing231 warnings. If `validate` reports "unknown command" or clearly skips the232 structural rules, the installed CLI predates them — update it (see233 [references/cli-conventions.md](references/cli-conventions.md)). See234 [references/structural-bpmn.md#validation](references/structural-bpmn.md#validation).235236## Operate and diagnose237238Beyond authoring, this skill packages, ships, runs, and diagnoses Maestro239projects through the UiPath CLI.240241- **Package and operate** (package a project, upload to Studio Web, publish or242 deploy, run or debug instances, and manage jobs, instances, incidents, and243 lifecycle actions): see [references/operate/CAPABILITY.md](references/operate/CAPABILITY.md).244- **Diagnose** (fetch incidents, variables, and element executions, and trace a245 failed run back to its BPMN element): see [references/diagnose/CAPABILITY.md](references/diagnose/CAPABILITY.md).246247Any cloud-side change (upload, publish, deploy, run, pause, resume, cancel,248retry, migrate) requires explicit user consent, and local validation should pass249first.250251## Structural coverage252253This skill teaches authoring of the full surface the canvas supports. What the254registry serves a template for vs. what you author by hand:255256| Structure | Source |257| --- | --- |258| Node `uipath:*` payloads (RPA, agent, HITL, queue, business rule, API workflow, IS connector, internal message, timer, script, variables) | **Registry** `xmlTemplate` |259| `<bpmn:definitions>`/`<bpmn:process>` scaffold + namespaces | Authored (registry gap) |260| Sequence flows, `conditionExpression`, gateway `default` | Authored (registry gap) |261| Gateways: exclusive, parallel, inclusive, event-based (complex is preserve-only) | Authored (registry gap) |262| Events + event-definition matrix: message, timer, error, terminate (end-only). Signal/escalation/conditional/link/compensate/cancel/multiple are preserve-only | Authored (registry gap); payload per canvas serializer |263| Boundary events: `attachedToRef`, interrupting/non-interrupting (`cancelActivity`) | Authored (registry gap) |264| Subprocess, event subprocess (`triggeredByEvent`), call activity | Authored (registry gap); call-activity payloads from registry |265| Multi-instance / loop characteristics | Authored from canvas contract — **registry exposes no template (registry gap)** |266| `bpmndi:BPMNDiagram` (shape per node, edge per flow) | Generated via `uip maestro bpmn format <file.bpmn>` — **registry emits none (registry gap)** |267268Flagged registry gaps: the registry serves no template for structural BPMN,269sequence-flow conditions, event-definition payloads, boundary-event attributes,270multi-instance markers, or the diagram. These are authored from the spec +271canvas contract in [references/structural-bpmn.md](references/structural-bpmn.md)272and honestly surfaced to the user as gaps when asked.273274## Rules2752761. **Registry owns every `uipath:*` payload.** Author from277 `registry get` templates; never hand-write `uipath:` XML from prose.2782. **Never fabricate an identifier.** Connection IDs, process/queue/connector279 keys, app IDs, folder ids/paths come from discovery or the user.2803. **Structural BPMN is authored, not invented.** Follow the spec/canvas281 contract in [references/structural-bpmn.md](references/structural-bpmn.md);282 flag honestly what the registry does not expose.283 BPMN XML element names are case-sensitive: use exact lower-camel tags such284 as `<bpmn:startEvent>`, `<bpmn:intermediateCatchEvent>`,285 `<bpmn:scriptTask>`, and `<bpmn:endEvent>`. Do not write PascalCase tags286 like `<bpmn:IntermediateCatchEvent>`.2874. **Confirm before authoring.** Confirm the chosen connector/connection/process288 and the process structure with the user (AskUserQuestion).2895. **The diagram is mandatory.** Import is diagram-driven — every node needs a290 `BPMNShape`, every flow a `BPMNEdge`, or it will not appear on the canvas.2916. **Preserve the registry's node-type shape.** Most `uipath:activity` /292 `uipath:event` / `uipath:mapping` templates declare their type as a nested293 `<uipath:type value="<Type>" version="v1" />`. Some runtime-authored294 templates use the payload's `type` attribute instead; notably,295 `Orchestrator.StartAgentJob` is a direct child of `bpmn:ServiceTask` with296 `<uipath:activity type="Orchestrator.StartAgentJob" version="v1">`. Both297 declarations are supported. Paste the selected registry template literally298 and do not normalize one form into the other.299 Event extension types (`Intsvc.WaitForEvent`, `Intsvc.EventTrigger`,300 `Maestro.ReceiveMessageEvent`, `Maestro.SendMessageEvent`) must use301 `<uipath:event>`, including when the BPMN host is task-like such as302 `<bpmn:receiveTask>`.3037. **No `--` in XML comments.** XML forbids `--` (double-hyphen) inside304 `<!-- … -->`, so never paste CLI commands or flags (`--output`,305 `--connection-id`, `--object-name`) into a comment — it makes the file306 unparseable. Keep comments minimal.3078. **Use `--output json` for parsed CLI calls.**3089. **Public-safe always.** No customer XML, tenant URLs, real IDs, or private309 names — see [references/public-safety.md](references/public-safety.md).31010. **Confirm before any cloud change.** Upload, publish, deploy, run, pause,311 resume, cancel, retry, and migrate require explicit user consent; validate312 locally first.31311. **Retry is node configuration, never canvas.** Handle transient failures314 with `uipath:retry` on the activity. Never draw a retry loop from gateways315 and timer events. See316 [references/structural-bpmn.md](references/structural-bpmn.md#choosing-an-error-handling-construct).31712. **Task SLA is task configuration, never canvas.** Approval timers,318 reassignment, and escalation-on-breach live on the user task. Do not model319 them as boundary timers around it.32013. **An error event subprocess is interrupting and terminal.** When it fires,321 the normal path stops and the instance records **Completed**, not Faulted.322 Every path through it must end in an explicitly named outcome, or a handled323 failure is indistinguishable from success. For recover-and-continue, attach324 an error boundary event instead.32514. **A different target system is not, by itself, a different shape.** Swapping326 Document Understanding for a UiPath agent, or Outlook for Gmail, changes a327 binding. Reshape when the process genuinely differs — not merely because the328 target system did.32915. **You author the process; you are never a participant in it.** Where a shape330 calls for reasoning, classification, or extraction at runtime, place and bind331 the node that will perform it — a UiPath agent, Document Understanding, a332 business rule task. Never do that work at authoring time or hardcode its333 result. Bare "agent" in any process description means a UiPath agent, never334 you.335336## References337338| Topic | Read |339| --- | --- |340| Discover → template → bind → assemble loop | [references/registry-workflow.md](references/registry-workflow.md) |341| Structural BPMN, event matrix, boundary events, containers, multi-instance, diagram, validation | [references/structural-bpmn.md](references/structural-bpmn.md) |342| Worked-out topology for a recurring process shape, and how shapes compose | Patterns table above → `references/patterns/*-guide.md` |343| Runtime expressions, `vars.`/`bindings.`/`iterator.`, `=js:` (Jint) syntax | [references/expression-authoring.md](references/expression-authoring.md) |344| CLI conventions and the side-effect boundary | [references/cli-conventions.md](references/cli-conventions.md) |345| Keeping content public-safe | [references/public-safety.md](references/public-safety.md) |346| Package, upload, publish, run, or manage instances | [references/operate/CAPABILITY.md](references/operate/CAPABILITY.md) |347| Diagnose a failed or misbehaving run | [references/diagnose/CAPABILITY.md](references/diagnose/CAPABILITY.md) |348| Project layout and generated package files | [references/shared/project-layout.md](references/shared/project-layout.md) |