@uipath/skills 1.207.0-preview.2232 → 1.207.0-preview.2253
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/uipath-coded-apps/references/patterns.md +116 -233
- package/skills/uipath-maestro-bpmn/SKILL.md +2 -1
- package/skills/uipath-maestro-bpmn/references/bpmn-runtime.md +8 -2
- package/skills/uipath-maestro-bpmn/references/connectors.md +8 -3
- package/skills/uipath-maestro-bpmn/references/draft-skeleton.md +4 -1
- package/skills/uipath-maestro-bpmn/references/patterns/high-volume-batch-guide.md +14 -6
- package/skills/uipath-maestro-flow/references/author.md +1 -0
- package/skills/uipath-maestro-flow/references/document-pipeline.md +8 -5
- package/skills/uipath-maestro-flow/references/extract-document-node.md +2 -0
- package/skills/uipath-maestro-flow/references/form-trigger.md +1 -1
- package/skills/uipath-maestro-flow/references/operate.md +1 -1
- package/skills/uipath-maestro-flow/references/patterns/ai-decision-human-review-guide.md +9 -4
- package/skills/uipath-troubleshoot/references/presenting.md +19 -3
- package/skills/uipath-troubleshoot/references/products/maestro/overview.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/autopilot-429.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/deployment-email-received.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/deployment-failure.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/folder-not-accessible.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/integration-service-400.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/integration-service-404.md +3 -3
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/marker-invalid-cast.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/process-not-found-404.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/service-task-child-job-faulted.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/presentation.md +4 -0
- package/version-manifest.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/skills",
|
|
3
|
-
"version": "1.207.0-preview.
|
|
3
|
+
"version": "1.207.0-preview.2253",
|
|
4
4
|
"description": "UiPath agent skills for Claude Code, Codex, Cursor, GitHub Copilot, OpenCode, UiPath Autopilot, Kiro, Windsurf, Antigravity and Devin — RPA, UI automation, UI testing, coded agents/apps/workflows, and troubleshooting. Distributed as the UiPath Claude Code plugin.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "UiPath"
|
|
@@ -128,66 +128,56 @@ import { ProcessInstances } from '@uipath/uipath-typescript/maestro-processes';
|
|
|
128
128
|
function InstanceMonitor({ instanceId, folderKey }: { instanceId: string; folderKey: string }) {
|
|
129
129
|
const { sdk, isAuthenticated } = useAuth();
|
|
130
130
|
const processInstances = useMemo(() => new ProcessInstances(sdk), [sdk]);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
const fetchVariables = useCallback(
|
|
132
|
+
() => processInstances.getVariables(instanceId, folderKey),
|
|
133
|
+
[processInstances, instanceId, folderKey]
|
|
134
|
+
);
|
|
136
135
|
const { data: variables, isLoading, isActive, error } = usePolling({
|
|
137
136
|
fetchFn: fetchVariables,
|
|
138
137
|
interval: 5000,
|
|
139
138
|
enabled: isAuthenticated && !!instanceId,
|
|
140
139
|
immediate: true,
|
|
141
|
-
deps: [instanceId],
|
|
140
|
+
deps: [instanceId],
|
|
142
141
|
});
|
|
143
|
-
|
|
144
|
-
// isLoading — true until first data arrives, AND resets to true on instance switch
|
|
145
|
-
// isActive — true while the polling interval is running (show "Live" indicator)
|
|
146
|
-
// Render variables...
|
|
142
|
+
// ...render variables
|
|
147
143
|
}
|
|
148
144
|
```
|
|
149
145
|
|
|
150
146
|
### Key options
|
|
151
147
|
|
|
152
|
-
- `deps` — **CRITICAL for master-detail UIs.** Pass values
|
|
153
|
-
- `enabled` — tie to
|
|
154
|
-
- `immediate: false` — skip first fetch
|
|
155
|
-
- `interval` — default 5000ms; increase for less-critical data to reduce API load.
|
|
148
|
+
- `deps` — **CRITICAL for master-detail UIs.** Pass identity values such as `[instanceId]`; changing one clears stale `data`, sets `isLoading` true, and refetches immediately. Without it, switching items shows stale data without a loading indicator.
|
|
149
|
+
- `enabled` — tie to need (such as `!!selectedInstance`).
|
|
150
|
+
- `immediate: false` — skip the first fetch when another effect loaded initial data.
|
|
151
|
+
- `interval` — default 5000ms; increase it for less-critical data to reduce API load. For Data Fabric entities, use the interval and rules in [sdk/data-fabric.md](sdk/data-fabric.md) trap 10.
|
|
156
152
|
|
|
157
153
|
### Master-detail pattern — MANDATORY for list + detail layouts
|
|
158
154
|
|
|
159
|
-
|
|
155
|
+
Always do both:
|
|
160
156
|
|
|
161
|
-
|
|
157
|
+
1. Key the detail component by the selected item to unmount the old detail and reset hooks and local state:
|
|
162
158
|
|
|
163
|
-
```
|
|
164
|
-
// Parent component
|
|
159
|
+
```tsx
|
|
165
160
|
{selectedInstance && (
|
|
166
161
|
<InstanceDetail
|
|
167
|
-
key={selectedInstance.id}
|
|
162
|
+
key={selectedInstance.id}
|
|
168
163
|
instanceId={selectedInstance.id}
|
|
169
164
|
folderKey={selectedInstance.folderKey}
|
|
170
165
|
/>
|
|
171
166
|
)}
|
|
172
167
|
```
|
|
173
168
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
**2. Always pass `deps` to `usePolling` in detail components:**
|
|
169
|
+
2. Pass identity `deps` inside it:
|
|
177
170
|
|
|
178
171
|
```typescript
|
|
179
|
-
// Inside InstanceDetail component
|
|
180
172
|
const { data, isLoading, isActive } = usePolling({
|
|
181
173
|
fetchFn: fetchInstanceData,
|
|
182
174
|
interval: 5000,
|
|
183
175
|
enabled: isAuthenticated && !!instanceId,
|
|
184
|
-
deps: [instanceId],
|
|
176
|
+
deps: [instanceId],
|
|
185
177
|
});
|
|
186
178
|
```
|
|
187
179
|
|
|
188
|
-
Both are
|
|
189
|
-
|
|
190
|
-
**Why both?** The `key` prop alone works, but if a parent component refactors away the `key`, the `deps` mechanism still ensures correct behavior. The `deps` alone works for the hook, but doesn't reset other component state (e.g., local `useState` for tabs, expanded sections).
|
|
180
|
+
`key` resets component state; `deps` resets polling refs (`hasLoadedRef`, `prevJsonRef`). Both are defense-in-depth: `key` can be lost during refactoring, while `deps` does not reset unrelated state such as tabs or expanded sections.
|
|
191
181
|
|
|
192
182
|
### Flicker-free updates — MANDATORY
|
|
193
183
|
|
|
@@ -195,86 +185,68 @@ Polling must NEVER cause visible UI flicker. Follow ALL three rules:
|
|
|
195
185
|
|
|
196
186
|
#### Rule 1: No per-cycle state changes in the hook
|
|
197
187
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
- **`isLoading`** — only transitions once: `true` → `false` after the first fetch. NEVER set it back to `true`.
|
|
201
|
-
- **`isActive`** — only changes when polling starts/stops. Use for "Live" indicator.
|
|
202
|
-
- **`setError`** — functional update to avoid no-op state sets.
|
|
188
|
+
Never add `setIsPolling(true)`/`setIsPolling(false)` or `setIsLoading(true)`/`setIsLoading(false)` around each fetch: this creates two renders per cycle. `isLoading` only goes `true → false` after the first fetch and returns to `true` only on identity reset — NEVER set it back to `true` yourself; `isActive` changes only when polling starts/stops and drives the Live indicator. Use functional `setError` updates.
|
|
203
189
|
|
|
204
190
|
#### Rule 2: Accumulate variables and sort for stable rows
|
|
205
191
|
|
|
206
|
-
**THIS IS THE MOST IMPORTANT RULE.**
|
|
207
|
-
|
|
208
|
-
**Fix:** Accumulate all variables ever seen for an instance in a `Map` (keyed by `id`), update values when they reappear, and sort by name for stable row order. Same for elements. Reset all maps when switching instances.
|
|
192
|
+
**THIS IS THE MOST IMPORTANT RULE.** Never render `getVariables()` arrays directly: `getVariables()` returns different subsets of variables across polls, in non-deterministic order. Accumulate observed variables in `Map<string, GlobalVariableMetaData>` by `v.id`, and elements in a map by `elementId`; latest values win. Store only elements with nonempty inputs or outputs, sort variables by `name` and elements by `elementId`, and reset maps when `instanceId` changes:
|
|
209
193
|
|
|
210
194
|
```typescript
|
|
211
195
|
import type { GlobalVariableMetaData, ElementMetaData } from '@uipath/uipath-typescript/maestro-processes';
|
|
212
196
|
|
|
213
|
-
// Accumulated variables & elements — survive across polls, reset on instance switch
|
|
214
197
|
const accumulatedVarsRef = useRef<Map<string, GlobalVariableMetaData>>(new Map());
|
|
215
|
-
const accumulatedElementsRef = useRef<
|
|
216
|
-
|
|
217
|
-
|
|
198
|
+
const accumulatedElementsRef = useRef<Map<string, {
|
|
199
|
+
elementId: string; isMarker: boolean;
|
|
200
|
+
inputs: Record<string, unknown>; outputs: Record<string, unknown>;
|
|
201
|
+
}>>(new Map());
|
|
218
202
|
|
|
219
|
-
//
|
|
203
|
+
// Single shared reset block (lastInstanceIdRef/lastDataRef declared in Rule 3)
|
|
220
204
|
if (instanceId !== lastInstanceIdRef.current) {
|
|
221
205
|
lastInstanceIdRef.current = instanceId;
|
|
222
206
|
lastDataRef.current = null;
|
|
223
207
|
accumulatedVarsRef.current = new Map();
|
|
224
208
|
accumulatedElementsRef.current = new Map();
|
|
225
209
|
}
|
|
226
|
-
|
|
227
|
-
// Merge incoming data into accumulated maps (latest value wins)
|
|
228
210
|
if (displayData) {
|
|
229
|
-
for (const v of displayData.variables.globalVariables)
|
|
211
|
+
for (const v of displayData.variables.globalVariables)
|
|
230
212
|
accumulatedVarsRef.current.set(v.id, v);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
if (Object.keys(e.inputs).length > 0 || Object.keys(e.outputs).length > 0) {
|
|
213
|
+
for (const e of displayData.variables.elements)
|
|
214
|
+
if (Object.keys(e.inputs).length > 0 || Object.keys(e.outputs).length > 0)
|
|
234
215
|
accumulatedElementsRef.current.set(e.elementId, e);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
216
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
a.
|
|
242
|
-
);
|
|
243
|
-
const displayElements = [...accumulatedElementsRef.current.values()].sort((a, b) =>
|
|
244
|
-
a.elementId.localeCompare(b.elementId)
|
|
245
|
-
);
|
|
246
|
-
|
|
247
|
-
// Render using displayVars / displayElements — NOT displayData.variables directly
|
|
217
|
+
const displayVars = [...accumulatedVarsRef.current.values()]
|
|
218
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
219
|
+
const displayElements = [...accumulatedElementsRef.current.values()]
|
|
220
|
+
.sort((a, b) => a.elementId.localeCompare(b.elementId));
|
|
248
221
|
```
|
|
249
222
|
|
|
250
|
-
|
|
251
|
-
- **Accumulation** — variables that appeared in a previous poll but not the current one stay in the table. No rows disappear.
|
|
252
|
-
- **Latest value wins** — when a variable reappears, its value updates to the latest. The Map key is `v.id`, so the same variable always occupies the same entry.
|
|
253
|
-
- **Stable sort** — alphabetical by `name` (variables) or `elementId` (elements) ensures rows never shuffle between polls.
|
|
254
|
-
- **Reset on instance switch** — maps clear when the user selects a different instance, so stale data from the previous instance is never shown.
|
|
223
|
+
Old rows remain, repeated variables get the latest value, order is stable, and instance changes cannot show stale data.
|
|
255
224
|
|
|
256
225
|
#### Rule 3: Components must NEVER tear down the data UI
|
|
257
226
|
|
|
258
|
-
|
|
227
|
+
Preserve raw data in a ref, reset it on identity change, and show loading only without preserved data:
|
|
259
228
|
|
|
260
229
|
```typescript
|
|
261
|
-
// Preserve raw data during polling, reset when switching items
|
|
262
230
|
const lastDataRef = useRef<InstanceData | null>(null);
|
|
263
231
|
const lastInstanceIdRef = useRef(instanceId);
|
|
264
|
-
|
|
265
232
|
if (instanceId !== lastInstanceIdRef.current) {
|
|
266
233
|
lastInstanceIdRef.current = instanceId;
|
|
267
|
-
lastDataRef.current = null;
|
|
234
|
+
lastDataRef.current = null;
|
|
268
235
|
}
|
|
269
236
|
if (data) lastDataRef.current = data;
|
|
270
237
|
const displayData = lastDataRef.current;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
238
|
+
if (!displayData) {
|
|
239
|
+
if (error) return <div>Error: {error.message}</div>;
|
|
240
|
+
return <LoadingSpinner />;
|
|
241
|
+
}
|
|
274
242
|
```
|
|
275
243
|
|
|
244
|
+
Render only accumulated/sorted arrays, never `displayData.variables` directly. Show errors inside preserved UI after data exists; when `displayData` is absent and `error` is set, render the error message instead of the loading state; otherwise show initial/loading state only when `displayData` is absent. Use `isActive` for a pure CSS Live indicator, not a state toggle.
|
|
245
|
+
|
|
276
246
|
#### Complete flicker-free component pattern
|
|
277
247
|
|
|
248
|
+
Combines Rules 1–3 with one shared reset block:
|
|
249
|
+
|
|
278
250
|
```typescript
|
|
279
251
|
import { useCallback, useMemo, useRef } from 'react';
|
|
280
252
|
import type {
|
|
@@ -316,7 +288,7 @@ function InstanceDataPanel({ instanceId, folderKey }: Props) {
|
|
|
316
288
|
if (data) lastDataRef.current = data;
|
|
317
289
|
const displayData = lastDataRef.current;
|
|
318
290
|
|
|
319
|
-
//
|
|
291
|
+
// data here is the raw getVariables() response, so no `.variables` level
|
|
320
292
|
if (displayData) {
|
|
321
293
|
for (const v of displayData.globalVariables) {
|
|
322
294
|
accumulatedVarsRef.current.set(v.id, v);
|
|
@@ -328,7 +300,6 @@ function InstanceDataPanel({ instanceId, folderKey }: Props) {
|
|
|
328
300
|
}
|
|
329
301
|
}
|
|
330
302
|
|
|
331
|
-
// Stable sorted arrays for rendering
|
|
332
303
|
const displayVars = [...accumulatedVarsRef.current.values()].sort((a, b) =>
|
|
333
304
|
a.name.localeCompare(b.name)
|
|
334
305
|
);
|
|
@@ -376,17 +347,9 @@ function InstanceDataPanel({ instanceId, folderKey }: Props) {
|
|
|
376
347
|
}
|
|
377
348
|
```
|
|
378
349
|
|
|
379
|
-
**Key properties of this pattern:**
|
|
380
|
-
- **No rows appear/disappear during polling** — accumulated Map keeps all variables ever seen
|
|
381
|
-
- **No row reordering** — stable alphabetical sort on every render
|
|
382
|
-
- **Values update in-place** — Map overwrites existing entries with latest values
|
|
383
|
-
- **Clean reset on instance switch** — maps clear, loading spinner shows, fresh data loads
|
|
384
|
-
- **Table DOM never torn down** — `lastDataRef` prevents conditional removal during polls
|
|
385
|
-
- `isActive` drives a pure CSS animation (no state toggle, no re-render)
|
|
386
|
-
|
|
387
350
|
## BPMN Diagram Rendering
|
|
388
351
|
|
|
389
|
-
|
|
352
|
+
Visualize Maestro process diagrams with `bpmn-js` and the XML from `ProcessInstances.getBpmn()`.
|
|
390
353
|
|
|
391
354
|
### Setup
|
|
392
355
|
|
|
@@ -394,46 +357,33 @@ To visualize Maestro process diagrams, use `bpmn-js` (from bpmn.io) with the BPM
|
|
|
394
357
|
npm install bpmn-js
|
|
395
358
|
```
|
|
396
359
|
|
|
397
|
-
|
|
360
|
+
Import in `src/index.css` (or the component) and hide the watermark:
|
|
398
361
|
|
|
399
362
|
```css
|
|
400
363
|
@import 'bpmn-js/dist/assets/diagram-js.css';
|
|
401
364
|
@import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
|
|
402
|
-
|
|
403
|
-
/* Hide bpmn.io watermark */
|
|
404
365
|
.bjs-powered-by { display: none !important; }
|
|
405
366
|
```
|
|
406
367
|
|
|
407
368
|
### BPMN Viewer component
|
|
408
369
|
|
|
370
|
+
Import the XML in an effect, fit the canvas, and destroy the viewer on cleanup:
|
|
371
|
+
|
|
409
372
|
```typescript
|
|
410
373
|
import { useEffect, useRef } from 'react';
|
|
411
374
|
import BpmnViewer from 'bpmn-js/lib/Viewer';
|
|
412
375
|
|
|
413
|
-
|
|
414
|
-
bpmnXml: string;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
export const BpmnDiagram = ({ bpmnXml }: BpmnDiagramProps) => {
|
|
376
|
+
export const BpmnDiagram = ({ bpmnXml }: { bpmnXml: string }) => {
|
|
418
377
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
419
|
-
|
|
420
378
|
useEffect(() => {
|
|
421
379
|
if (!containerRef.current || !bpmnXml) return;
|
|
422
|
-
|
|
423
380
|
const viewer = new BpmnViewer({ container: containerRef.current });
|
|
424
|
-
|
|
425
381
|
(async () => {
|
|
426
|
-
try {
|
|
427
|
-
|
|
428
|
-
viewer.get('canvas').zoom('fit-viewport');
|
|
429
|
-
} catch (err) {
|
|
430
|
-
console.error('Error rendering BPMN:', err);
|
|
431
|
-
}
|
|
382
|
+
try { await viewer.importXML(bpmnXml); viewer.get('canvas').zoom('fit-viewport'); }
|
|
383
|
+
catch (err) { console.error('Error rendering BPMN:', err); }
|
|
432
384
|
})();
|
|
433
|
-
|
|
434
385
|
return () => { viewer.destroy(); };
|
|
435
386
|
}, [bpmnXml]);
|
|
436
|
-
|
|
437
387
|
return <div ref={containerRef} style={{ width: '100%', height: '500px' }} />;
|
|
438
388
|
};
|
|
439
389
|
```
|
|
@@ -453,13 +403,12 @@ Then render: `<BpmnDiagram bpmnXml={bpmnXml} />`
|
|
|
453
403
|
|
|
454
404
|
## Rendering Process Instance Data (Variables & Elements)
|
|
455
405
|
|
|
456
|
-
|
|
406
|
+
Never dump `getVariables()` output as raw JSON. Render global variables as a key-value table (`GlobalVariableMetaData`) and elements as collapsible cards with inputs and outputs (`ElementMetaData`). See [Rules for rendering process data](#rules-for-rendering-process-data).
|
|
457
407
|
|
|
458
408
|
### Naming convention
|
|
459
409
|
|
|
460
|
-
|
|
461
|
-
-
|
|
462
|
-
- If the app is a **generic process monitor** listing multiple processes, use **"Process Data"** as the tab/section name. Avoid "Variables" — it's a developer concept that means nothing to end users.
|
|
410
|
+
- **Single specific process:** use a domain label such as **"Loan Details"**, **"Application Data"**, or **"Extraction Results"**.
|
|
411
|
+
- **Generic multi-process monitor:** use **"Process Data"**, not "Variables" (a developer term meaningless to end users); use **"Activity Details"** for element data when appropriate.
|
|
463
412
|
|
|
464
413
|
### Rendering `globalVariables`
|
|
465
414
|
|
|
@@ -510,7 +459,7 @@ function ProcessDataTable({ globalVariables }: ProcessDataTableProps) {
|
|
|
510
459
|
|
|
511
460
|
### Rendering `elements` (activity step data)
|
|
512
461
|
|
|
513
|
-
Each element represents an executed activity with inputs and outputs. Render as collapsible cards — show the element name (derived from `elementId`) as the header, then inputs and outputs as structured sections inside.
|
|
462
|
+
Each element represents an executed activity with inputs and outputs. Render as collapsible cards — show the element name (derived from `elementId`) as the header, then inputs and outputs as structured sections inside. Make element cards collapsible — elements can have very large nested input/output structures; don't expand all by default.
|
|
514
463
|
|
|
515
464
|
```typescript
|
|
516
465
|
import { useState } from 'react';
|
|
@@ -565,7 +514,7 @@ function ElementCard({ element }: ElementCardProps) {
|
|
|
565
514
|
|
|
566
515
|
### Value formatting helpers
|
|
567
516
|
|
|
568
|
-
Use these to render any value cleanly — primitives as text, objects/arrays as structured UI
|
|
517
|
+
Use these `FormattedValue` and recursive `KeyValueRenderer` helpers to render any value cleanly — primitives as text, objects/arrays as structured UI:
|
|
569
518
|
|
|
570
519
|
```typescript
|
|
571
520
|
/** Renders a typed value from globalVariables */
|
|
@@ -653,31 +602,33 @@ function KeyValueRenderer({ data }: { data: Record<string, any> | any[] }) {
|
|
|
653
602
|
/** Converts camelCase/snake_case keys to readable labels */
|
|
654
603
|
function formatKey(key: string): string {
|
|
655
604
|
return key
|
|
656
|
-
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
657
|
-
.replace(/_/g, ' ')
|
|
658
|
-
.replace(/\b\w/g, c => c.toUpperCase());
|
|
605
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
606
|
+
.replace(/_/g, ' ')
|
|
607
|
+
.replace(/\b\w/g, c => c.toUpperCase());
|
|
659
608
|
}
|
|
660
609
|
```
|
|
661
610
|
|
|
611
|
+
`KeyValueRenderer` renders arrays with `#1`, `#2`, etc. and a left border, and objects as a key/value `<dl>`; recurse and use readable labels. Global tables include Name, Value, Type, and Source, keyed by `v.id`. Element cards show `element.elementId`, a Marker badge when `element.isMarker`, and collapsible Inputs/Outputs sections; use `useState(false)` so they are collapsed by default and skip empty elements.
|
|
612
|
+
|
|
662
613
|
### Complete usage — Process Instance detail panel
|
|
663
614
|
|
|
664
|
-
|
|
615
|
+
Use the [Complete flicker-free component pattern](#complete-flicker-free-component-pattern) above: `usePolling`, `lastDataRef` preservation, `Map` accumulation, stable sort, and instance-switch reset. The same applies to HITL panels.
|
|
665
616
|
|
|
666
617
|
### Rules for rendering process data
|
|
667
618
|
|
|
668
|
-
1. **NEVER render raw JSON.**
|
|
669
|
-
2. **Handle double-serialized JSON strings.** Values
|
|
619
|
+
1. **NEVER render raw JSON.** Parse objects and render structured UI (tables, key-value grids, collapsible cards).
|
|
620
|
+
2. **Handle double-serialized JSON strings.** Values are sometimes JSON-serialized strings (e.g., `"{\"key\": \"value\"}"`). Always try `JSON.parse()` on string values that start with `{` or `[`.
|
|
670
621
|
3. **Format keys for readability.** Convert `camelCase` and `snake_case` to title-cased words with spaces.
|
|
671
|
-
4. **Skip empty data.** Don't show elements with empty inputs AND empty outputs
|
|
672
|
-
5. **Use appropriate labels.**
|
|
673
|
-
6. **Show type badges** on global variables
|
|
674
|
-
7. **Make element cards collapsible** —
|
|
675
|
-
8. **Poll for updates**
|
|
676
|
-
9. **NEVER render raw `getVariables()` arrays directly in polled components.**
|
|
622
|
+
4. **Skip empty data.** Don't show elements with empty inputs AND empty outputs, or sections with zero items.
|
|
623
|
+
5. **Use appropriate labels.** See [Naming convention](#naming-convention).
|
|
624
|
+
6. **Show type badges** on global variables.
|
|
625
|
+
7. **Make element cards collapsible** — inputs/outputs can be large and nested; don't expand all by default.
|
|
626
|
+
8. **Poll for updates** while the process is running — variables change during execution.
|
|
627
|
+
9. **NEVER render raw `getVariables()` arrays directly in polled components.** Accumulate into `Map` refs, sort, reset on instance switch, and preserve raw data in `lastDataRef`. See Flicker-free updates [Rule 2](#rule-2-accumulate-variables-and-sort-for-stable-rows) and [Rule 3](#rule-3-components-must-never-tear-down-the-data-ui).
|
|
677
628
|
|
|
678
629
|
## HITL Detection (Human-in-the-Loop)
|
|
679
630
|
|
|
680
|
-
|
|
631
|
+
Detect whether a running instance waits on a human task with `getVariables()` + `getBpmn()`, not `getExecutionHistory()`.
|
|
681
632
|
|
|
682
633
|
### How it works
|
|
683
634
|
|
|
@@ -699,10 +650,6 @@ interface HitlStatus {
|
|
|
699
650
|
elementId: string | null;
|
|
700
651
|
}
|
|
701
652
|
|
|
702
|
-
/**
|
|
703
|
-
* Detects whether a process instance is currently waiting on a human task.
|
|
704
|
-
* Uses getVariables() to find the active element, then getBpmn() to check its type.
|
|
705
|
-
*/
|
|
706
653
|
export async function detectHitlStatus(
|
|
707
654
|
processInstances: ProcessInstances,
|
|
708
655
|
instanceId: string,
|
|
@@ -711,30 +658,15 @@ export async function detectHitlStatus(
|
|
|
711
658
|
prefetchedVariables?: ProcessInstanceGetVariablesResponse,
|
|
712
659
|
prefetchedBpmn?: BpmnXmlString,
|
|
713
660
|
): Promise<HitlStatus> {
|
|
714
|
-
// 1. Get the last active element from variables
|
|
715
661
|
const variables = prefetchedVariables ?? await processInstances.getVariables(instanceId, folderKey);
|
|
716
662
|
const lastElement = variables.elements[variables.elements.length - 1];
|
|
717
663
|
const elementId = lastElement?.elementId ?? null;
|
|
718
|
-
|
|
719
|
-
if (!elementId) {
|
|
720
|
-
return { isUserTask: false, activityType: 'Unknown', elementId: null };
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
// 2. Parse BPMN XML to find the element type
|
|
664
|
+
if (!elementId) return { isUserTask: false, activityType: 'Unknown', elementId: null };
|
|
724
665
|
const bpmnXml = prefetchedBpmn ?? await processInstances.getBpmn(instanceId, folderKey);
|
|
725
666
|
const match = bpmnXml.match(new RegExp(`<bpmn:(\\w+)\\s+id="${elementId}"`));
|
|
726
|
-
|
|
727
|
-
if (!match?.[1]) {
|
|
728
|
-
return { isUserTask: false, activityType: 'Unknown', elementId };
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
// Convert camelCase BPMN type to readable form: "userTask" → "user task"
|
|
667
|
+
if (!match?.[1]) return { isUserTask: false, activityType: 'Unknown', elementId };
|
|
732
668
|
const activityType = match[1].replace(/([A-Z])/g, ' $1').trim().toLowerCase();
|
|
733
|
-
return {
|
|
734
|
-
isUserTask: activityType === 'user task',
|
|
735
|
-
activityType,
|
|
736
|
-
elementId,
|
|
737
|
-
};
|
|
669
|
+
return { isUserTask: activityType === 'user task', activityType, elementId };
|
|
738
670
|
}
|
|
739
671
|
```
|
|
740
672
|
|
|
@@ -787,7 +719,6 @@ function InstancePanel({ instanceId, folderKey }: { instanceId: string; folderKe
|
|
|
787
719
|
if (data) lastDataRef.current = data;
|
|
788
720
|
const displayData = lastDataRef.current;
|
|
789
721
|
|
|
790
|
-
// Accumulate + sort variables
|
|
791
722
|
if (displayData) {
|
|
792
723
|
for (const v of displayData.variables.globalVariables) {
|
|
793
724
|
accumulatedVarsRef.current.set(v.id, v);
|
|
@@ -800,41 +731,35 @@ function InstancePanel({ instanceId, folderKey }: { instanceId: string; folderKe
|
|
|
800
731
|
if (!displayData) return <div>Loading...</div>;
|
|
801
732
|
|
|
802
733
|
// Render using displayVars (accumulated + sorted) and displayData.hitl
|
|
803
|
-
// displayData.hitl.isUserTask → show "Active User Task" UI
|
|
804
|
-
// displayData.hitl.activityType → show the current activity type
|
|
805
|
-
// displayVars → render process data table (stable rows)
|
|
806
|
-
// displayData.bpmnXml → render BPMN diagram
|
|
807
734
|
}
|
|
808
735
|
```
|
|
809
736
|
|
|
810
737
|
### Getting the task for the instance
|
|
811
738
|
|
|
812
|
-
When HITL is detected
|
|
739
|
+
When HITL is detected, you may also want to open the task in Action Center: find it with the `CreatorJobKey` OData filter; `instanceId` **is** the `CreatorJobKey`:
|
|
813
740
|
|
|
814
741
|
```typescript
|
|
815
742
|
import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
816
743
|
import { buildTaskUrl, getEmbedTaskUrl } from '../utils/formatters';
|
|
817
744
|
|
|
818
|
-
// Filter tasks by CreatorJobKey — the instanceId IS the CreatorJobKey
|
|
819
745
|
const result = await tasks.getAll({
|
|
820
746
|
filter: `CreatorJobKey eq ${instanceId}`,
|
|
821
747
|
pageSize: 10,
|
|
822
748
|
});
|
|
823
|
-
|
|
824
749
|
const pendingTask = result.items.find(t => !t.isCompleted) ?? null;
|
|
825
|
-
|
|
826
|
-
// Build the embed URL from the task ID
|
|
827
750
|
if (pendingTask) {
|
|
828
751
|
const taskLink = buildTaskUrl(pendingTask.id);
|
|
829
752
|
const embedUrl = getEmbedTaskUrl(taskLink);
|
|
830
|
-
// Open in iframe...
|
|
753
|
+
// Open in iframe (TaskEmbed below)...
|
|
831
754
|
}
|
|
832
755
|
```
|
|
833
756
|
|
|
834
757
|
### Rendering HITL status in the UI
|
|
835
758
|
|
|
836
|
-
|
|
837
|
-
|
|
759
|
+
Render `displayData.hitl.isUserTask` as **"Waiting on Human Review"** / **"This instance requires human input to continue"**; otherwise **"Automated Process"** and `displayData.hitl.activityType`. Render `displayData.bpmnXml` in `BpmnDiagram` and `displayVars` in the stable process-data table. When `displayData` is absent, render loading.
|
|
760
|
+
|
|
761
|
+
```tsx
|
|
762
|
+
{displayData.hitl.isUserTask ? (
|
|
838
763
|
<div className="flex items-center gap-3 p-4 bg-amber-50 border border-amber-200 rounded-lg">
|
|
839
764
|
<div className="p-2 bg-amber-100 rounded-lg">
|
|
840
765
|
<svg className="w-5 h-5 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -856,7 +781,7 @@ if (pendingTask) {
|
|
|
856
781
|
</div>
|
|
857
782
|
<div>
|
|
858
783
|
<h4 className="font-semibold text-gray-900">Automated Process</h4>
|
|
859
|
-
<p className="text-sm text-gray-600">Current step: {
|
|
784
|
+
<p className="text-sm text-gray-600">Current step: {displayData.hitl.activityType}</p>
|
|
860
785
|
</div>
|
|
861
786
|
</div>
|
|
862
787
|
)}
|
|
@@ -864,63 +789,55 @@ if (pendingTask) {
|
|
|
864
789
|
|
|
865
790
|
## Embedding Action Center Tasks (HITL)
|
|
866
791
|
|
|
867
|
-
|
|
792
|
+
Embed a human-in-the-loop task, action app, or escalation in an iframe.
|
|
868
793
|
|
|
869
794
|
### Embed URL format
|
|
870
795
|
|
|
871
|
-
|
|
872
|
-
|
|
796
|
+
Standard URL:
|
|
797
|
+
|
|
798
|
+
```text
|
|
873
799
|
https://cloud.uipath.com/{orgName}/{tenantName}/actions_/current-task/tasks/{taskId}
|
|
874
800
|
```
|
|
875
801
|
|
|
876
|
-
The
|
|
877
|
-
|
|
802
|
+
The embed URL inserts `embed_/` after the origin:
|
|
803
|
+
|
|
804
|
+
```text
|
|
878
805
|
https://cloud.uipath.com/embed_/{orgName}/{tenantName}/actions_/current-task/tasks/{taskId}
|
|
879
806
|
```
|
|
880
807
|
|
|
881
808
|
### API-to-Cloud URL mapping
|
|
882
809
|
|
|
883
|
-
**CRITICAL:** The API base URL
|
|
810
|
+
**CRITICAL:** The API base URL comes from `<meta name="uipath:base-url">`; API and cloud UI hostnames differ. You must map them using this table:
|
|
884
811
|
|
|
885
812
|
| API URL | Cloud UI URL |
|
|
886
|
-
|
|
813
|
+
|---|---|
|
|
887
814
|
| `https://api.uipath.com` | `https://cloud.uipath.com` |
|
|
888
815
|
| `https://<PREFIX>.api.uipath.com` | `https://<PREFIX>.uipath.com` |
|
|
889
816
|
| Any other host (Automation Suite, custom) | Same host, unchanged |
|
|
890
817
|
|
|
891
|
-
**
|
|
892
|
-
|
|
893
|
-
Add this helper to `src/utils/formatters.ts`:
|
|
818
|
+
**Never use naive replacement** such as `baseUrl.replace('api.', 'cloud.')`; it breaks prefixed hosts (produces `<PREFIX>.cloud.uipath.com`, which is wrong). Add to `src/utils/formatters.ts`:
|
|
894
819
|
|
|
895
820
|
```typescript
|
|
896
|
-
/** Maps an API base URL to the corresponding cloud UI URL */
|
|
897
821
|
export function apiToCloudUrl(apiBaseUrl: string): string {
|
|
898
822
|
try {
|
|
899
823
|
const url = new URL(apiBaseUrl);
|
|
900
|
-
// "api.uipath.com" → "cloud.uipath.com"
|
|
901
|
-
// "<prefix>.api.uipath.com" → "<prefix>.uipath.com"
|
|
902
824
|
let cloudHost = url.hostname.replace('api.uipath.com', 'uipath.com');
|
|
903
825
|
if (cloudHost === 'uipath.com') cloudHost = 'cloud.uipath.com';
|
|
904
826
|
return `${url.protocol}//${cloudHost}`;
|
|
905
|
-
} catch {
|
|
906
|
-
return apiBaseUrl;
|
|
907
|
-
}
|
|
827
|
+
} catch { return apiBaseUrl; }
|
|
908
828
|
}
|
|
909
829
|
```
|
|
910
830
|
|
|
911
831
|
### URL helper functions
|
|
912
832
|
|
|
913
|
-
Create `src/utils/formatters.ts
|
|
833
|
+
Create or extend `src/utils/formatters.ts`:
|
|
914
834
|
|
|
915
835
|
```typescript
|
|
916
|
-
/** Converts a standard Action Center URL to an embeddable iframe URL */
|
|
917
836
|
export const getEmbedTaskUrl = (taskUrl: string): string => {
|
|
918
837
|
try {
|
|
919
838
|
const url = new URL(taskUrl);
|
|
920
839
|
const parts = url.pathname.split('/');
|
|
921
|
-
const orgId = parts[1];
|
|
922
|
-
const tenantId = parts[2];
|
|
923
|
-
const taskId = parts[parts.length - 1];
|
|
840
|
+
const orgId = parts[1], tenantId = parts[2], taskId = parts[parts.length - 1];
|
|
924
841
|
return `${url.origin}/embed_/${orgId}/${tenantId}/actions_/current-task/tasks/${taskId}`;
|
|
925
842
|
} catch (e) {
|
|
926
843
|
console.error('Error parsing task URL:', e);
|
|
@@ -928,70 +845,37 @@ export const getEmbedTaskUrl = (taskUrl: string): string => {
|
|
|
928
845
|
}
|
|
929
846
|
};
|
|
930
847
|
|
|
931
|
-
/** Reads a value from a <meta name="uipath:*"> tag injected at runtime. */
|
|
932
848
|
function readUipathMeta(key: string): string {
|
|
933
849
|
return document.querySelector(`meta[name="uipath:${key}"]`)?.getAttribute('content') ?? '';
|
|
934
850
|
}
|
|
935
851
|
|
|
936
|
-
/** Constructs a standard Action Center task URL from components */
|
|
937
852
|
export function buildTaskUrl(taskId: number | string): string {
|
|
938
853
|
const baseUrl = readUipathMeta('base-url');
|
|
939
854
|
const org = readUipathMeta('org-name');
|
|
940
855
|
const tenant = readUipathMeta('tenant-name');
|
|
941
|
-
|
|
942
|
-
return `${cloudHost}/${org}/${tenant}/actions_/current-task/tasks/${taskId}`;
|
|
856
|
+
return `${apiToCloudUrl(baseUrl)}/${org}/${tenant}/actions_/current-task/tasks/${taskId}`;
|
|
943
857
|
}
|
|
944
858
|
```
|
|
945
859
|
|
|
946
860
|
### Getting the task link
|
|
947
861
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
```typescript
|
|
951
|
-
import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
952
|
-
|
|
953
|
-
// Filter tasks by CreatorJobKey — the instanceId IS the CreatorJobKey
|
|
954
|
-
const result = await tasks.getAll({
|
|
955
|
-
filter: `CreatorJobKey eq ${instanceId}`,
|
|
956
|
-
pageSize: 10,
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
const pendingTask = result.items.find(t => !t.isCompleted) ?? null;
|
|
960
|
-
|
|
961
|
-
// Build the embed URL
|
|
962
|
-
if (pendingTask) {
|
|
963
|
-
const taskLink = buildTaskUrl(pendingTask.id);
|
|
964
|
-
const embedUrl = getEmbedTaskUrl(taskLink);
|
|
965
|
-
// Open in iframe...
|
|
966
|
-
}
|
|
967
|
-
```
|
|
968
|
-
|
|
969
|
-
**Do NOT construct the URL manually** — always use the `apiToCloudUrl` + `buildTaskUrl` helpers to ensure correct environment mapping across cloud and other UiPath-hosted environments.
|
|
862
|
+
Find the task as in [Getting the task for the instance](#getting-the-task-for-the-instance), then call `buildTaskUrl(pendingTask.id)` and `getEmbedTaskUrl(taskLink)`. **Do NOT construct URLs manually.** Use `apiToCloudUrl()` and `buildTaskUrl()` for all environments.
|
|
970
863
|
|
|
971
864
|
### iframe component
|
|
972
865
|
|
|
973
|
-
|
|
974
|
-
import { getEmbedTaskUrl } from '../utils/formatters';
|
|
866
|
+
Render the embed in a closeable modal overlay:
|
|
975
867
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
onClose: () => void;
|
|
979
|
-
}
|
|
868
|
+
```tsx
|
|
869
|
+
import { getEmbedTaskUrl } from '../utils/formatters';
|
|
980
870
|
|
|
981
|
-
export const TaskEmbed = ({ taskLink, onClose }:
|
|
871
|
+
export const TaskEmbed = ({ taskLink, onClose }: { taskLink: string; onClose: () => void }) => (
|
|
982
872
|
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
983
873
|
<div className="bg-white rounded-lg shadow-xl w-[90vw] h-[90vh] flex flex-col">
|
|
984
874
|
<div className="flex justify-between items-center p-4 border-b">
|
|
985
875
|
<h3 className="text-lg font-medium text-gray-900">Task Details</h3>
|
|
986
876
|
<button onClick={onClose} className="text-gray-400 hover:text-gray-600">✕</button>
|
|
987
877
|
</div>
|
|
988
|
-
<div className="flex-1 p-1">
|
|
989
|
-
<iframe
|
|
990
|
-
src={getEmbedTaskUrl(taskLink)}
|
|
991
|
-
className="w-full h-full rounded border-0"
|
|
992
|
-
title="Action Center Task"
|
|
993
|
-
/>
|
|
994
|
-
</div>
|
|
878
|
+
<div className="flex-1 p-1"><iframe src={getEmbedTaskUrl(taskLink)} className="w-full h-full rounded border-0" title="Action Center Task" /></div>
|
|
995
879
|
</div>
|
|
996
880
|
</div>
|
|
997
881
|
);
|
|
@@ -999,29 +883,28 @@ export const TaskEmbed = ({ taskLink, onClose }: TaskEmbedProps) => (
|
|
|
999
883
|
|
|
1000
884
|
### Key points
|
|
1001
885
|
|
|
1002
|
-
- **No extra auth needed
|
|
1003
|
-
- **`embed_/` prefix is required
|
|
1004
|
-
- **
|
|
1005
|
-
- **
|
|
1006
|
-
- **Use
|
|
1007
|
-
- **Use a modal overlay**: Render the iframe in a modal (like the example above) so the user can close it and return to the app.
|
|
886
|
+
- **No extra auth needed:** the iframe shares the user's UiPath browser session.
|
|
887
|
+
- **`embed_/` prefix is required:** without it the page renders full navigation chrome.
|
|
888
|
+
- **HITL detection:** use `getVariables()` + `getBpmn()` (see [HITL Detection](#hitl-detection-human-in-the-loop)); never rely on `latestRunStatus`.
|
|
889
|
+
- **Use `apiToCloudUrl()`:** never convert API URLs to cloud URLs with string replacement.
|
|
890
|
+
- **Use a modal overlay** so the user can close it and return to the app.
|
|
1008
891
|
|
|
1009
892
|
## Tabular Data: Don't Dump Every Row in One Scroll
|
|
1010
893
|
|
|
1011
|
-
Operational
|
|
894
|
+
Operational tables may contain 100–10,000+ rows. Do not render all rows in one scroll:
|
|
1012
895
|
|
|
1013
|
-
- **Paginated rows** (default for >50 rows)
|
|
1014
|
-
- **Virtualized scroll**
|
|
1015
|
-
- **Top-N + "see all"**
|
|
896
|
+
- **Paginated rows** (default for >50 rows): page size 25–50, next/previous/page-number controls, and `Showing X–Y of Z`.
|
|
897
|
+
- **Virtualized scroll** for very large lists, 5k+: use `react-window` or `@tanstack/react-virtual` only when genuinely needed.
|
|
898
|
+
- **Top-N + "see all"** for informational tables such as Top 10 oldest open.
|
|
1016
899
|
|
|
1017
|
-
For
|
|
900
|
+
For mixed KPI/chart/table screens prefer pagination. A scroll-everything layout is acceptable for CSV export, never for a dashboard.
|
|
1018
901
|
|
|
1019
902
|
## Preventing Text Overflow
|
|
1020
903
|
|
|
1021
|
-
|
|
904
|
+
Apply these rules whenever rendering dynamic strings:
|
|
1022
905
|
|
|
1023
|
-
-
|
|
1024
|
-
- **Pair every truncation with `title={fullValue}`** so the
|
|
1025
|
-
-
|
|
1026
|
-
-
|
|
1027
|
-
-
|
|
906
|
+
- Flex/grid text parents need `min-w-0`; text needs `truncate` or `line-clamp-N`. `truncate` alone does nothing without `min-w-0` because flex children default to intrinsic width.
|
|
907
|
+
- **Pair every truncation (e.g. flex, table cell, card) with `title={fullValue}`** so the full string is readable on hover.
|
|
908
|
+
- SVG chart axes do not honor CSS truncation: shorten with the library's `tickFormatter`, keep the full value in the tooltip, prefer `displayName` over `name` for long choice values, or use a horizontal bar chart.
|
|
909
|
+
- Tables need `table-fixed`, explicit column widths, `max-w-0` on `<td>`, and a truncated inner element.
|
|
910
|
+
- Fixed-height cards need `overflow-hidden` and `line-clamp-N`.
|
|
@@ -183,7 +183,7 @@ Match one name — do not read either end to end — then read the span it gives
|
|
|
183
183
|
| Build or draft from a given design: approved SDD, BPMN diagram, sketch, whiteboard photo, diagram screenshot | built 1:1 | [Critical Rule 8](#critical-rules); an image: [Authoring from an image](references/image-transcription-guide.md) | — |
|
|
184
184
|
| Process and nested scopes | `bpmn`, `subProcess` | [Builders](#api-index) | `examples/NotifyChannel.bpmn.ts` |
|
|
185
185
|
| Variables, inputs, and outputs | `vars`, `var`, `input`, `output`, `schemas`, `schema` | [Process contract](references/bpmn-runtime.md#variables-and-the-process-contract) | `examples/NotifyChannel.bpmn.ts` |
|
|
186
|
-
| A node's own output | the node's `outputRows` — **not** a `.var()` beside it | [Process contract](references/bpmn-runtime.md#variables-and-the-process-contract) | `examples/InvoiceApproval.bpmn.ts` |
|
|
186
|
+
| A node's own output | the node's `outputs` (job builders) or `outputRows` (`.activity()`, `.scriptTask()`) — **not** a `.var()` beside it | [Process contract](references/bpmn-runtime.md#variables-and-the-process-contract) | `examples/InvoiceApproval.bpmn.ts` |
|
|
187
187
|
| Carried-from-import state, not for editing | `preserve` | [Process contract](references/bpmn-runtime.md#variables-and-the-process-contract) | `examples/InvoiceApproval.bpmn.ts` |
|
|
188
188
|
| Start, end, catch, throw, boundary | event methods | [Events](references/bpmn-runtime.md#events-and-timers) | `examples/NotifyChannel.bpmn.ts` |
|
|
189
189
|
| Error, timer, or message ON an activity | the body callback of any activity method: `onError`, `onTimer`, `onMessage` | [ActivityBuilder](#api-index) | `examples/InvoiceEscalation.bpmn.ts` |
|
|
@@ -256,6 +256,7 @@ export default bpmn('approval')
|
|
|
256
256
|
- A boundary event is declared on the activity it guards, in that activity's body callback, so `attachedTo` is never written.
|
|
257
257
|
An interrupting handler's path rejoins at the statement after the activity; a non-interrupting one runs beside the activity and must end its own path with an end event, `.goto()`, or an explicit flow.
|
|
258
258
|
On a `.fork()` branch's last activity, that statement is the fork's join, which then waits forever after the failure: end the handler's path in `.endEvent(<id>, { terminate: true })` or an `error` end, or follow the activity with another statement on its branch; a plain end stalls the join too ([draft-skeleton](references/draft-skeleton.md#what-a-skeleton-is) rule 9).
|
|
259
|
+
On the activity written directly before a `.fork()`, a handler that does not end stalls the fork itself, so put a plain box between.
|
|
259
260
|
- `choose` arms need `when` or `otherwise: true`; the fallback is the default flow, and no flow id is named.
|
|
260
261
|
Arms rejoin at the next statement, through a join named `<id>_join` only when more than one arm reaches it.
|
|
261
262
|
Inside a `.fork()` branch, a `choose` or `race` arm that ends in a plain `.endEvent()`, or that jumps out with `.goto()` into a sibling branch, past the join, or into the join while the branch's own path also reaches it, stalls the fork's join; end it with `terminate: true` or an `error` end, or let it rejoin ([draft-skeleton](references/draft-skeleton.md#what-a-skeleton-is) rule 9); to retry the whole fork, `.goto()` the box before it, never the fork itself.
|
|
@@ -41,7 +41,10 @@ make from syntax alone. Exact signatures remain in the generated API.
|
|
|
41
41
|
unless `name` is given) is one of these, matched case-insensitively
|
|
42
42
|
(`RESERVED_VARIABLE_NAME`): `vars`, `iterator`, `metadata`, `bindings`, `datafabric`,
|
|
43
43
|
`instanceglobals`, `orchestrator`, `outputs`, `result`, `runtime`, `senderinfo`,
|
|
44
|
-
`this`. `check` does not report it. A
|
|
44
|
+
`this`. `check` does not report it. A job node's `outputs` key and `outputVar` are
|
|
45
|
+
variable names too: `outputs: { result: '=result.x' }` fails `validate`, and a newer
|
|
46
|
+
SDK refuses it in `check` (`BPMN_JOB_OUTPUT_VAR_RESERVED`). Name the key for its
|
|
47
|
+
value: `outputs: { message: '=result.message' }`. A public `.output()` may be named `result`.
|
|
45
48
|
|
|
46
49
|
<!-- RULE:bpmn.variables.inputs-through-start -->
|
|
47
50
|
- A process input belongs to the start event, so a later step that reads `vars.<inputId>` is
|
|
@@ -288,6 +291,7 @@ make from syntax alone. Exact signatures remain in the generated API.
|
|
|
288
291
|
<!-- RULE:bpmn.orchestrator.job-outputs -->
|
|
289
292
|
- A job's output arguments are fields of `result`: map each one with `outputs` on the job node, as in `.executeApiWorkflow('greet', { process, folder, input, outputs: { message: '=result.message' } })`.
|
|
290
293
|
The same `outputs` option reads an RPA process's (`.startProcess()`), an agent's (`.startAgent()`) and a waited-for agentic or case process's (`.startAgenticProcess()`, `.startCaseProcess()` without `async`) output arguments.
|
|
294
|
+
These builders take no `outputRows`, and only `.startAgenticProcess()` / `.startCaseProcess()` take `async`: an older SDK drops either silently, a newer one refuses it (`BPMN_UNKNOWN_OPTION`).
|
|
291
295
|
`outputVar` (default `<id>_processResponse`) holds the job envelope, not the arguments; do not read an argument out of it with a `=js:` chain.
|
|
292
296
|
The argument name is the workflow's own output argument, as the deployed process declares it; when no live run has shown it, say the mapping is unverified.
|
|
293
297
|
|
|
@@ -305,7 +309,8 @@ make from syntax alone. Exact signatures remain in the generated API.
|
|
|
305
309
|
<!-- RULE:bpmn.http.connector -->
|
|
306
310
|
- An endpoint the connector catalog has no activity for, called through an existing connection, is
|
|
307
311
|
`.http(id, { method, url, connection, folder, connectorKey })`.
|
|
308
|
-
-
|
|
312
|
+
- Check `uip is connections base-url <CONNECTION_ID> --output json` before binding: it must be the host of the API you call. When it is another vendor's, do not bind that connection and never send this API's path relative to it; write the manual form above with the absolute URL (its SDK note applies). It carries no credential, so an API that needs one rejects it until the step is rebuilt on a connection for that host: name that connection on `Needs:` ([connectors](connectors.md)).
|
|
313
|
+
- `url` is the vendor API's own endpoint, relative to that base URL, such as Slack's `/team.info` under `https://slack.com/api`. Never use an Integration Service resource `Path` from `uip is resources list` or `describe`, which belongs to `.connector()`: the request reaches the vendor as written, so an Integration Service path that differs from the vendor's returns the vendor's 404 (`[102021] Received failure from vendor system`). An absolute URL to another host gets 400 "Invalid request URL" (`check`: `MANAGED_HTTP_ABSOLUTE_URL`).
|
|
309
314
|
- `connectorKey` is the connection's connector key from `uip is connections list --all-folders --output json`; omit it only for a `uipath-uipath-http` connection. A wrong or missing one passes `check` and fails `validate` with `MISSING_BINDING`.
|
|
310
315
|
- `connection` and `folder` name `.binding()`s holding the connection's `Id` and its `FolderKey` (or what `prepare` wrote); `folder` is required (`EMPTY_REQUIRED_FIELD folderKey`).
|
|
311
316
|
- `outputVar` (`<id>_response`) is the body; `<id>_code`, `<id>_headers` and `<id>_Error` hold the rest.
|
|
@@ -452,6 +457,7 @@ binding half, which is the same for every connector-backed node.
|
|
|
452
457
|
A decompiled process shows a folder-entity task as an `.activity()` with its rows and the entity's two bindings, with or without the connector library: a `.connector()` call would drop the picker, so decompile keeps the task as it is, and it compiles back unchanged.
|
|
453
458
|
- The file operations (`downloadFile`, `uploadFile`, `deleteFile`) refuse a folder-scoped entity; there is no SDK form for them yet.
|
|
454
459
|
Tell the user the file operation is not supported on a folder-scoped entity; do not fall back to a plain entity name, which addresses a tenant-level entity instead, or hand-fill `.activity()`.
|
|
460
|
+
- A Data Fabric entity trigger takes the same `entity: { name, folder }` option on `.eventTrigger()`: [connector events](connectors.md#6-connector-events).
|
|
455
461
|
- Do not add entity bindings by hand: compile writes the pair.
|
|
456
462
|
A V2 task reads it, so its entity can be re-pointed per environment at deploy; a `delete` task's entity is fixed at compile time.
|
|
457
463
|
|
|
@@ -43,8 +43,7 @@ The **action** is `nodeType`'s last segment — `create-issue` — not the label
|
|
|
43
43
|
`markdownPath` is that operation's field reference: read it rather than guessing input names.
|
|
44
44
|
|
|
45
45
|
`"total": 0` is a real miss, and means either `http()` or a connector the catalog searched does not carry (see §4).
|
|
46
|
-
A connector-mode `http()`'s
|
|
47
|
-
When several Integration Service resources match an `http()` request, describe each and pick the one that does what the user asked.
|
|
46
|
+
A connector-mode `http()` calls the vendor's own method for the user's ask, relative to the connection's base URL, such as Slack's `/emoji.list` for "list the custom emoji". Never an Integration Service resource name or `Path` from `uip is resources list` or `describe` (those are what `.connector()` and `.activity()` take), and never an `admin.*` method (Enterprise Grid org admin, such as `admin.emoji.list`) unless the ask is org administration: [HTTP and Orchestrator work](bpmn-runtime.md#http-and-orchestrator-work).
|
|
48
47
|
With no library pulled the search answers from the tenant's live catalog through `uip` (`"source": "tenant"`), and its rows carry no `markdownPath`: read the page with `uip maestro registry describe <nodeType>`, which fetches it.
|
|
49
48
|
A failed search gives `uip`'s reason; fix what it names: log in again for a session problem, or run the upgrade it names for an old SDK.
|
|
50
49
|
|
|
@@ -126,7 +125,8 @@ uip is connections ping <CONNECTION_ID> --output json # Data.Sta
|
|
|
126
125
|
- A connection is a sender's identity. Never bind, or offer on an outline, another person's personal connection (its folder is `<USER_NAME>'s workspace`).
|
|
127
126
|
A connection in a shared folder belongs to the team whoever its `Owner` is, even when its Name is an email: it is a normal candidate, chosen by the bullet above. "Use whatever exists" means nobody will answer which one.
|
|
128
127
|
Never bind any connection as a stand-in for a mailbox, channel or account the request names (`ar@…`) that has no connection.
|
|
129
|
-
Bind the requester's own personal connection only when they say to, or pick *Build it* on a draft gate that named it. When no connection is left to bind, leave the step unbound (§7) and name the missing connection on `Needs:`.
|
|
128
|
+
Bind the requester's own personal connection only when they say to, or pick *Build it* on a draft gate that named it. When no connection is left to bind, leave the step unbound (§7; for an `http()`, the next bullet) and name the missing connection on `Needs:`.
|
|
129
|
+
- Bind a connection to an `http()` only when `uip is connections base-url <CONNECTION_ID> --output json` is the host of the API the request targets. A connection on another vendor's base URL (a generic HTTP connection on `https://api.spotify.com/v1` for a Google call) is the wrong connection even when it is the only one or the user names it: say its base URL cannot reach that API, and write the manual `.http()` with the absolute URL instead, under its SDK note (`RULE:bpmn.http.manual` in [HTTP and Orchestrator work](bpmn-runtime.md#http-and-orchestrator-work)). That call carries no credential, so an API that needs one rejects it (Slack answers HTTP 200 with `ok: false`): name the missing `<API_HOST>` connection on `Needs:` and say the step must be rebuilt as the connected `.http()` once it exists.
|
|
130
130
|
- `prepare` refuses a connection that is not Enabled; `check`, `compile` and `refresh` do not. `validate` reports it as `MISSING_BINDING`, and `debug` faults with `[102002] Integration Services operation failed`. Never bind one: ask the user to re-authenticate it.
|
|
131
131
|
- `prepare`'s JSON `Message` keeps only the last line of its explanation; read stderr for the full refusal.
|
|
132
132
|
- Report the bound connection by Name and Folder, from the `connections list` row whose `Id` is `prepare`'s `Data.ConnectionId` (`Owner` is a user id, not a name).
|
|
@@ -190,6 +190,8 @@ uip maestro bpmn registry get Intsvc.ActivityExecution \
|
|
|
190
190
|
Neither is the connector's REST slug.
|
|
191
191
|
A node carrying `objectName="v2::attachment::upload"` validates and then dispatches to nothing — the platform matches on the curated pair, and so do the graders that compare against a real export.
|
|
192
192
|
`check` holds a hand-filled task to the catalog (`INTSVC_*`), which `validate` does not; fix what it reports.
|
|
193
|
+
On this `.activity()`, `path` is the operation's route under the connector, copied from `Operation.Path` of `uip is resources describe <CONNECTOR_KEY> <OBJECT_NAME> --operation <VERB> --output json`, saved or run now (`/curated_create_issue`, `/curated_get_issue/{issueId}`). It differs per operation and is not always `/<objectName>` (`issue_properties` is `/issue/{issueIdOrKey}/properties`), so never derive it.
|
|
194
|
+
Never the provider's REST route (`/rest/api/2/issue`): `validate` accepts it, and the debug run faults at the node (observed on Jira Create Issue: `102002 Integration Services operation failed`, provider 401).
|
|
193
195
|
Copy the `<uipath:context>` rows of `Data.V2.ElementXml` into the `.activity()` context, `activityConfigurationVersion: 'v2'` included.
|
|
194
196
|
Without `--input-details` the command returns only the extension type's V1 template (`activityConfigurationVersion` defaults to `v1` there), whose context a V2 task does not carry.
|
|
195
197
|
`--input-details` takes the node's values as JSON, `'{}'` when you have none yet; `Data.V2.MissingRequired` lists the required inputs still unset.
|
|
@@ -211,6 +213,9 @@ Both resolve against the same library and both take the same `connection` / `fol
|
|
|
211
213
|
- `filter` is the subscription's **scope**: the connector's own event parameters, e.g. `{ parentFolderId: lookup('uipath-microsoft-outlook365', 'email-received', 'parentFolderId').by('displayName', 'Inbox') }` for Outlook `email-received`. Omitting it subscribes to everything the connection can see, which `check` reports as `EVENT_NO_SCOPE` and names the parameters the operation declares.
|
|
212
214
|
Same rule as §2: a scope value that is an **id** (a mail folder, a channel, a workspace) takes a `lookup()`, never a pasted value; §3 resolves it (`--action email-received`).
|
|
213
215
|
- `object` names what a **generic** event watches — `record-created` and its kin on Data Fabric, Salesforce, ServiceNow, Jira. Such an entry carries no default, so without it the node emits `objectName: ""`, validates, and watches nothing. `check` reports `EVENT_GENERIC_NO_OBJECT`. A curated event has its object built in and refuses one (`EVENT_OBJECT_NOT_GENERIC`).
|
|
216
|
+
- A folder entity on a Data Fabric entity trigger (`record-created-preview-`, `record-updated-preview-`; object `EntityTriggers_V3`) is `entity: { name, folder: '<folder path>' }`, never `filter: { entityScope, folderEntityName }`: a literal filter watches the records but writes no picker, so `refresh` declares no entity and a deploy cannot re-point it.
|
|
217
|
+
`check` reports `RESOURCE_UNRESOLVED` and prints the `uip maestro registry prepare --entity <name> --folder-path <path>` that records the keys, as for `.dataService()`; the trigger and a task on that entity share one binding pair. Run `uip maestro bpmn refresh` after `compile`.
|
|
218
|
+
On an SDK without `entity` (`check` reports `TS2353` on it), run `uip maestro bpmn registry get Intsvc.EventTrigger --object-name EntityTriggers_V3 --operation <OPERATION> --connection-id <CONNECTION_ID> --input-details '{"queryParameters":{"entityScope":"folder","folderEntityName":"<ENTITY_NAME>"}}' --solution-folder <SOLUTION_DIR> --output json`, then author `.activity(<ID>, 'Intsvc.EventTrigger', { contextRows, inputs, outputRows, contextVerbatim: true })` from the `<uipath:context>`, input and output rows of `Data.V2.ElementXml`, and one `.binding(<BINDING_ID>, { resource, propertyAttribute, resourceKey, value })` per `Data.V2.RootBindings` row. Follow `Data.V2.Instructions` for the `{{VAR_ID}}` tokens. `examples/InvoiceApproval.bpmn.ts` (`Event_CiykXe`) shows the node's shape. `<OPERATION>` is `UPDATED_V3` or `CREATED_V3`. Never the literal `filter`.
|
|
214
219
|
|
|
215
220
|
```bash
|
|
216
221
|
uip is triggers objects <connector> <EVENT> --connection-id <id> --output json # what a generic event can watch
|
|
@@ -66,12 +66,13 @@ A skeleton is not a working process and must never be reported as one.
|
|
|
66
66
|
Do not hand-roll a loop from a gateway and a `.goto()` for a per-item step, and do not leave the marker to *Build it*: it is structure, and the user is approving it.
|
|
67
67
|
9. **A path that leaves a `.fork()` branch early must end the process; every other path continues on its own branch to the join.**
|
|
68
68
|
A parallel gateway, the fork as well as the join, fires only when every incoming flow has delivered a token.
|
|
69
|
-
|
|
69
|
+
Five shapes break that, and `check` and `validate` all pass them:
|
|
70
70
|
- A plain `.endEvent()` anywhere inside a branch — on the branch's own path, in a `.choose()` or `.race()` arm such as a rejection, or at the end of an interrupting `onError` or `onTimer` handler — consumes the branch's token, so the join waits forever.
|
|
71
71
|
- A `.goto()` inside a branch that jumps into a sibling branch, past the join, or into the join while the branch's own path also reaches it, breaks the join's count: the branch's own input to the join never delivers, or the join gets an input that never delivers, so the join waits forever.
|
|
72
72
|
- An interrupting handler whose path does not end rejoins at the statement after the activity, and for a branch's last activity that statement is the fork's join.
|
|
73
73
|
The handler's path then becomes an extra input to the join: the activity's own flow never delivers because the handler cancelled it, so the join waits forever.
|
|
74
74
|
- A `.goto()` from anywhere, after the join included, that targets the `.fork()` itself gives the fork a second incoming flow; a parallel gateway waits for every incoming flow, so the fork never fires.
|
|
75
|
+
- An interrupting handler whose path does not end, on the activity written directly before a `.fork()`, rejoins at the fork: the activity's own flow never delivers because the handler cancelled it, and the handler's path becomes a second incoming flow into the fork, so the fork never fires.
|
|
75
76
|
|
|
76
77
|
Write the safe shape:
|
|
77
78
|
- When the failure or outcome stops the process, end its path in `.endEvent(<id>, { name, terminate: true })`, or in an error end event (`.endEvent(<id>, { name, error: '<ErrorName>' })`) when a caller or an event sub-process handles the error.
|
|
@@ -81,6 +82,7 @@ A skeleton is not a working process and must never be reported as one.
|
|
|
81
82
|
A bare `.exclusiveGateway()` inside a branch does not compile, so merge on a box.
|
|
82
83
|
- To retry the whole parallel block, `.goto()` the box just before the `.fork()`, never the fork: the box merges the loop, and the fork keeps one incoming flow.
|
|
83
84
|
When the fork directly follows the start event, add that box first, such as the step that prepares the retry.
|
|
85
|
+
- When an activity with an `onError` or `onTimer` handler comes directly before a `.fork()`, put a plain box between them, such as the step that starts the parallel work, or end the handler's path as above.
|
|
84
86
|
|
|
85
87
|
A non-interrupting handler leaves the step running on its branch and ends in its own end event (rule 4), so rule 9 lets it end separately; a `.goto()` on its path still must not target the fork or a node that reaches `<fork>_join`.
|
|
86
88
|
Rule 9 also does not apply to the end event that closes a `.subProcess()` body: the sub-process then continues on its branch.
|
|
@@ -185,6 +187,7 @@ Without `confirmAccounts`, the compiled file carries `createByHand → setup_joi
|
|
|
185
187
|
This holds for source that `decompile` wrote too: its `.goto()` rejoins pass only when they stay on their own branch, and the `check --graph` bullet below cannot prove that, because a jump into a sibling branch leaves the join's `Incoming` count unchanged.
|
|
186
188
|
A non-interrupting handler's `.goto()` is exempt when its target cannot reach `<fork>_join`.
|
|
187
189
|
- In the `.bpmn.ts`, no `.goto()` anywhere targets a `.fork()` id; a whole-block retry targets the box before the fork (rule 9).
|
|
190
|
+
- In the `.bpmn.ts`, an activity written directly before a `.fork()` has no `onError` or `onTimer` handler whose path does not end; a handler there needs an end event or a plain box between the activity and the fork.
|
|
188
191
|
- In the `check --graph` output, under `Data.Graph.Nodes`, the node whose `Id` is `<fork>_join` has an `Incoming` no larger than the number of `Outgoing` entries on the `<fork>` node.
|
|
189
192
|
A larger `Incoming` means an extra path flows into the join; the join's extra source is a box inside an `onError` or `onTimer` handler, or a `.goto()` from a decision arm.
|
|
190
193
|
|
|
@@ -12,7 +12,7 @@ Change one and you are building something else.
|
|
|
12
12
|
The marker runs the body once per item, each with its own `iterator`; it does **not** by itself stop one item's failure ending the run.
|
|
13
13
|
An unhandled failure propagates outward, so containing it needs a `failure-escalation` net placed inside the iteration.
|
|
14
14
|
Isolation is the loop plus that net, never the loop alone.
|
|
15
|
-
- **Every item leaves a result, and aggregation reads them once, after the block completes.** Both exits of the body, the normal end and the net, append the item's outcome to `itemResults
|
|
15
|
+
- **Every item leaves a result, and aggregation reads them once, after the block completes.** Both exits of the body, the normal end and the net, append the item's outcome to `itemResults` (Parallel: write it to the store).
|
|
16
16
|
The multi-instance sub-process does not exit until every instance has, which is what makes a single aggregation step correct rather than a race.
|
|
17
17
|
- **The policy decision is separate from the aggregation.** Aggregating counts results; the gate decides whether those counts constitute success.
|
|
18
18
|
Best-effort, all-or-nothing, and quorum are then one condition apart.
|
|
@@ -96,6 +96,7 @@ The body is its own sequence scope: give it its own `.flowMode('sequence')`, sta
|
|
|
96
96
|
| `itemResults` | array | `[]` | One `{ item, ok }` per item, appended by the body or the net |
|
|
97
97
|
| `batchSummary` | jsonSchema | | Totals, success count, failure breakdown |
|
|
98
98
|
| `policySatisfied` | boolean | `false` | Did the run meet the configured policy |
|
|
99
|
+
| `batchId` | string | | Parallel only: tags this run's records for the read-back |
|
|
99
100
|
|
|
100
101
|
`policySatisfied` defaults to `false` so a run whose `aggregate` never wrote it ends as failed, not completed.
|
|
101
102
|
|
|
@@ -104,10 +105,17 @@ The body is its own sequence scope: give it its own `.flowMode('sequence')`, sta
|
|
|
104
105
|
| Variant | Question it answers | Delta |
|
|
105
106
|
| --- | --- | --- |
|
|
106
107
|
| Sequential | — | The shape above |
|
|
107
|
-
| Parallel | Must items run several at a time? |
|
|
108
|
+
| Parallel | Must items run several at a time? | With a named store: drop `sequential`, record each result outside the process. No store named: stay sequential |
|
|
108
109
|
|
|
109
110
|
**Parallel.** Drop `sequential: true` and the items run concurrently, but the in-process append no longer collects them ([Getting results to `aggregate`](#getting-results-to-aggregate)).
|
|
110
|
-
|
|
111
|
+
When the request names no store, do not invent an entity or connection, and do not stop to ask: keep `sequential: true`, which collects results correctly, and put on the final report's `Assumed:` line that items run one at a time because no store was named.
|
|
112
|
+
With a store, write each item's outcome to it, one Data Fabric record per item: a `.dataService()` `op: 'create'` in place of `recordResult` (`ok: true`) and another in place of `recordItemFailure` (`ok: false`).
|
|
113
|
+
Declare `.var('batchId', 'string')`, set it before the sub-process with `.task('newBatch', { set: { batchId: '=js:"BATCH-" + Date.now()' } })`, and write it on every record.
|
|
114
|
+
After the sub-process, read the batch back with a `.dataService()` `query`, ``where: "=js:`batchId = '${vars.batchId}'`"``, with `limit` at or above the batch size (it defaults to 100 and silently drops the rest).
|
|
115
|
+
Keep `aggregate` a `.scriptTask()` that totals the records from `vars.<queryId>_response` and writes `batchSummary` and `policySatisfied` through `outputs`, as the Shape does.
|
|
116
|
+
A `.task()` without `set` compiles to a no-op `bpmn:task` and leaves `policySatisfied` at its `false` default.
|
|
117
|
+
On a tenant entity the response is a bare array of records, `[]` when none (read `.length` and `.filter` on it directly).
|
|
118
|
+
The total is `vars.batchItems.length`, not the record count: a record count below it is an item that left no result, so count it as a failure (`met` needs `ok === vars.batchItems.length`).
|
|
111
119
|
This variant is not verified end to end.
|
|
112
120
|
|
|
113
121
|
## What to bind
|
|
@@ -115,7 +123,7 @@ This variant is not verified end to end.
|
|
|
115
123
|
- **`fetchBatch`**: the source (database query, file, API list, queue); batch size and filters are decided here.
|
|
116
124
|
- **The per-item work** inside `processEach`: a UiPath agent, an RPA job, Document Understanding, an API call.
|
|
117
125
|
Place and bind the node; the per-item work happens at runtime, not while authoring.
|
|
118
|
-
- **`aggregate`**: count `itemResults
|
|
126
|
+
- **`aggregate`**: count `itemResults` (Parallel: the query's records), apply the policy and set `policySatisfied`.
|
|
119
127
|
Best-effort is always true; all-or-nothing is true only with zero failures; quorum is true above a threshold.
|
|
120
128
|
Evaluate it here, in a node, rather than as the loop's `completion` condition.
|
|
121
129
|
A completion condition stops the block early, which is a different thing from judging the run afterwards, and it cannot see the per-item results the policy needs.
|
|
@@ -129,7 +137,7 @@ That is the common case when this pattern is nested inside another.
|
|
|
129
137
|
Drop `policyGate` and `endFailed` when every run succeeds by definition and only the counts matter.
|
|
130
138
|
Keep `sendReport`.
|
|
131
139
|
|
|
132
|
-
Keep both `recordResult` and `recordItemFailure` when you change the body: an item that leaves no result is one `aggregate` cannot count.
|
|
140
|
+
Keep both `recordResult` and `recordItemFailure` (Parallel: their store writes) when you change the body: an item that leaves no result is one `aggregate` cannot count.
|
|
133
141
|
Add fields to the record (a reason, a skipped flag) as the policy needs them.
|
|
134
142
|
|
|
135
143
|
## Getting results to `aggregate`
|
|
@@ -139,7 +147,7 @@ The sketch collects them itself: each iteration appends to `itemResults`, and `s
|
|
|
139
147
|
A Maestro debug run of this shape over `[1, -2, 3]` completed with three results, the `-2` one caught by the net, and `aggregate` counted 3 / 2 ok.
|
|
140
148
|
|
|
141
149
|
Parallel iterations overwrite each other's writes to one variable: the engine's variable store is last-writer-wins, and a Maestro run appending 12 items in parallel kept 11.
|
|
142
|
-
Never append to one variable from parallel iterations;
|
|
150
|
+
Never append to one variable from parallel iterations; write to the parallel variant's external store, or keep `sequential: true` when none is named.
|
|
143
151
|
|
|
144
152
|
The append is a `set` expression because it reads `iterator` directly and validates clean.
|
|
145
153
|
Declare the list as `array`, whose default is written as JSON; a `jsonSchema` default of `[]` does not arrive as a list.
|
|
@@ -68,6 +68,7 @@ Inputs, outputs, and vars take one of the six types the Flow CLI and Workbench o
|
|
|
68
68
|
- `float`, `double`, `date`, `datetime`, and `jsonSchema` are Case-only. The Flow builder rejects them with a TypeScript error and `DECLARATION_TYPE_NOT_FLOW` at build. Use `types.string` for dates, `types.number` for decimals, and `types.object` or `types.array` for `jsonSchema`, with shape in `{ schema }`, e.g. `{ type: types.object, schema: { type: 'object', properties: { id: { type: 'string' } } } }`. For an existing decompiled `.flow`, see [brownfield](brownfield.md#a-case-only-variable-type).
|
|
69
69
|
- `types.integer` builds and packs as integer but is unavailable in Workbench; prefer `types.number`.
|
|
70
70
|
- `types.any` is untyped; use only when no fixed type exists.
|
|
71
|
+
- A `types.file` value is a file reference `{ ID, FullName, MimeType, Metadata }`, never the content. Its file name is `.FullName`, not `.name`: `$vars.<triggerNodeId>.output.<inputName>.FullName`.
|
|
71
72
|
|
|
72
73
|
## Anti-patterns
|
|
73
74
|
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
*Exact signatures, fields, and defaults: `documentClassify()` and `dynamicExtract()`.*
|
|
4
4
|
|
|
5
|
+
The Extract document node (`uipath.ixp.extract-document-builder`) is opt-in:
|
|
6
|
+
add it only when the user names it. "We don't have a trained model yet" does
|
|
7
|
+
not name it. Every other extraction request, including one with no model yet,
|
|
8
|
+
goes to a published IXP model or an IXP project ([ixp.md](ixp.md)), never to
|
|
9
|
+
this node.
|
|
10
|
+
|
|
5
11
|
Two document steps that need no trained IxP fields: classification
|
|
6
12
|
(`uipath.document.classify`) labels a document, and the Extract document node
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
opt-in: add it only when the user names the Extract document node. Any other
|
|
10
|
-
extraction request, one with no trained model included, goes to a published
|
|
11
|
-
IXP model or an IXP project ([ixp.md](ixp.md)), never to this node.
|
|
13
|
+
pulls fields against a taxonomy you author INLINE
|
|
14
|
+
([Two ways to author it](#two-ways-to-author-it)).
|
|
12
15
|
|
|
13
16
|
Signatures: `documentClassify({ fileRef, pageRange?, splitPages?, modelConfig? })`;
|
|
14
17
|
`dynamicExtract({ fileRef, schema?, pageRange?, modelConfig? })`.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Commands: `uip maestro flow extraction check`, `uip maestro flow nodes create`, `uip maestro flow edges create`, `uip maestro flow validate`.*
|
|
4
4
|
|
|
5
|
+
Add this node to a new flow only when the user names it ([Which extraction node the user wants](#which-extraction-node-the-user-wants)). "We don't have a trained model yet" does not name it; that request goes to [ixp.md](ixp.md).
|
|
6
|
+
|
|
5
7
|
An Extract document node (`uipath.ixp.extract-document-builder`) extracts named fields using taxonomy embedded in the `.flow`; it has no trained model or IXP project. Add, wire, and validate it; design taxonomy in [extract-document-taxonomy.md](extract-document-taxonomy.md).
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -50,7 +50,7 @@ shape the form by shaping the inputs.
|
|
|
50
50
|
person would get an empty form with only a submit button.
|
|
51
51
|
|
|
52
52
|
A `types.file` input becomes an upload field whose value is a reference to the
|
|
53
|
-
file, not its content ([
|
|
53
|
+
file, not its content ([author.md](author.md#variable-types)).
|
|
54
54
|
The form takes no title, description or accepted file types.
|
|
55
55
|
|
|
56
56
|
## Evidence boundary
|
|
@@ -133,7 +133,7 @@ A `types.file` input takes a repeatable local file; the left side is the input n
|
|
|
133
133
|
--attachment <inputName>=<localPath>
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
At runtime the variable is
|
|
136
|
+
At runtime the variable is a file reference, not a path and never content: [its shape and name field](author.md#variable-types). A flow that parses the file passes that reference to a file-reading step, such as an RPA process taking it as its file argument ([rpa-workflow.md](rpa-workflow.md#where-the-job-runs)).
|
|
137
137
|
|
|
138
138
|
**A flow with more than one root starts at the default root.** It is the trigger marked `isDefaultEntryPoint`, else the first trigger. To run another root, pass its trigger node id:
|
|
139
139
|
|
|
@@ -94,7 +94,12 @@ counter only when the request bounds the retries.
|
|
|
94
94
|
|
|
95
95
|
The commonest reduction: the flow already has an agent that scores the item and
|
|
96
96
|
an action step after it. Insert only `confidenceGate` and `reviewDecision`. Bind
|
|
97
|
-
the gate to the existing confidence field
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
the gate to the existing confidence field. `applyDecision` is the first existing
|
|
98
|
+
step of the route the gate guards, even a log or script step before the action:
|
|
99
|
+
retarget its inbound edge at the gate, and end the Approve arm with
|
|
100
|
+
`.stepToRef('<that step id>')`. Do not copy that step or any step after it, and
|
|
101
|
+
do not add a second analyzer. Leave the new steps out of `.layout(...)`: merge
|
|
102
|
+
places them and shifts the later steps right to make room
|
|
103
|
+
([brownfield.md](../brownfield.md)). That shift keeps the layout; do not move
|
|
104
|
+
those steps back or give the new steps positions of your own. Keep `endRejected`
|
|
105
|
+
as its own End; a rejection never reaches the action.
|
|
@@ -72,7 +72,7 @@ Immediate fix:
|
|
|
72
72
|
1. {What to do — concrete action with exact navigation path or command}
|
|
73
73
|
- Why: {cite evidence that makes this step necessary}
|
|
74
74
|
- Where: {exact file, UI path, setting, or command}
|
|
75
|
-
- Who: {RPA developer | admin | platform team | process owner}
|
|
75
|
+
- Who: {RPA developer | admin | platform team | process owner, or the owner labels the domain's presentation.md defines}
|
|
76
76
|
- Source: {playbook path or docsai URL}
|
|
77
77
|
|
|
78
78
|
### {Domain} (Propagation)
|
|
@@ -86,11 +86,27 @@ Preventive fix:
|
|
|
86
86
|
- Who: {RPA developer | admin | platform team}
|
|
87
87
|
- Source: {playbook path or docsai URL}
|
|
88
88
|
2. {next domain, same structure}
|
|
89
|
+
|
|
90
|
+
Next action:
|
|
91
|
+
|
|
92
|
+
- Repair: {step numbers and Who:}
|
|
93
|
+
- Re-check (not run): `{command}`
|
|
94
|
+
- Later decision: {action}
|
|
89
95
|
```
|
|
90
96
|
|
|
91
|
-
|
|
97
|
+
### Next action
|
|
98
|
+
|
|
99
|
+
When a root cause is confirmed, the resolution ends with, in this order:
|
|
100
|
+
|
|
101
|
+
1. **Repair, by owner** — a change to the faulty artifact or setting: source, workflow (including migrating it to other activities or packages), config, binding, permission, connection. Name the Immediate fix steps by number, each with its `Who:`; Immediate fix itself lists no Later decision step. A Repair step is advice for its owner; never run it unasked. Omit this line when every fix step is a Later decision; the Re-check then leads.
|
|
102
|
+
2. **Re-check (not run)** — one line naming one read-only command that shows the run's current state before the later decision (e.g. `uip or jobs get <JOB_KEY> --no-download --output json`, `uip maestro <type> instance incidents <INSTANCE_ID> --folder-key <FOLDER_KEY> --output json`), entity ID filled in. A faulted run stays faulted after the repair: the read shows the state the later decision acts on, not that the repair worked. Copy it in its documented form from the investigation guide or the matched playbook. Name it; do NOT run it. No run to read, or no such command documented in the investigation guide or the matched playbook (e.g. Assistant sign-in, local dev-server failures) → omit this line; never compose one.
|
|
103
|
+
3. **Later decision** — any action that runs, publishes or deploys something (run, retry, resume, restart, instance migrate, upload, publish, deploy; first time or again), on its own line as the user's call after the re-check, unless the matched playbook's `## Resolution` prescribes that action alone as the fix for the confirmed cause (transient fault) — then it is the repair. On a Maestro instance, retry, resume and migrate are always a Later decision. A run, publish or deploy that follows another fix step is a Later decision: split it out of bundled playbook text. Exception: a restart whose only purpose is to load the setting the preceding fix step changed (service, app or dev-server restart) stays in the Repair. Nothing deferred → omit this line.
|
|
104
|
+
|
|
105
|
+
The closing message and any written diagnosis file carry every Next action line that applies. In the closing message, the Later decision stays its own line after the Re-check, never an item in a numbered next-steps list.
|
|
106
|
+
|
|
107
|
+
**Reduced-confidence terminal** (checklist gap survived the re-fetch): present the same structure, name the gap explicitly next to the cause statement, and lead the Immediate fix with the playbook's diagnostic recommendation (e.g., a byte-compare snippet) instead of a guessed branch. In Next action, the Repair is that diagnostic; give no Later decision. Recommending the discriminating diagnostic IS the deliverable when evidence cannot separate sibling causes — never silently pick one.
|
|
92
108
|
|
|
93
|
-
**No root cause found
|
|
109
|
+
**No root cause found** (exempt from Next action): present what was investigated and ruled out (from notes.md), and recommend providing more data or opening a UiPath support ticket.
|
|
94
110
|
|
|
95
111
|
## 4. Apply presentation rules
|
|
96
112
|
|
|
@@ -69,8 +69,8 @@ uip maestro <type> instance element-executions <id> [-f <fk>] — element exe
|
|
|
69
69
|
uip maestro <type> instance variables <id> [-f <fk>] — instance variables. Filter: --parent-element-id
|
|
70
70
|
uip maestro <type> instance asset <id> [-f <fk>] — process definition asset (BPMN XML, Flow JSON, Case JSON)
|
|
71
71
|
uip maestro <type> instance cursors <id> [-f <fk>] — current execution cursor positions
|
|
72
|
-
uip maestro <type> instance retry <id> [-f <fk>] — retry a faulted instance
|
|
73
|
-
uip maestro <type> instance pause|resume|cancel <id> [-f <fk>] — lifecycle control
|
|
72
|
+
uip maestro <type> instance retry <id> [-f <fk>] — retry a faulted instance (a Later decision; never run unasked)
|
|
73
|
+
uip maestro <type> instance pause|resume|cancel <id> [-f <fk>] — lifecycle control (a Later decision; never run unasked)
|
|
74
74
|
uip maestro <type> processes incidents <key> [--folder-key <fk>] — incidents across all instances of a process
|
|
75
75
|
uip maestro <type> incident summary — tenant-level incident SUMMARIES ONLY (no errorDetails)
|
|
76
76
|
uip maestro <type> incident get <incident-id> — get a single incident by ID
|
|
@@ -23,5 +23,5 @@ Not this playbook:
|
|
|
23
23
|
|
|
24
24
|
## Resolution
|
|
25
25
|
|
|
26
|
-
- For a transient Autopilot throttle,
|
|
26
|
+
- For a transient Autopilot throttle, the user waits for the retry window and retries the apply operation in the designer
|
|
27
27
|
- For sustained throttling at normal request volume, capture the request correlation identifier and escalate to the Maestro/LLM Gateway owner; do not prescribe connector-level batching without connector evidence
|
|
@@ -19,5 +19,5 @@ What can cause it:
|
|
|
19
19
|
|
|
20
20
|
## Resolution
|
|
21
21
|
|
|
22
|
-
- Open the email received trigger configuration in Studio Web and
|
|
23
|
-
-
|
|
22
|
+
- Open the email received trigger configuration in Studio Web and fix it; republishing the solution is a later decision
|
|
23
|
+
- After that publish, verify the deployment succeeds and the trigger fires in the target environment
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/deployment-failure.md
CHANGED
|
@@ -31,6 +31,6 @@ What to look for:
|
|
|
31
31
|
|
|
32
32
|
## Resolution
|
|
33
33
|
|
|
34
|
-
- **If duplicate entry points:** delete the duplicate start points in Studio Web
|
|
34
|
+
- **If duplicate entry points:** delete the duplicate start points in Studio Web; republish is a later decision
|
|
35
35
|
- **If cross-tenant trigger conflict:** deploy to a fresh tenant as a workaround; check latest release notes for a permanent fix
|
|
36
|
-
- **If stale trigger references:** do not manually delete triggers from Orchestrator UI; redeploy the solution
|
|
36
|
+
- **If stale trigger references:** do not manually delete triggers from Orchestrator UI; a clean redeploy of the solution is a later decision
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/folder-not-accessible.md
CHANGED
|
@@ -36,8 +36,8 @@ What to look for:
|
|
|
36
36
|
## Resolution
|
|
37
37
|
|
|
38
38
|
- **If user/robot not assigned:** assign with the appropriate role at Orchestrator → **Folder > Manage Access > Assign**
|
|
39
|
-
- **If folder name contains comma:** rename the folder to remove the comma;
|
|
40
|
-
- **If solution cross-imported:** update bindings to the destination folder keys;
|
|
39
|
+
- **If folder name contains comma:** rename the folder to remove the comma; bindings refresh on the next publish, which is a later decision; after it, the process resolves the folder
|
|
40
|
+
- **If solution cross-imported:** update bindings to the destination folder keys; they take effect on the next deploy, which is a later decision; after it, the process resolves the folder
|
|
41
41
|
- **If API call:** include the correct `X-UIPATH-OrganizationUnitId` header
|
|
42
42
|
- **If modern folder permissions:** ensure tenant-level access AND folder-level role for the account
|
|
43
43
|
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/integration-service-400.md
CHANGED
|
@@ -39,7 +39,7 @@ What to look for:
|
|
|
39
39
|
- **If empty string from removed variable:** delete and re-add the connector step so it stops referencing the orphaned variable
|
|
40
40
|
- **If `Content-Type` / multipart mismatch after connector update:** delete and re-add the activity to pick up the new schema
|
|
41
41
|
- **If schema bump:** update the inputs to match the new schema or pin to the prior connector version where supported
|
|
42
|
-
- **If connection in bad state:** re-provision the connection,
|
|
42
|
+
- **If connection in bad state:** re-provision the connection, or rebind the activity; a re-publish after it is a later decision
|
|
43
43
|
- **If genuinely malformed payload:** validate the input JSON against the connector spec
|
|
44
44
|
|
|
45
45
|
## Notes
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/integration-service-404.md
CHANGED
|
@@ -38,11 +38,11 @@ What to look for:
|
|
|
38
38
|
|
|
39
39
|
## Resolution
|
|
40
40
|
|
|
41
|
-
- **If connection expired:** re-authenticate; re-publish
|
|
42
|
-
- **If connector deleted/renamed:** re-create the activity against the current connector
|
|
41
|
+
- **If connection expired:** re-authenticate; re-publish, if needed, is a later decision
|
|
42
|
+
- **If connector deleted/renamed:** re-create the activity against the current connector; it takes effect on the next publish, which is a later decision
|
|
43
43
|
- **If IS not enabled on the tenant:** enable via **Admin > Tenant > Services**
|
|
44
44
|
- **If webhook config stale:** regenerate the webhook URL and update the external system
|
|
45
|
-
- **If stale folder key from cross-import:** fix per [folder-not-accessible](folder-not-accessible.md) - it owns the bindings update
|
|
45
|
+
- **If stale folder key from cross-import:** fix per [folder-not-accessible](folder-not-accessible.md) - it owns the bindings update; deploy stays a later decision
|
|
46
46
|
- **If Data Fabric target missing:** create the entity/instance in the destination folder, or fix the binding
|
|
47
47
|
|
|
48
48
|
## Notes
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/marker-invalid-cast.md
CHANGED
|
@@ -33,8 +33,8 @@ What to look for:
|
|
|
33
33
|
|
|
34
34
|
## Resolution
|
|
35
35
|
|
|
36
|
-
- Switch the marker's "Items" expression from JavaScript to a C# expression that returns a typed list/array
|
|
37
|
-
-
|
|
36
|
+
- Switch the marker's "Items" expression from JavaScript to a C# expression that returns a typed list/array; it takes effect on the next publish and run, which are a later decision
|
|
37
|
+
- After that publish and run, the parallel marker iterates all items
|
|
38
38
|
- If switching to C# is not feasible, work around by materializing the JS array into a typed collection variable in a preceding Script task
|
|
39
39
|
|
|
40
40
|
## References
|
package/skills/uipath-troubleshoot/references/products/maestro/playbooks/process-not-found-404.md
CHANGED
|
@@ -35,7 +35,7 @@ What to look for:
|
|
|
35
35
|
|
|
36
36
|
## Resolution
|
|
37
37
|
|
|
38
|
-
- **If ReleaseKey is stale or missing:**
|
|
38
|
+
- **If ReleaseKey is stale or missing:** update bindings to the correct folder; they take effect on the next publish and deploy, which are a later decision; after them, the job finds its process
|
|
39
39
|
- **If solution was cross-imported:** re-create the folder mapping or re-bind dependencies in the destination environment
|
|
40
40
|
- **If debug mode:** change the debug config from "Will be deployed in Debug folder" to use the already-deployed dependency in the target folder
|
|
41
41
|
- **If API call:** include the `X-UIPATH-OrganizationUnitId` header pointing at the correct folder
|
|
@@ -41,6 +41,6 @@ Service tasks are a BPMN concept — use the `bpmn` subcommand. For Flow/Case se
|
|
|
41
41
|
|
|
42
42
|
## Resolution
|
|
43
43
|
|
|
44
|
-
- **
|
|
44
|
+
- **Fix the child job's cause** first (see the last bullet); retrying the service task or resolving the open incident to unblock the instance is a later decision, depending on process design
|
|
45
45
|
- **Add a boundary error event** to the service task in Studio Web so future child job failures are caught and routed to an error-handling flow (retry, notification, or alternative path) instead of blocking the instance with an unresolved incident
|
|
46
46
|
- **Root cause is in the child domain** - the fix comes from the Orchestrator/package playbook reached in Investigation step 6, not from this one
|
|
@@ -6,3 +6,7 @@
|
|
|
6
6
|
- **Service tasks** — use the task name from the BPMN process, not the internal element ID (e.g., "Send Email task" not "Activity_EW6HNH")
|
|
7
7
|
- **Settings** — use UI labels from Maestro Instance Management, not API property names
|
|
8
8
|
- **Error codes** — always include both the numeric code and the human-readable message (e.g., "170002 — Failure in the Orchestrator Job")
|
|
9
|
+
|
|
10
|
+
## BPMN instance diagnosis
|
|
11
|
+
|
|
12
|
+
- **Fix owner** — in each Maestro Immediate fix step of a BPMN process, set `Who:` to one of these labels: `BPMN source` (the process model: structure, variables, mappings, conditions), `Generated package metadata` (`bindings_v2.json`, `entry-points.json`, `operate.json`, `package-descriptor.json`), `Integration Service enrichment` (connector metadata, connection binding, dynamic schemas), `Cloud configuration` (folder, process, release, connection state on the tenant). End the Immediate fix section with one `Fix owners:` line naming all four labels, each marked `implicated`, `not implicated` or `unconfirmed`. The closing message and any written diagnosis file carry the `Fix owners:` line.
|
package/version-manifest.json
CHANGED