@uipath/maestro-sdk 1.0.4 → 1.195.0

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.
@@ -0,0 +1,3866 @@
1
+ import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
12
+ var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
20
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
21
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ if (canCache)
29
+ cache.set(mod, to);
30
+ return to;
31
+ };
32
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, {
40
+ get: all[name],
41
+ enumerable: true,
42
+ configurable: true,
43
+ set: __exportSetter.bind(all, name)
44
+ });
45
+ };
46
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
47
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
48
+ // src/manifest/bpmn-spec.json
49
+ var bpmn_spec_default = {
50
+ version: "1.0.0",
51
+ source: "PO.Frontend registry generator (2026-04-14) + CLI notes",
52
+ extractedFrom: {
53
+ designSchemaUtils: "src/services/serialization/design-schema/design-schema-utils.ts",
54
+ bpmnModdle: "src/services/serialization/bpmn-moddle.ts",
55
+ fpsFormPropertiesUtils: "src/components/canvases/shared/panels/properties/fps/FPSFormPropertiesUtils.ts",
56
+ constants: "src/constants.ts",
57
+ designSchemaJsonDir: "src/services/serialization/design-schema/*.design-schema.json"
58
+ },
59
+ extensionTypes: {
60
+ "uipath:Activity": {
61
+ extensionType: "uipath:Activity",
62
+ label: "Canvas activity",
63
+ bpmnElement: "bpmn:ServiceTask",
64
+ placements: {
65
+ serviceTask: {
66
+ type: "bpmn:ServiceTask"
67
+ },
68
+ task: {
69
+ type: "bpmn:Task"
70
+ },
71
+ boundaryEvent: {
72
+ type: "bpmn:BoundaryEvent"
73
+ }
74
+ },
75
+ extensionTag: "uipath:activity",
76
+ contextFields: [],
77
+ inputPattern: "none",
78
+ outputSource: null,
79
+ outputType: null,
80
+ bindingPattern: "none",
81
+ requiresDiscovery: false,
82
+ isDynamic: true,
83
+ xmlTemplate: null,
84
+ outputNotes: "Studio Web canvas can emit custom output-only activity payloads for placeholder tasks and error boundary metadata."
85
+ },
86
+ "Actions.HITL": {
87
+ extensionType: "Actions.HITL",
88
+ label: "Create action app task",
89
+ bpmnElement: "bpmn:UserTask",
90
+ placements: {
91
+ activity: {
92
+ type: "bpmn:UserTask"
93
+ }
94
+ },
95
+ extensionTag: "uipath:activity",
96
+ contextFields: [
97
+ {
98
+ name: "appId",
99
+ type: "string",
100
+ required: false,
101
+ hidden: true,
102
+ isPrimaryKey: true,
103
+ binding: false,
104
+ defaultValue: null
105
+ },
106
+ {
107
+ name: "appVersion",
108
+ type: "number",
109
+ required: false,
110
+ hidden: true,
111
+ isPrimaryKey: false,
112
+ binding: false,
113
+ defaultValue: null
114
+ },
115
+ {
116
+ name: "actions",
117
+ type: "string",
118
+ required: false,
119
+ hidden: true,
120
+ isPrimaryKey: false,
121
+ binding: false,
122
+ defaultValue: null
123
+ },
124
+ {
125
+ name: "key",
126
+ type: "string",
127
+ required: false,
128
+ hidden: true,
129
+ isPrimaryKey: false,
130
+ binding: false,
131
+ defaultValue: null
132
+ },
133
+ {
134
+ name: "taskTitle",
135
+ type: "string",
136
+ required: false,
137
+ hidden: false,
138
+ isPrimaryKey: false,
139
+ binding: false,
140
+ defaultValue: null
141
+ }
142
+ ],
143
+ inputPattern: "mergedBody",
144
+ inputName: "HitlTaskArguments",
145
+ inputTarget: "bodyField",
146
+ outputSource: null,
147
+ outputType: "Actions.HITL",
148
+ outputName: "Process response",
149
+ useRelativeSource: true,
150
+ bindingPattern: "none",
151
+ requiresDiscovery: true,
152
+ isDynamic: true,
153
+ xmlTemplate: `<bpmn:UserTask id="{id}" name="{name}">
154
+ <bpmn:extensionElements>
155
+ <uipath:activity version="v1">
156
+ <uipath:type value="Actions.HITL" version="v1" />
157
+ <uipath:context>
158
+ <uipath:input name="appId" value="{appId}" />
159
+ <uipath:input name="appVersion" value="{appVersion}" />
160
+ <uipath:input name="actions" value="{actions}" />
161
+ <uipath:input name="key" value="{key}" />
162
+ <uipath:input name="taskTitle" value="{taskTitle}" />
163
+ </uipath:context>
164
+ <uipath:input name="HitlTaskArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
165
+ <uipath:output name="Process response" type="Actions.HITL" var="{varId}" />
166
+ </uipath:activity>
167
+ </bpmn:extensionElements>
168
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
169
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
170
+ </bpmn:UserTask>`,
171
+ discoveryNotes: "Uses getSupportedHumanTasks(search, systemName) to list available action app tasks",
172
+ contextFieldNotes: "Note: 'folderKey' field in design schema has name='key' (the actual XML context input name)"
173
+ },
174
+ "Orchestrator.StartJob": {
175
+ extensionType: "Orchestrator.StartJob",
176
+ label: "Start and wait for RPA workflow",
177
+ bpmnElement: "bpmn:ServiceTask",
178
+ placements: {
179
+ activity: {
180
+ type: "bpmn:ServiceTask"
181
+ }
182
+ },
183
+ extensionTag: "uipath:activity",
184
+ contextFields: [
185
+ {
186
+ name: "releaseKey",
187
+ displayName: "Process",
188
+ type: "string",
189
+ required: false,
190
+ hidden: true,
191
+ isPrimaryKey: false,
192
+ binding: false,
193
+ defaultValue: null,
194
+ bindingInfo: {
195
+ resource: "process",
196
+ resourceKeyPattern: "${metadata.key}",
197
+ propertyAttribute: "Key"
198
+ }
199
+ },
200
+ {
201
+ name: "folderId",
202
+ type: "string",
203
+ required: false,
204
+ hidden: true,
205
+ isPrimaryKey: false,
206
+ binding: false,
207
+ defaultValue: null
208
+ },
209
+ {
210
+ name: "folderPath",
211
+ type: "string",
212
+ required: false,
213
+ hidden: true,
214
+ isPrimaryKey: false,
215
+ binding: false,
216
+ defaultValue: null
217
+ },
218
+ {
219
+ name: "name",
220
+ type: "string",
221
+ required: false,
222
+ hidden: true,
223
+ isPrimaryKey: false,
224
+ binding: false,
225
+ defaultValue: null
226
+ }
227
+ ],
228
+ inputPattern: "mergedBody",
229
+ inputName: "JobArguments",
230
+ inputTarget: "bodyField",
231
+ outputSource: null,
232
+ outputType: "Orchestrator.RunJob",
233
+ outputName: "Process response",
234
+ useRelativeSource: true,
235
+ bindingPattern: "process",
236
+ bindingInfo: {
237
+ resource: "process",
238
+ resourceKeyPattern: "${metadata.key}",
239
+ propertyAttribute: "Key",
240
+ contextField: "releaseKey"
241
+ },
242
+ requiresDiscovery: true,
243
+ isDynamic: true,
244
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
245
+ <bpmn:extensionElements>
246
+ <uipath:activity version="v1">
247
+ <uipath:type value="Orchestrator.StartJob" version="v1" />
248
+ <uipath:context>
249
+ <uipath:input name="releaseKey" value="{releaseKey}" />
250
+ <uipath:input name="folderId" value="{folderId}" />
251
+ <uipath:input name="folderPath" value="{folderPath}" />
252
+ <uipath:input name="name" value="{name}" />
253
+ </uipath:context>
254
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
255
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
256
+ </uipath:activity>
257
+ </bpmn:extensionElements>
258
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
259
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
260
+ </bpmn:ServiceTask>`,
261
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('process', search) to list available processes"
262
+ },
263
+ "Orchestrator.StartAgentJob": {
264
+ extensionType: "Orchestrator.StartAgentJob",
265
+ label: "Start and wait for agent",
266
+ bpmnElement: "bpmn:ServiceTask",
267
+ placements: {
268
+ activity: {
269
+ type: "bpmn:ServiceTask"
270
+ }
271
+ },
272
+ extensionTag: "uipath:activity",
273
+ contextFields: [
274
+ {
275
+ name: "name",
276
+ displayName: "Agent",
277
+ type: "string",
278
+ required: true,
279
+ hidden: true,
280
+ isPrimaryKey: false,
281
+ binding: true,
282
+ defaultValue: null,
283
+ bindingInfo: {
284
+ resource: "process",
285
+ resourceKeyPattern: "${metadata.key}",
286
+ propertyAttribute: "name"
287
+ }
288
+ },
289
+ {
290
+ name: "folderPath",
291
+ type: "string",
292
+ required: true,
293
+ hidden: true,
294
+ isPrimaryKey: false,
295
+ binding: true,
296
+ defaultValue: null,
297
+ bindingInfo: {
298
+ resource: "process",
299
+ resourceKeyPattern: "${metadata.key}",
300
+ propertyAttribute: "folderPath"
301
+ }
302
+ }
303
+ ],
304
+ inputPattern: "mergedBody",
305
+ inputName: "JobArguments",
306
+ inputTarget: "bodyField",
307
+ outputSource: null,
308
+ outputType: "Orchestrator.RunJob",
309
+ outputName: "Process response",
310
+ useRelativeSource: true,
311
+ bindingPattern: "process",
312
+ bindingInfo: {
313
+ resource: "process",
314
+ resourceKeyPattern: "${metadata.key}",
315
+ propertyAttribute: "name",
316
+ contextField: "name"
317
+ },
318
+ requiresDiscovery: true,
319
+ isDynamic: true,
320
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
321
+ <uipath:activity type="Orchestrator.StartAgentJob" version="v1">
322
+ <uipath:context>
323
+ <uipath:input name="name" value="=bindings.{nameBindingId}" />
324
+ <uipath:input name="folderPath" value="=bindings.{folderPathBindingId}" />
325
+ </uipath:context>
326
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
327
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
328
+ </uipath:activity>
329
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
330
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
331
+ </bpmn:ServiceTask>`,
332
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('agent', search) to list available agents"
333
+ },
334
+ "Orchestrator.BusinessRules": {
335
+ extensionType: "Orchestrator.BusinessRules",
336
+ label: "Execute business rule [Preview]",
337
+ bpmnElement: "bpmn:BusinessRuleTask",
338
+ placements: {
339
+ activity: {
340
+ type: "bpmn:BusinessRuleTask"
341
+ }
342
+ },
343
+ extensionTag: "uipath:activity",
344
+ contextFields: [
345
+ {
346
+ name: "releaseKey",
347
+ displayName: "Process",
348
+ type: "string",
349
+ required: false,
350
+ hidden: true,
351
+ isPrimaryKey: false,
352
+ binding: false,
353
+ defaultValue: null,
354
+ bindingInfo: {
355
+ resource: "process",
356
+ resourceKeyPattern: "${metadata.key}",
357
+ propertyAttribute: "Key"
358
+ }
359
+ },
360
+ {
361
+ name: "folderId",
362
+ type: "string",
363
+ required: false,
364
+ hidden: true,
365
+ isPrimaryKey: false,
366
+ binding: false,
367
+ defaultValue: null
368
+ },
369
+ {
370
+ name: "folderPath",
371
+ type: "string",
372
+ required: false,
373
+ hidden: true,
374
+ isPrimaryKey: false,
375
+ binding: false,
376
+ defaultValue: null
377
+ },
378
+ {
379
+ name: "name",
380
+ type: "string",
381
+ required: false,
382
+ hidden: true,
383
+ isPrimaryKey: false,
384
+ binding: false,
385
+ defaultValue: null
386
+ }
387
+ ],
388
+ inputPattern: "mergedBody",
389
+ inputName: "JobArguments",
390
+ inputTarget: "bodyField",
391
+ outputSource: null,
392
+ outputType: "Orchestrator.BusinessRules",
393
+ outputName: "Execute business rule [Preview]",
394
+ useRelativeSource: true,
395
+ bindingPattern: "businessRule",
396
+ bindingInfo: {
397
+ resource: "process",
398
+ resourceKeyPattern: "${metadata.key}",
399
+ propertyAttribute: "Key",
400
+ contextField: "releaseKey"
401
+ },
402
+ requiresDiscovery: true,
403
+ isDynamic: true,
404
+ xmlTemplate: `<bpmn:BusinessRuleTask id="{id}" name="{name}">
405
+ <bpmn:extensionElements>
406
+ <uipath:activity version="v1">
407
+ <uipath:type value="Orchestrator.BusinessRules" version="v1" />
408
+ <uipath:context>
409
+ <uipath:input name="releaseKey" value="{releaseKey}" />
410
+ <uipath:input name="folderId" value="{folderId}" />
411
+ <uipath:input name="folderPath" value="{folderPath}" />
412
+ <uipath:input name="name" value="{name}" />
413
+ </uipath:context>
414
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
415
+ <uipath:output name="Execute business rule [Preview]" type="Orchestrator.BusinessRules" var="{varId}" />
416
+ </uipath:activity>
417
+ </bpmn:extensionElements>
418
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
419
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
420
+ </bpmn:BusinessRuleTask>`,
421
+ discoveryNotes: "Uses getOrchestratorBusinessRules() to list available business rules"
422
+ },
423
+ "Intsvc.ActivityExecution": {
424
+ extensionType: "Intsvc.ActivityExecution",
425
+ label: "Execute connector activity",
426
+ bpmnElement: "bpmn:SendTask",
427
+ placements: {
428
+ activity: {
429
+ type: "bpmn:SendTask"
430
+ },
431
+ intermediateEvent: {
432
+ type: "bpmn:IntermediateThrowEvent",
433
+ eventDefinition: {
434
+ type: "bpmn:MessageEventDefinition"
435
+ }
436
+ },
437
+ endEvent: {
438
+ type: "bpmn:EndEvent",
439
+ eventDefinition: {
440
+ type: "bpmn:MessageEventDefinition"
441
+ }
442
+ }
443
+ },
444
+ extensionTag: "uipath:activity",
445
+ contextFields: [
446
+ {
447
+ name: "activity",
448
+ displayName: "Activity",
449
+ type: "string",
450
+ required: true,
451
+ hidden: false,
452
+ isPrimaryKey: true,
453
+ binding: false,
454
+ defaultValue: null
455
+ },
456
+ {
457
+ name: "connectorKey",
458
+ displayName: "Connector key",
459
+ type: "string",
460
+ required: false,
461
+ hidden: true,
462
+ isPrimaryKey: false,
463
+ binding: false,
464
+ defaultValue: null
465
+ },
466
+ {
467
+ name: "connection",
468
+ displayName: "Connection",
469
+ type: "string",
470
+ required: false,
471
+ hidden: true,
472
+ isPrimaryKey: false,
473
+ binding: true,
474
+ defaultValue: null
475
+ },
476
+ {
477
+ name: "folderKey",
478
+ displayName: "Folder key",
479
+ type: "string",
480
+ required: false,
481
+ hidden: true,
482
+ isPrimaryKey: false,
483
+ binding: false,
484
+ defaultValue: null
485
+ },
486
+ {
487
+ name: "method",
488
+ displayName: "Method",
489
+ type: "string",
490
+ required: false,
491
+ hidden: true,
492
+ isPrimaryKey: false,
493
+ binding: false,
494
+ defaultValue: null
495
+ },
496
+ {
497
+ name: "path",
498
+ displayName: "Path",
499
+ type: "string",
500
+ required: false,
501
+ hidden: true,
502
+ isPrimaryKey: false,
503
+ binding: false,
504
+ defaultValue: null
505
+ }
506
+ ],
507
+ inputPattern: "separateInputs",
508
+ inputName: "body",
509
+ inputTarget: "body",
510
+ outputSource: ".",
511
+ outputType: "custom",
512
+ outputName: "result",
513
+ useRelativeSource: false,
514
+ bindingPattern: "connection",
515
+ requiresDiscovery: true,
516
+ isDynamic: true,
517
+ xmlTemplate: `<bpmn:SendTask id="{id}" name="{name}">
518
+ <bpmn:extensionElements>
519
+ <uipath:activity version="v1">
520
+ <uipath:type value="Intsvc.ActivityExecution" version="v1" />
521
+ <uipath:context>
522
+ <uipath:input name="activity" value="{activity}" />
523
+ <uipath:input name="connectorKey" value="{connectorKey}" />
524
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
525
+ <uipath:input name="folderKey" value="{folderKey}" />
526
+ <uipath:input name="method" value="{method}" />
527
+ <uipath:input name="path" value="{path}" />
528
+ </uipath:context>
529
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
530
+ <uipath:output name="result" type="custom" source="." var="{varId}" />
531
+ </uipath:activity>
532
+ </bpmn:extensionElements>
533
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
534
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
535
+ </bpmn:SendTask>`,
536
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections. Activity/connector metadata comes from Integration Service catalog.",
537
+ inputNotes: "isSplitInputs=false in design schema; inputs are sent as separate <uipath:input> elements, not merged into a single JSON body",
538
+ extensionTagNotes: "In isExecution array, NOT in isEvents array, so uses uipath:activity"
539
+ },
540
+ "Intsvc.HttpExecution": {
541
+ extensionType: "Intsvc.HttpExecution",
542
+ label: "Execute HTTP request (Legacy)",
543
+ bpmnElement: "bpmn:SendTask",
544
+ placements: {
545
+ activity: {
546
+ type: "bpmn:SendTask"
547
+ }
548
+ },
549
+ extensionTag: "uipath:activity",
550
+ contextFields: [
551
+ {
552
+ name: "mode",
553
+ displayName: "Mode",
554
+ type: "string",
555
+ required: true,
556
+ hidden: true,
557
+ isPrimaryKey: false,
558
+ binding: false,
559
+ defaultValue: "manual"
560
+ },
561
+ {
562
+ name: "method",
563
+ displayName: "HTTP Method",
564
+ type: "string",
565
+ required: true,
566
+ hidden: false,
567
+ isPrimaryKey: false,
568
+ binding: false,
569
+ defaultValue: "GET"
570
+ },
571
+ {
572
+ name: "url",
573
+ displayName: "URL",
574
+ type: "string",
575
+ required: true,
576
+ hidden: false,
577
+ isPrimaryKey: false,
578
+ binding: true,
579
+ defaultValue: ""
580
+ },
581
+ {
582
+ name: "headers",
583
+ displayName: "Headers",
584
+ type: "json",
585
+ required: false,
586
+ hidden: false,
587
+ isPrimaryKey: false,
588
+ binding: true,
589
+ defaultValue: "{}"
590
+ },
591
+ {
592
+ name: "parameters",
593
+ displayName: "Query Parameters",
594
+ type: "json",
595
+ required: false,
596
+ hidden: false,
597
+ isPrimaryKey: false,
598
+ binding: true,
599
+ defaultValue: "{}"
600
+ },
601
+ {
602
+ name: "body",
603
+ displayName: "Request Body",
604
+ type: "json",
605
+ required: false,
606
+ hidden: false,
607
+ isPrimaryKey: false,
608
+ binding: true,
609
+ defaultValue: "null"
610
+ }
611
+ ],
612
+ inputPattern: "none",
613
+ outputSource: "=response",
614
+ outputType: "jsonSchema",
615
+ outputName: "response",
616
+ useRelativeSource: false,
617
+ bindingPattern: "none",
618
+ requiresDiscovery: false,
619
+ isDynamic: false,
620
+ xmlTemplate: `<bpmn:SendTask id="{id}" name="{name}">
621
+ <bpmn:extensionElements>
622
+ <uipath:activity version="v1">
623
+ <uipath:type value="Intsvc.HttpExecution" version="v1" />
624
+ <uipath:context>
625
+ <uipath:input name="mode" value="manual" />
626
+ <uipath:input name="method" value="GET" />
627
+ <uipath:input name="url" value="=bindings.{bindingId}" />
628
+ <uipath:input name="headers" value="=bindings.{bindingId}" />
629
+ <uipath:input name="parameters" value="=bindings.{bindingId}" />
630
+ <uipath:input name="body" value="=bindings.{bindingId}" />
631
+ </uipath:context>
632
+ <uipath:output name="response" type="jsonSchema" source="=response" var="{varId}" />
633
+ </uipath:activity>
634
+ </bpmn:extensionElements>
635
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
636
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
637
+ </bpmn:SendTask>`,
638
+ inputNotes: "No jsonBody in design schema input section; all configuration is in context fields"
639
+ },
640
+ "Intsvc.UnifiedHttpRequest": {
641
+ extensionType: "Intsvc.UnifiedHttpRequest",
642
+ label: "Execute HTTP request",
643
+ bpmnElement: "bpmn:SendTask",
644
+ placements: {
645
+ activity: {
646
+ type: "bpmn:SendTask"
647
+ }
648
+ },
649
+ extensionTag: "uipath:activity",
650
+ contextFields: [
651
+ {
652
+ name: "mode",
653
+ displayName: "Mode",
654
+ type: "string",
655
+ required: true,
656
+ hidden: true,
657
+ isPrimaryKey: false,
658
+ binding: false,
659
+ defaultValue: "manual"
660
+ },
661
+ {
662
+ name: "method",
663
+ displayName: "HTTP Method",
664
+ type: "string",
665
+ required: true,
666
+ hidden: false,
667
+ isPrimaryKey: false,
668
+ binding: false,
669
+ defaultValue: "GET"
670
+ },
671
+ {
672
+ name: "url",
673
+ displayName: "URL",
674
+ type: "string",
675
+ required: true,
676
+ hidden: false,
677
+ isPrimaryKey: false,
678
+ binding: true,
679
+ defaultValue: ""
680
+ },
681
+ {
682
+ name: "headers",
683
+ displayName: "Headers",
684
+ type: "json",
685
+ required: false,
686
+ hidden: false,
687
+ isPrimaryKey: false,
688
+ binding: true,
689
+ defaultValue: "{}"
690
+ },
691
+ {
692
+ name: "parameters",
693
+ displayName: "Query Parameters",
694
+ type: "json",
695
+ required: false,
696
+ hidden: false,
697
+ isPrimaryKey: false,
698
+ binding: true,
699
+ defaultValue: "{}"
700
+ },
701
+ {
702
+ name: "body",
703
+ displayName: "Request Body",
704
+ type: "json",
705
+ required: false,
706
+ hidden: false,
707
+ isPrimaryKey: false,
708
+ binding: true,
709
+ defaultValue: "null"
710
+ }
711
+ ],
712
+ inputPattern: "separateInputs",
713
+ outputSource: "=response",
714
+ outputType: "jsonSchema",
715
+ outputName: "response",
716
+ useRelativeSource: false,
717
+ bindingPattern: "none",
718
+ requiresDiscovery: false,
719
+ isDynamic: false,
720
+ designSchemaSharedWith: "Intsvc.HttpExecution",
721
+ xmlTemplate: `<bpmn:SendTask id="{id}" name="{name}">
722
+ <bpmn:extensionElements>
723
+ <uipath:activity version="v1">
724
+ <uipath:type value="Intsvc.UnifiedHttpRequest" version="v1" />
725
+ <uipath:context>
726
+ <uipath:input name="mode" value="manual" />
727
+ <uipath:input name="method" value="GET" />
728
+ <uipath:input name="url" value="=bindings.{bindingId}" />
729
+ <uipath:input name="headers" value="=bindings.{bindingId}" />
730
+ <uipath:input name="parameters" value="=bindings.{bindingId}" />
731
+ <uipath:input name="body" value="=bindings.{bindingId}" />
732
+ </uipath:context>
733
+ <uipath:output name="response" type="jsonSchema" source="=response" var="{varId}" />
734
+ </uipath:activity>
735
+ </bpmn:extensionElements>
736
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
737
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
738
+ </bpmn:SendTask>`,
739
+ inputNotes: "In the isExecution array. Despite the design schema having no jsonBody, inputs are managed by the IS connector framework and serialized as separate <uipath:input> elements. The design schema context fields (mode, method, url, headers, parameters, body) are used for the HttpRequestV2Properties panel.",
740
+ contextFieldNotes: "Context fields above come from the legacy design schema (shared with Intsvc.HttpExecution). In the FPS ImplementationSection, this type is routed through IntsvcActivityProperties (IS connector framework), NOT HttpRequestProperties. The IS connector auto-initializes with HTTP_ACTIVITY_CONFIG and manages context dynamically. When used via the uipath.http-request shortcut node, it uses HttpRequestV2Properties which manages these context fields directly.",
741
+ extensionTagNotes: "In isExecution array, uses uipath:activity. Shares design schema with Intsvc.HttpExecution but uses IS connector framework at runtime."
742
+ },
743
+ "Intsvc.WaitForEvent": {
744
+ extensionType: "Intsvc.WaitForEvent",
745
+ label: "Wait for connector event",
746
+ bpmnElement: "bpmn:ReceiveTask",
747
+ placements: {
748
+ activity: {
749
+ type: "bpmn:ReceiveTask"
750
+ },
751
+ intermediateEvent: {
752
+ type: "bpmn:IntermediateCatchEvent",
753
+ eventDefinition: {
754
+ type: "bpmn:MessageEventDefinition"
755
+ }
756
+ },
757
+ boundaryEvent: {
758
+ type: "bpmn:BoundaryEvent",
759
+ eventDefinition: {
760
+ type: "bpmn:MessageEventDefinition"
761
+ }
762
+ }
763
+ },
764
+ extensionTag: "uipath:event",
765
+ contextFields: [],
766
+ inputPattern: "separateInputs",
767
+ outputSource: ".",
768
+ outputType: "custom",
769
+ outputName: "result",
770
+ useRelativeSource: false,
771
+ bindingPattern: "connection",
772
+ requiresDiscovery: true,
773
+ isDynamic: false,
774
+ xmlTemplate: `<bpmn:ReceiveTask id="{id}" name="{name}">
775
+ <bpmn:extensionElements>
776
+ <uipath:event version="v1">
777
+ <uipath:type value="Intsvc.WaitForEvent" version="v1" />
778
+ <uipath:output name="result" type="custom" source="." var="{varId}" />
779
+ </uipath:event>
780
+ </bpmn:extensionElements>
781
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
782
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
783
+ </bpmn:ReceiveTask>`,
784
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
785
+ inputNotes: "isSplitInputs=false; inputs are defined in input.fields (not jsonBody). Sent as separate <uipath:input> elements.",
786
+ contextFieldNotes: "Context fields are empty in design schema; all field definitions are in inputFields below",
787
+ extensionTagNotes: "In isEvents array, uses uipath:event",
788
+ inputFields: [
789
+ {
790
+ name: "connectionId",
791
+ displayName: "Connection ID",
792
+ type: "string",
793
+ required: true,
794
+ hidden: false,
795
+ isPrimaryKey: false,
796
+ binding: true,
797
+ defaultValue: null,
798
+ description: "Connection ID for the IS connector (bindable)"
799
+ },
800
+ {
801
+ name: "connectorKey",
802
+ displayName: "Connector key",
803
+ type: "string",
804
+ required: true,
805
+ hidden: false,
806
+ isPrimaryKey: false,
807
+ binding: false,
808
+ defaultValue: null,
809
+ description: "Integration Service connector identifier"
810
+ },
811
+ {
812
+ name: "folderId",
813
+ displayName: "Folder ID",
814
+ type: "string",
815
+ required: true,
816
+ hidden: false,
817
+ isPrimaryKey: false,
818
+ binding: false,
819
+ defaultValue: null,
820
+ description: "Folder ID for the connector connection"
821
+ },
822
+ {
823
+ name: "folderPath",
824
+ displayName: "Folder path",
825
+ type: "string",
826
+ required: true,
827
+ hidden: false,
828
+ isPrimaryKey: false,
829
+ binding: false,
830
+ defaultValue: null,
831
+ description: "Folder path for the connector connection"
832
+ },
833
+ {
834
+ name: "folderKey",
835
+ displayName: "Folder key",
836
+ type: "string",
837
+ required: true,
838
+ hidden: false,
839
+ isPrimaryKey: false,
840
+ binding: false,
841
+ defaultValue: null,
842
+ description: "Folder key for the connector connection"
843
+ },
844
+ {
845
+ name: "operation",
846
+ displayName: "Operation",
847
+ type: "string",
848
+ required: true,
849
+ hidden: true,
850
+ isPrimaryKey: true,
851
+ binding: false,
852
+ defaultValue: null,
853
+ description: "Connector event operation to wait for"
854
+ },
855
+ {
856
+ name: "objectName",
857
+ displayName: "Object name",
858
+ type: "string",
859
+ required: true,
860
+ hidden: true,
861
+ isPrimaryKey: false,
862
+ binding: false,
863
+ defaultValue: null,
864
+ description: "Object name associated with the event trigger"
865
+ },
866
+ {
867
+ name: "filter",
868
+ displayName: "Filter",
869
+ type: "object",
870
+ required: false,
871
+ hidden: false,
872
+ isPrimaryKey: false,
873
+ binding: false,
874
+ defaultValue: {},
875
+ description: "Filter criteria for the event"
876
+ },
877
+ {
878
+ name: "parameters",
879
+ displayName: "Parameters",
880
+ type: "object",
881
+ required: false,
882
+ hidden: false,
883
+ isPrimaryKey: false,
884
+ binding: false,
885
+ defaultValue: {},
886
+ description: "Additional parameters for the event"
887
+ }
888
+ ]
889
+ },
890
+ "Intsvc.EventTrigger": {
891
+ extensionType: "Intsvc.EventTrigger",
892
+ label: "Wait for connector event (trigger)",
893
+ bpmnElement: "bpmn:StartEvent",
894
+ placements: {
895
+ startEvent: {
896
+ type: "bpmn:StartEvent",
897
+ eventDefinition: {
898
+ type: "bpmn:MessageEventDefinition"
899
+ }
900
+ }
901
+ },
902
+ extensionTag: "uipath:event",
903
+ contextFields: [],
904
+ inputPattern: "separateInputs",
905
+ outputSource: ".",
906
+ outputType: "custom",
907
+ outputName: "result",
908
+ useRelativeSource: false,
909
+ bindingPattern: "connection",
910
+ requiresDiscovery: true,
911
+ isDynamic: false,
912
+ xmlTemplate: `<bpmn:StartEvent id="{id}" name="{name}">
913
+ <bpmn:extensionElements>
914
+ <uipath:event version="v1">
915
+ <uipath:type value="Intsvc.EventTrigger" version="v1" />
916
+ <uipath:output name="result" type="custom" source="." var="{varId}" />
917
+ </uipath:event>
918
+ </bpmn:extensionElements>
919
+ <bpmn:messageEventDefinition />
920
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
921
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
922
+ </bpmn:StartEvent>`,
923
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
924
+ inputNotes: "isSplitInputs=false; inputs defined in input.fields. Sent as separate <uipath:input> elements.",
925
+ contextFieldNotes: "Context fields are empty in design schema; all field definitions are in inputFields below",
926
+ extensionTagNotes: "In isEvents array, uses uipath:event",
927
+ inputFields: [
928
+ {
929
+ name: "connectionId",
930
+ displayName: "Connection ID",
931
+ type: "string",
932
+ required: true,
933
+ hidden: false,
934
+ isPrimaryKey: false,
935
+ binding: true,
936
+ defaultValue: null,
937
+ description: "Connection ID for the IS connector (bindable)"
938
+ },
939
+ {
940
+ name: "connectorKey",
941
+ displayName: "Connector key",
942
+ type: "string",
943
+ required: true,
944
+ hidden: false,
945
+ isPrimaryKey: false,
946
+ binding: false,
947
+ defaultValue: null,
948
+ description: "Integration Service connector identifier"
949
+ },
950
+ {
951
+ name: "folderId",
952
+ displayName: "Folder ID",
953
+ type: "string",
954
+ required: true,
955
+ hidden: false,
956
+ isPrimaryKey: false,
957
+ binding: false,
958
+ defaultValue: null,
959
+ description: "Folder ID for the connector connection"
960
+ },
961
+ {
962
+ name: "folderPath",
963
+ displayName: "Folder path",
964
+ type: "string",
965
+ required: true,
966
+ hidden: false,
967
+ isPrimaryKey: false,
968
+ binding: false,
969
+ defaultValue: null,
970
+ description: "Folder path for the connector connection"
971
+ },
972
+ {
973
+ name: "folderKey",
974
+ displayName: "Folder key",
975
+ type: "string",
976
+ required: true,
977
+ hidden: false,
978
+ isPrimaryKey: false,
979
+ binding: false,
980
+ defaultValue: null,
981
+ description: "Folder key for the connector connection"
982
+ },
983
+ {
984
+ name: "operation",
985
+ displayName: "Operation",
986
+ type: "string",
987
+ required: true,
988
+ hidden: true,
989
+ isPrimaryKey: true,
990
+ binding: false,
991
+ defaultValue: null,
992
+ description: "Connector event operation to trigger on"
993
+ },
994
+ {
995
+ name: "objectName",
996
+ displayName: "Object name",
997
+ type: "string",
998
+ required: true,
999
+ hidden: true,
1000
+ isPrimaryKey: false,
1001
+ binding: false,
1002
+ defaultValue: null,
1003
+ description: "Object name associated with the event trigger"
1004
+ },
1005
+ {
1006
+ name: "filter",
1007
+ displayName: "Filter",
1008
+ type: "object",
1009
+ required: false,
1010
+ hidden: false,
1011
+ isPrimaryKey: false,
1012
+ binding: false,
1013
+ defaultValue: {},
1014
+ description: "Filter criteria for the event trigger"
1015
+ },
1016
+ {
1017
+ name: "parameters",
1018
+ displayName: "Parameters",
1019
+ type: "object",
1020
+ required: false,
1021
+ hidden: false,
1022
+ isPrimaryKey: false,
1023
+ binding: false,
1024
+ defaultValue: {},
1025
+ description: "Additional parameters for the event trigger"
1026
+ }
1027
+ ]
1028
+ },
1029
+ "Intsvc.AsyncExecution": {
1030
+ extensionType: "Intsvc.AsyncExecution",
1031
+ label: "Start and wait for external agent",
1032
+ bpmnElement: "bpmn:ServiceTask",
1033
+ placements: {
1034
+ activity: {
1035
+ type: "bpmn:ServiceTask"
1036
+ }
1037
+ },
1038
+ extensionTag: "uipath:activity",
1039
+ contextFields: [
1040
+ {
1041
+ name: "activity",
1042
+ displayName: "Activity",
1043
+ type: "string",
1044
+ required: true,
1045
+ hidden: false,
1046
+ isPrimaryKey: true,
1047
+ binding: false,
1048
+ defaultValue: null
1049
+ },
1050
+ {
1051
+ name: "connectorKey",
1052
+ displayName: "Connector key",
1053
+ type: "string",
1054
+ required: false,
1055
+ hidden: true,
1056
+ isPrimaryKey: false,
1057
+ binding: false,
1058
+ defaultValue: null
1059
+ },
1060
+ {
1061
+ name: "connection",
1062
+ displayName: "Connection",
1063
+ type: "string",
1064
+ required: false,
1065
+ hidden: true,
1066
+ isPrimaryKey: false,
1067
+ binding: true,
1068
+ defaultValue: null
1069
+ },
1070
+ {
1071
+ name: "folderKey",
1072
+ displayName: "Folder key",
1073
+ type: "string",
1074
+ required: false,
1075
+ hidden: true,
1076
+ isPrimaryKey: false,
1077
+ binding: false,
1078
+ defaultValue: null
1079
+ },
1080
+ {
1081
+ name: "method",
1082
+ displayName: "Method",
1083
+ type: "string",
1084
+ required: false,
1085
+ hidden: true,
1086
+ isPrimaryKey: false,
1087
+ binding: false,
1088
+ defaultValue: null
1089
+ },
1090
+ {
1091
+ name: "path",
1092
+ displayName: "Path",
1093
+ type: "string",
1094
+ required: false,
1095
+ hidden: true,
1096
+ isPrimaryKey: false,
1097
+ binding: false,
1098
+ defaultValue: null
1099
+ }
1100
+ ],
1101
+ inputPattern: "separateInputs",
1102
+ inputName: "body",
1103
+ inputTarget: "body",
1104
+ outputSource: ".",
1105
+ outputType: "custom",
1106
+ outputName: "response",
1107
+ useRelativeSource: false,
1108
+ bindingPattern: "connection",
1109
+ requiresDiscovery: true,
1110
+ isDynamic: true,
1111
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1112
+ <bpmn:extensionElements>
1113
+ <uipath:activity version="v1">
1114
+ <uipath:type value="Intsvc.AsyncExecution" version="v1" />
1115
+ <uipath:context>
1116
+ <uipath:input name="activity" value="{activity}" />
1117
+ <uipath:input name="connectorKey" value="{connectorKey}" />
1118
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
1119
+ <uipath:input name="folderKey" value="{folderKey}" />
1120
+ <uipath:input name="method" value="{method}" />
1121
+ <uipath:input name="path" value="{path}" />
1122
+ </uipath:context>
1123
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
1124
+ <uipath:output name="response" type="custom" source="." var="{varId}" />
1125
+ </uipath:activity>
1126
+ </bpmn:extensionElements>
1127
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1128
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1129
+ </bpmn:ServiceTask>`,
1130
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
1131
+ inputNotes: "isSplitInputs=false in design schema; inputs are sent as separate <uipath:input> elements",
1132
+ extensionTagNotes: "In isExecution array, uses uipath:activity"
1133
+ },
1134
+ "Intsvc.SyncAgentExecution": {
1135
+ extensionType: "Intsvc.SyncAgentExecution",
1136
+ label: "Start and wait for external agent",
1137
+ bpmnElement: "bpmn:ServiceTask",
1138
+ placements: {
1139
+ activity: {
1140
+ type: "bpmn:ServiceTask"
1141
+ }
1142
+ },
1143
+ extensionTag: "uipath:activity",
1144
+ contextFields: [
1145
+ {
1146
+ name: "activity",
1147
+ displayName: "Activity",
1148
+ type: "string",
1149
+ required: true,
1150
+ hidden: false,
1151
+ isPrimaryKey: true,
1152
+ binding: false,
1153
+ defaultValue: null
1154
+ },
1155
+ {
1156
+ name: "connectorKey",
1157
+ displayName: "Connector key",
1158
+ type: "string",
1159
+ required: false,
1160
+ hidden: true,
1161
+ isPrimaryKey: false,
1162
+ binding: false,
1163
+ defaultValue: null
1164
+ },
1165
+ {
1166
+ name: "connection",
1167
+ displayName: "Connection",
1168
+ type: "string",
1169
+ required: false,
1170
+ hidden: true,
1171
+ isPrimaryKey: false,
1172
+ binding: true,
1173
+ defaultValue: null
1174
+ },
1175
+ {
1176
+ name: "folderKey",
1177
+ displayName: "Folder key",
1178
+ type: "string",
1179
+ required: false,
1180
+ hidden: true,
1181
+ isPrimaryKey: false,
1182
+ binding: false,
1183
+ defaultValue: null
1184
+ },
1185
+ {
1186
+ name: "method",
1187
+ displayName: "Method",
1188
+ type: "string",
1189
+ required: false,
1190
+ hidden: true,
1191
+ isPrimaryKey: false,
1192
+ binding: false,
1193
+ defaultValue: null
1194
+ },
1195
+ {
1196
+ name: "path",
1197
+ displayName: "Path",
1198
+ type: "string",
1199
+ required: false,
1200
+ hidden: true,
1201
+ isPrimaryKey: false,
1202
+ binding: false,
1203
+ defaultValue: null
1204
+ }
1205
+ ],
1206
+ inputPattern: "separateInputs",
1207
+ inputName: "body",
1208
+ inputTarget: "body",
1209
+ outputSource: ".",
1210
+ outputType: "custom",
1211
+ outputName: "response",
1212
+ useRelativeSource: false,
1213
+ bindingPattern: "connection",
1214
+ requiresDiscovery: true,
1215
+ isDynamic: true,
1216
+ designSchemaSharedWith: "Intsvc.AsyncExecution",
1217
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1218
+ <bpmn:extensionElements>
1219
+ <uipath:activity version="v1">
1220
+ <uipath:type value="Intsvc.SyncAgentExecution" version="v1" />
1221
+ <uipath:context>
1222
+ <uipath:input name="activity" value="{activity}" />
1223
+ <uipath:input name="connectorKey" value="{connectorKey}" />
1224
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
1225
+ <uipath:input name="folderKey" value="{folderKey}" />
1226
+ <uipath:input name="method" value="{method}" />
1227
+ <uipath:input name="path" value="{path}" />
1228
+ </uipath:context>
1229
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
1230
+ <uipath:output name="response" type="custom" source="." var="{varId}" />
1231
+ </uipath:activity>
1232
+ </bpmn:extensionElements>
1233
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1234
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1235
+ </bpmn:ServiceTask>`,
1236
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
1237
+ extensionTagNotes: "In isExecution array, uses uipath:activity"
1238
+ },
1239
+ "Intsvc.AsyncAgentExecution": {
1240
+ extensionType: "Intsvc.AsyncAgentExecution",
1241
+ label: "Start and wait for external agent",
1242
+ bpmnElement: "bpmn:ServiceTask",
1243
+ placements: {
1244
+ activity: {
1245
+ type: "bpmn:ServiceTask"
1246
+ }
1247
+ },
1248
+ extensionTag: "uipath:activity",
1249
+ contextFields: [
1250
+ {
1251
+ name: "activity",
1252
+ displayName: "Activity",
1253
+ type: "string",
1254
+ required: true,
1255
+ hidden: false,
1256
+ isPrimaryKey: true,
1257
+ binding: false,
1258
+ defaultValue: null
1259
+ },
1260
+ {
1261
+ name: "connectorKey",
1262
+ displayName: "Connector key",
1263
+ type: "string",
1264
+ required: false,
1265
+ hidden: true,
1266
+ isPrimaryKey: false,
1267
+ binding: false,
1268
+ defaultValue: null
1269
+ },
1270
+ {
1271
+ name: "connection",
1272
+ displayName: "Connection",
1273
+ type: "string",
1274
+ required: false,
1275
+ hidden: true,
1276
+ isPrimaryKey: false,
1277
+ binding: true,
1278
+ defaultValue: null
1279
+ },
1280
+ {
1281
+ name: "folderKey",
1282
+ displayName: "Folder key",
1283
+ type: "string",
1284
+ required: false,
1285
+ hidden: true,
1286
+ isPrimaryKey: false,
1287
+ binding: false,
1288
+ defaultValue: null
1289
+ },
1290
+ {
1291
+ name: "method",
1292
+ displayName: "Method",
1293
+ type: "string",
1294
+ required: false,
1295
+ hidden: true,
1296
+ isPrimaryKey: false,
1297
+ binding: false,
1298
+ defaultValue: null
1299
+ },
1300
+ {
1301
+ name: "path",
1302
+ displayName: "Path",
1303
+ type: "string",
1304
+ required: false,
1305
+ hidden: true,
1306
+ isPrimaryKey: false,
1307
+ binding: false,
1308
+ defaultValue: null
1309
+ }
1310
+ ],
1311
+ inputPattern: "separateInputs",
1312
+ inputName: "body",
1313
+ inputTarget: "body",
1314
+ outputSource: ".",
1315
+ outputType: "custom",
1316
+ outputName: "response",
1317
+ useRelativeSource: false,
1318
+ bindingPattern: "connection",
1319
+ requiresDiscovery: true,
1320
+ isDynamic: true,
1321
+ designSchemaSharedWith: "Intsvc.AsyncExecution",
1322
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1323
+ <bpmn:extensionElements>
1324
+ <uipath:activity version="v1">
1325
+ <uipath:type value="Intsvc.AsyncAgentExecution" version="v1" />
1326
+ <uipath:context>
1327
+ <uipath:input name="activity" value="{activity}" />
1328
+ <uipath:input name="connectorKey" value="{connectorKey}" />
1329
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
1330
+ <uipath:input name="folderKey" value="{folderKey}" />
1331
+ <uipath:input name="method" value="{method}" />
1332
+ <uipath:input name="path" value="{path}" />
1333
+ </uipath:context>
1334
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
1335
+ <uipath:output name="response" type="custom" source="." var="{varId}" />
1336
+ </uipath:activity>
1337
+ </bpmn:extensionElements>
1338
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1339
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1340
+ </bpmn:ServiceTask>`,
1341
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
1342
+ extensionTagNotes: "In isExecution array, uses uipath:activity"
1343
+ },
1344
+ "Intsvc.SyncWorkflowExecution": {
1345
+ extensionType: "Intsvc.SyncWorkflowExecution",
1346
+ label: "Start and wait for external workflow",
1347
+ bpmnElement: "bpmn:ServiceTask",
1348
+ placements: {
1349
+ activity: {
1350
+ type: "bpmn:ServiceTask"
1351
+ }
1352
+ },
1353
+ extensionTag: "uipath:activity",
1354
+ contextFields: [
1355
+ {
1356
+ name: "activity",
1357
+ displayName: "Activity",
1358
+ type: "string",
1359
+ required: true,
1360
+ hidden: false,
1361
+ isPrimaryKey: true,
1362
+ binding: false,
1363
+ defaultValue: null
1364
+ },
1365
+ {
1366
+ name: "connectorKey",
1367
+ displayName: "Connector key",
1368
+ type: "string",
1369
+ required: false,
1370
+ hidden: true,
1371
+ isPrimaryKey: false,
1372
+ binding: false,
1373
+ defaultValue: null
1374
+ },
1375
+ {
1376
+ name: "connection",
1377
+ displayName: "Connection",
1378
+ type: "string",
1379
+ required: false,
1380
+ hidden: true,
1381
+ isPrimaryKey: false,
1382
+ binding: true,
1383
+ defaultValue: null
1384
+ },
1385
+ {
1386
+ name: "folderKey",
1387
+ displayName: "Folder key",
1388
+ type: "string",
1389
+ required: false,
1390
+ hidden: true,
1391
+ isPrimaryKey: false,
1392
+ binding: false,
1393
+ defaultValue: null
1394
+ },
1395
+ {
1396
+ name: "method",
1397
+ displayName: "Method",
1398
+ type: "string",
1399
+ required: false,
1400
+ hidden: true,
1401
+ isPrimaryKey: false,
1402
+ binding: false,
1403
+ defaultValue: null
1404
+ },
1405
+ {
1406
+ name: "path",
1407
+ displayName: "Path",
1408
+ type: "string",
1409
+ required: false,
1410
+ hidden: true,
1411
+ isPrimaryKey: false,
1412
+ binding: false,
1413
+ defaultValue: null
1414
+ }
1415
+ ],
1416
+ inputPattern: "separateInputs",
1417
+ inputName: "body",
1418
+ inputTarget: "body",
1419
+ outputSource: ".",
1420
+ outputType: "custom",
1421
+ outputName: "response",
1422
+ useRelativeSource: false,
1423
+ bindingPattern: "connection",
1424
+ requiresDiscovery: true,
1425
+ isDynamic: true,
1426
+ designSchemaSharedWith: "Intsvc.AsyncExecution",
1427
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1428
+ <bpmn:extensionElements>
1429
+ <uipath:activity version="v1">
1430
+ <uipath:type value="Intsvc.SyncWorkflowExecution" version="v1" />
1431
+ <uipath:context>
1432
+ <uipath:input name="activity" value="{activity}" />
1433
+ <uipath:input name="connectorKey" value="{connectorKey}" />
1434
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
1435
+ <uipath:input name="folderKey" value="{folderKey}" />
1436
+ <uipath:input name="method" value="{method}" />
1437
+ <uipath:input name="path" value="{path}" />
1438
+ </uipath:context>
1439
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
1440
+ <uipath:output name="response" type="custom" source="." var="{varId}" />
1441
+ </uipath:activity>
1442
+ </bpmn:extensionElements>
1443
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1444
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1445
+ </bpmn:ServiceTask>`,
1446
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
1447
+ extensionTagNotes: "In isExecution array, uses uipath:activity"
1448
+ },
1449
+ "Intsvc.AsyncWorkflowExecution": {
1450
+ extensionType: "Intsvc.AsyncWorkflowExecution",
1451
+ label: "Start and wait for external workflow",
1452
+ bpmnElement: "bpmn:ServiceTask",
1453
+ placements: {
1454
+ activity: {
1455
+ type: "bpmn:ServiceTask"
1456
+ }
1457
+ },
1458
+ extensionTag: "uipath:activity",
1459
+ contextFields: [
1460
+ {
1461
+ name: "activity",
1462
+ displayName: "Activity",
1463
+ type: "string",
1464
+ required: true,
1465
+ hidden: false,
1466
+ isPrimaryKey: true,
1467
+ binding: false,
1468
+ defaultValue: null
1469
+ },
1470
+ {
1471
+ name: "connectorKey",
1472
+ displayName: "Connector key",
1473
+ type: "string",
1474
+ required: false,
1475
+ hidden: true,
1476
+ isPrimaryKey: false,
1477
+ binding: false,
1478
+ defaultValue: null
1479
+ },
1480
+ {
1481
+ name: "connection",
1482
+ displayName: "Connection",
1483
+ type: "string",
1484
+ required: false,
1485
+ hidden: true,
1486
+ isPrimaryKey: false,
1487
+ binding: true,
1488
+ defaultValue: null
1489
+ },
1490
+ {
1491
+ name: "folderKey",
1492
+ displayName: "Folder key",
1493
+ type: "string",
1494
+ required: false,
1495
+ hidden: true,
1496
+ isPrimaryKey: false,
1497
+ binding: false,
1498
+ defaultValue: null
1499
+ },
1500
+ {
1501
+ name: "method",
1502
+ displayName: "Method",
1503
+ type: "string",
1504
+ required: false,
1505
+ hidden: true,
1506
+ isPrimaryKey: false,
1507
+ binding: false,
1508
+ defaultValue: null
1509
+ },
1510
+ {
1511
+ name: "path",
1512
+ displayName: "Path",
1513
+ type: "string",
1514
+ required: false,
1515
+ hidden: true,
1516
+ isPrimaryKey: false,
1517
+ binding: false,
1518
+ defaultValue: null
1519
+ }
1520
+ ],
1521
+ inputPattern: "separateInputs",
1522
+ inputName: "body",
1523
+ inputTarget: "body",
1524
+ outputSource: ".",
1525
+ outputType: "custom",
1526
+ outputName: "response",
1527
+ useRelativeSource: false,
1528
+ bindingPattern: "connection",
1529
+ requiresDiscovery: true,
1530
+ isDynamic: true,
1531
+ designSchemaSharedWith: "Intsvc.AsyncExecution",
1532
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1533
+ <bpmn:extensionElements>
1534
+ <uipath:activity version="v1">
1535
+ <uipath:type value="Intsvc.AsyncWorkflowExecution" version="v1" />
1536
+ <uipath:context>
1537
+ <uipath:input name="activity" value="{activity}" />
1538
+ <uipath:input name="connectorKey" value="{connectorKey}" />
1539
+ <uipath:input name="connection" value="=bindings.{bindingId}" />
1540
+ <uipath:input name="folderKey" value="{folderKey}" />
1541
+ <uipath:input name="method" value="{method}" />
1542
+ <uipath:input name="path" value="{path}" />
1543
+ </uipath:context>
1544
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
1545
+ <uipath:output name="response" type="custom" source="." var="{varId}" />
1546
+ </uipath:activity>
1547
+ </bpmn:extensionElements>
1548
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1549
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1550
+ </bpmn:ServiceTask>`,
1551
+ discoveryNotes: "Uses getConnectorConnections(connectorKey) to list available connections",
1552
+ extensionTagNotes: "In isExecution array, uses uipath:activity"
1553
+ },
1554
+ "Orchestrator.ExecuteApiWorkflowAsync": {
1555
+ extensionType: "Orchestrator.ExecuteApiWorkflowAsync",
1556
+ label: "Start and wait for API workflow [Preview]",
1557
+ bpmnElement: "bpmn:ServiceTask",
1558
+ placements: {
1559
+ activity: {
1560
+ type: "bpmn:ServiceTask"
1561
+ }
1562
+ },
1563
+ extensionTag: "uipath:activity",
1564
+ contextFields: [
1565
+ {
1566
+ name: "releaseKey",
1567
+ displayName: "Process",
1568
+ type: "string",
1569
+ required: false,
1570
+ hidden: true,
1571
+ isPrimaryKey: false,
1572
+ binding: false,
1573
+ defaultValue: null,
1574
+ bindingInfo: {
1575
+ resource: "process",
1576
+ resourceKeyPattern: "${metadata.key}",
1577
+ propertyAttribute: "Key"
1578
+ }
1579
+ },
1580
+ {
1581
+ name: "folderId",
1582
+ type: "string",
1583
+ required: false,
1584
+ hidden: true,
1585
+ isPrimaryKey: false,
1586
+ binding: false,
1587
+ defaultValue: null
1588
+ },
1589
+ {
1590
+ name: "folderPath",
1591
+ type: "string",
1592
+ required: false,
1593
+ hidden: true,
1594
+ isPrimaryKey: false,
1595
+ binding: false,
1596
+ defaultValue: null
1597
+ },
1598
+ {
1599
+ name: "name",
1600
+ type: "string",
1601
+ required: false,
1602
+ hidden: true,
1603
+ isPrimaryKey: false,
1604
+ binding: false,
1605
+ defaultValue: null
1606
+ }
1607
+ ],
1608
+ inputPattern: "mergedBody",
1609
+ inputName: "JobArguments",
1610
+ inputTarget: "bodyField",
1611
+ outputSource: null,
1612
+ outputType: "Orchestrator.RunJob",
1613
+ outputName: "Process response",
1614
+ useRelativeSource: true,
1615
+ bindingPattern: "process",
1616
+ bindingInfo: {
1617
+ resource: "process",
1618
+ resourceKeyPattern: "${metadata.key}",
1619
+ propertyAttribute: "Key",
1620
+ contextField: "releaseKey"
1621
+ },
1622
+ requiresDiscovery: true,
1623
+ isDynamic: true,
1624
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1625
+ <bpmn:extensionElements>
1626
+ <uipath:activity version="v1">
1627
+ <uipath:type value="Orchestrator.ExecuteApiWorkflowAsync" version="v1" />
1628
+ <uipath:context>
1629
+ <uipath:input name="releaseKey" value="{releaseKey}" />
1630
+ <uipath:input name="folderId" value="{folderId}" />
1631
+ <uipath:input name="folderPath" value="{folderPath}" />
1632
+ <uipath:input name="name" value="{name}" />
1633
+ </uipath:context>
1634
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
1635
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
1636
+ </uipath:activity>
1637
+ </bpmn:extensionElements>
1638
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1639
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1640
+ </bpmn:ServiceTask>`,
1641
+ discoveryNotes: "Uses getResourceCatalogProcesses('API', search) to list available API workflows"
1642
+ },
1643
+ "Orchestrator.CreateQueueItem": {
1644
+ extensionType: "Orchestrator.CreateQueueItem",
1645
+ label: "Create queue item",
1646
+ bpmnElement: "bpmn:SendTask",
1647
+ placements: {
1648
+ activity: {
1649
+ type: "bpmn:SendTask"
1650
+ }
1651
+ },
1652
+ extensionTag: "uipath:activity",
1653
+ contextFields: [
1654
+ {
1655
+ name: "queueName",
1656
+ displayName: "Queue name",
1657
+ type: "string",
1658
+ required: false,
1659
+ hidden: true,
1660
+ isPrimaryKey: false,
1661
+ binding: false,
1662
+ defaultValue: null,
1663
+ bindingInfo: {
1664
+ resource: "queue",
1665
+ resourceKeyPattern: "${metadata.key}",
1666
+ propertyAttribute: "Key"
1667
+ }
1668
+ },
1669
+ {
1670
+ name: "folderId",
1671
+ type: "string",
1672
+ required: false,
1673
+ hidden: true,
1674
+ isPrimaryKey: false,
1675
+ binding: false,
1676
+ defaultValue: null
1677
+ },
1678
+ {
1679
+ name: "folderPath",
1680
+ type: "string",
1681
+ required: false,
1682
+ hidden: true,
1683
+ isPrimaryKey: false,
1684
+ binding: false,
1685
+ defaultValue: null
1686
+ }
1687
+ ],
1688
+ inputPattern: "mergedBody",
1689
+ inputName: "ItemData",
1690
+ inputTarget: "body",
1691
+ outputSource: null,
1692
+ outputType: "Orchestrator.CreateQueueItem",
1693
+ outputName: "response",
1694
+ useRelativeSource: true,
1695
+ bindingPattern: "queue",
1696
+ bindingInfo: {
1697
+ resource: "queue",
1698
+ resourceKeyPattern: "${metadata.key}",
1699
+ propertyAttribute: "Key",
1700
+ contextField: "queueName"
1701
+ },
1702
+ requiresDiscovery: true,
1703
+ isDynamic: true,
1704
+ xmlTemplate: `<bpmn:SendTask id="{id}" name="{name}">
1705
+ <bpmn:extensionElements>
1706
+ <uipath:activity version="v1">
1707
+ <uipath:type value="Orchestrator.CreateQueueItem" version="v1" />
1708
+ <uipath:context>
1709
+ <uipath:input name="queueName" value="{queueName}" />
1710
+ <uipath:input name="folderId" value="{folderId}" />
1711
+ <uipath:input name="folderPath" value="{folderPath}" />
1712
+ </uipath:context>
1713
+ <uipath:input name="ItemData" type="json" target="body"><![CDATA[{}]]></uipath:input>
1714
+ <uipath:output name="response" type="Orchestrator.CreateQueueItem" var="{varId}" />
1715
+ </uipath:activity>
1716
+ </bpmn:extensionElements>
1717
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1718
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1719
+ </bpmn:SendTask>`,
1720
+ discoveryNotes: "Uses getQueueDefinitions(serviceType, search) to list available queues"
1721
+ },
1722
+ "Orchestrator.CreateAndWaitForQueueItem": {
1723
+ extensionType: "Orchestrator.CreateAndWaitForQueueItem",
1724
+ label: "Create and wait for queue item",
1725
+ bpmnElement: "bpmn:ServiceTask",
1726
+ placements: {
1727
+ activity: {
1728
+ type: "bpmn:ServiceTask"
1729
+ }
1730
+ },
1731
+ extensionTag: "uipath:activity",
1732
+ contextFields: [
1733
+ {
1734
+ name: "queueName",
1735
+ displayName: "Queue name",
1736
+ type: "string",
1737
+ required: false,
1738
+ hidden: true,
1739
+ isPrimaryKey: false,
1740
+ binding: false,
1741
+ defaultValue: null,
1742
+ bindingInfo: {
1743
+ resource: "queue",
1744
+ resourceKeyPattern: "${metadata.key}",
1745
+ propertyAttribute: "Key"
1746
+ }
1747
+ },
1748
+ {
1749
+ name: "folderId",
1750
+ type: "string",
1751
+ required: false,
1752
+ hidden: true,
1753
+ isPrimaryKey: false,
1754
+ binding: false,
1755
+ defaultValue: null
1756
+ },
1757
+ {
1758
+ name: "folderPath",
1759
+ type: "string",
1760
+ required: false,
1761
+ hidden: true,
1762
+ isPrimaryKey: false,
1763
+ binding: false,
1764
+ defaultValue: null
1765
+ }
1766
+ ],
1767
+ inputPattern: "mergedBody",
1768
+ inputName: "ItemData",
1769
+ inputTarget: "body",
1770
+ outputSource: null,
1771
+ outputType: "Orchestrator.CreateQueueItem",
1772
+ outputName: "response",
1773
+ useRelativeSource: true,
1774
+ bindingPattern: "queue",
1775
+ bindingInfo: {
1776
+ resource: "queue",
1777
+ resourceKeyPattern: "${metadata.key}",
1778
+ propertyAttribute: "Key",
1779
+ contextField: "queueName"
1780
+ },
1781
+ requiresDiscovery: true,
1782
+ isDynamic: true,
1783
+ designSchemaSharedWith: "Orchestrator.CreateQueueItem",
1784
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
1785
+ <bpmn:extensionElements>
1786
+ <uipath:activity version="v1">
1787
+ <uipath:type value="Orchestrator.CreateAndWaitForQueueItem" version="v1" />
1788
+ <uipath:context>
1789
+ <uipath:input name="queueName" value="{queueName}" />
1790
+ <uipath:input name="folderId" value="{folderId}" />
1791
+ <uipath:input name="folderPath" value="{folderPath}" />
1792
+ </uipath:context>
1793
+ <uipath:input name="ItemData" type="json" target="body"><![CDATA[{}]]></uipath:input>
1794
+ <uipath:output name="response" type="Orchestrator.CreateQueueItem" var="{varId}" />
1795
+ </uipath:activity>
1796
+ </bpmn:extensionElements>
1797
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1798
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1799
+ </bpmn:ServiceTask>`,
1800
+ discoveryNotes: "Uses getQueueDefinitions(serviceType, search) to list available queues"
1801
+ },
1802
+ "Orchestrator.StartAgenticProcess": {
1803
+ extensionType: "Orchestrator.StartAgenticProcess",
1804
+ label: "Start and wait for agentic process",
1805
+ bpmnElement: "bpmn:CallActivity",
1806
+ placements: {
1807
+ activity: {
1808
+ type: "bpmn:CallActivity"
1809
+ }
1810
+ },
1811
+ extensionTag: "uipath:activity",
1812
+ contextFields: [
1813
+ {
1814
+ name: "releaseKey",
1815
+ displayName: "Process",
1816
+ type: "string",
1817
+ required: false,
1818
+ hidden: true,
1819
+ isPrimaryKey: false,
1820
+ binding: false,
1821
+ defaultValue: null,
1822
+ bindingInfo: {
1823
+ resource: "process",
1824
+ resourceKeyPattern: "${metadata.key}",
1825
+ propertyAttribute: "Key"
1826
+ }
1827
+ },
1828
+ {
1829
+ name: "folderId",
1830
+ type: "string",
1831
+ required: false,
1832
+ hidden: true,
1833
+ isPrimaryKey: false,
1834
+ binding: false,
1835
+ defaultValue: null
1836
+ },
1837
+ {
1838
+ name: "folderPath",
1839
+ type: "string",
1840
+ required: false,
1841
+ hidden: true,
1842
+ isPrimaryKey: false,
1843
+ binding: false,
1844
+ defaultValue: null
1845
+ },
1846
+ {
1847
+ name: "name",
1848
+ type: "string",
1849
+ required: false,
1850
+ hidden: true,
1851
+ isPrimaryKey: false,
1852
+ binding: false,
1853
+ defaultValue: null
1854
+ }
1855
+ ],
1856
+ inputPattern: "mergedBody",
1857
+ inputName: "JobArguments",
1858
+ inputTarget: "bodyField",
1859
+ outputSource: null,
1860
+ outputType: "Orchestrator.RunJob",
1861
+ outputName: "Process response",
1862
+ useRelativeSource: true,
1863
+ bindingPattern: "process",
1864
+ bindingInfo: {
1865
+ resource: "process",
1866
+ resourceKeyPattern: "${metadata.key}",
1867
+ propertyAttribute: "Key",
1868
+ contextField: "releaseKey"
1869
+ },
1870
+ requiresDiscovery: true,
1871
+ isDynamic: true,
1872
+ xmlTemplate: `<bpmn:CallActivity id="{id}" name="{name}">
1873
+ <bpmn:extensionElements>
1874
+ <uipath:activity version="v1">
1875
+ <uipath:type value="Orchestrator.StartAgenticProcess" version="v1" />
1876
+ <uipath:context>
1877
+ <uipath:input name="releaseKey" value="{releaseKey}" />
1878
+ <uipath:input name="folderId" value="{folderId}" />
1879
+ <uipath:input name="folderPath" value="{folderPath}" />
1880
+ <uipath:input name="name" value="{name}" />
1881
+ </uipath:context>
1882
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
1883
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
1884
+ </uipath:activity>
1885
+ </bpmn:extensionElements>
1886
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1887
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1888
+ </bpmn:CallActivity>`,
1889
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('ProcessOrchestration', search, 0, 100, true) to list available agentic processes"
1890
+ },
1891
+ "Orchestrator.StartAgenticProcessAsync": {
1892
+ extensionType: "Orchestrator.StartAgenticProcessAsync",
1893
+ label: "Start agentic process",
1894
+ bpmnElement: "bpmn:CallActivity",
1895
+ placements: {
1896
+ activity: {
1897
+ type: "bpmn:CallActivity"
1898
+ }
1899
+ },
1900
+ extensionTag: "uipath:activity",
1901
+ contextFields: [
1902
+ {
1903
+ name: "releaseKey",
1904
+ displayName: "Process",
1905
+ type: "string",
1906
+ required: false,
1907
+ hidden: true,
1908
+ isPrimaryKey: false,
1909
+ binding: false,
1910
+ defaultValue: null,
1911
+ bindingInfo: {
1912
+ resource: "process",
1913
+ resourceKeyPattern: "${metadata.key}",
1914
+ propertyAttribute: "Key"
1915
+ }
1916
+ },
1917
+ {
1918
+ name: "folderId",
1919
+ type: "string",
1920
+ required: false,
1921
+ hidden: true,
1922
+ isPrimaryKey: false,
1923
+ binding: false,
1924
+ defaultValue: null
1925
+ },
1926
+ {
1927
+ name: "folderPath",
1928
+ type: "string",
1929
+ required: false,
1930
+ hidden: true,
1931
+ isPrimaryKey: false,
1932
+ binding: false,
1933
+ defaultValue: null
1934
+ },
1935
+ {
1936
+ name: "name",
1937
+ type: "string",
1938
+ required: false,
1939
+ hidden: true,
1940
+ isPrimaryKey: false,
1941
+ binding: false,
1942
+ defaultValue: null
1943
+ }
1944
+ ],
1945
+ inputPattern: "mergedBody",
1946
+ inputName: "JobArguments",
1947
+ inputTarget: "bodyField",
1948
+ outputSource: null,
1949
+ outputType: "Orchestrator.RunJob",
1950
+ outputName: "Process response",
1951
+ useRelativeSource: true,
1952
+ bindingPattern: "process",
1953
+ bindingInfo: {
1954
+ resource: "process",
1955
+ resourceKeyPattern: "${metadata.key}",
1956
+ propertyAttribute: "Key",
1957
+ contextField: "releaseKey"
1958
+ },
1959
+ requiresDiscovery: true,
1960
+ isDynamic: true,
1961
+ xmlTemplate: `<bpmn:CallActivity id="{id}" name="{name}">
1962
+ <bpmn:extensionElements>
1963
+ <uipath:activity version="v1">
1964
+ <uipath:type value="Orchestrator.StartAgenticProcessAsync" version="v1" />
1965
+ <uipath:context>
1966
+ <uipath:input name="releaseKey" value="{releaseKey}" />
1967
+ <uipath:input name="folderId" value="{folderId}" />
1968
+ <uipath:input name="folderPath" value="{folderPath}" />
1969
+ <uipath:input name="name" value="{name}" />
1970
+ </uipath:context>
1971
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
1972
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
1973
+ </uipath:activity>
1974
+ </bpmn:extensionElements>
1975
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
1976
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
1977
+ </bpmn:CallActivity>`,
1978
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('ProcessOrchestration', search, 0, 100, true) to list available agentic processes"
1979
+ },
1980
+ "Orchestrator.StartCaseMgmtProcess": {
1981
+ extensionType: "Orchestrator.StartCaseMgmtProcess",
1982
+ label: "Start and wait for case management",
1983
+ bpmnElement: "bpmn:CallActivity",
1984
+ placements: {
1985
+ activity: {
1986
+ type: "bpmn:CallActivity"
1987
+ }
1988
+ },
1989
+ extensionTag: "uipath:activity",
1990
+ contextFields: [
1991
+ {
1992
+ name: "releaseKey",
1993
+ displayName: "Process",
1994
+ type: "string",
1995
+ required: false,
1996
+ hidden: true,
1997
+ isPrimaryKey: false,
1998
+ binding: false,
1999
+ defaultValue: null,
2000
+ bindingInfo: {
2001
+ resource: "process",
2002
+ resourceKeyPattern: "${metadata.key}",
2003
+ propertyAttribute: "Key"
2004
+ }
2005
+ },
2006
+ {
2007
+ name: "folderId",
2008
+ type: "string",
2009
+ required: false,
2010
+ hidden: true,
2011
+ isPrimaryKey: false,
2012
+ binding: false,
2013
+ defaultValue: null
2014
+ },
2015
+ {
2016
+ name: "folderPath",
2017
+ type: "string",
2018
+ required: false,
2019
+ hidden: true,
2020
+ isPrimaryKey: false,
2021
+ binding: false,
2022
+ defaultValue: null
2023
+ },
2024
+ {
2025
+ name: "name",
2026
+ type: "string",
2027
+ required: false,
2028
+ hidden: true,
2029
+ isPrimaryKey: false,
2030
+ binding: false,
2031
+ defaultValue: null
2032
+ }
2033
+ ],
2034
+ inputPattern: "mergedBody",
2035
+ inputName: "JobArguments",
2036
+ inputTarget: "bodyField",
2037
+ outputSource: null,
2038
+ outputType: "Orchestrator.RunJob",
2039
+ outputName: "Process response",
2040
+ useRelativeSource: true,
2041
+ bindingPattern: "process",
2042
+ bindingInfo: {
2043
+ resource: "process",
2044
+ resourceKeyPattern: "${metadata.key}",
2045
+ propertyAttribute: "Key",
2046
+ contextField: "releaseKey"
2047
+ },
2048
+ requiresDiscovery: true,
2049
+ isDynamic: true,
2050
+ xmlTemplate: `<bpmn:CallActivity id="{id}" name="{name}">
2051
+ <bpmn:extensionElements>
2052
+ <uipath:activity version="v1">
2053
+ <uipath:type value="Orchestrator.StartCaseMgmtProcess" version="v1" />
2054
+ <uipath:context>
2055
+ <uipath:input name="releaseKey" value="{releaseKey}" />
2056
+ <uipath:input name="folderId" value="{folderId}" />
2057
+ <uipath:input name="folderPath" value="{folderPath}" />
2058
+ <uipath:input name="name" value="{name}" />
2059
+ </uipath:context>
2060
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
2061
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
2062
+ </uipath:activity>
2063
+ </bpmn:extensionElements>
2064
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2065
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2066
+ </bpmn:CallActivity>`,
2067
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('caseManagement', search, 0, 100, true) to list available case management processes"
2068
+ },
2069
+ "Orchestrator.StartCaseMgmtProcessAsync": {
2070
+ extensionType: "Orchestrator.StartCaseMgmtProcessAsync",
2071
+ label: "Start case management",
2072
+ bpmnElement: "bpmn:CallActivity",
2073
+ placements: {
2074
+ activity: {
2075
+ type: "bpmn:CallActivity"
2076
+ }
2077
+ },
2078
+ extensionTag: "uipath:activity",
2079
+ contextFields: [
2080
+ {
2081
+ name: "releaseKey",
2082
+ displayName: "Process",
2083
+ type: "string",
2084
+ required: false,
2085
+ hidden: true,
2086
+ isPrimaryKey: false,
2087
+ binding: false,
2088
+ defaultValue: null,
2089
+ bindingInfo: {
2090
+ resource: "process",
2091
+ resourceKeyPattern: "${metadata.key}",
2092
+ propertyAttribute: "Key"
2093
+ }
2094
+ },
2095
+ {
2096
+ name: "folderId",
2097
+ type: "string",
2098
+ required: false,
2099
+ hidden: true,
2100
+ isPrimaryKey: false,
2101
+ binding: false,
2102
+ defaultValue: null
2103
+ },
2104
+ {
2105
+ name: "folderPath",
2106
+ type: "string",
2107
+ required: false,
2108
+ hidden: true,
2109
+ isPrimaryKey: false,
2110
+ binding: false,
2111
+ defaultValue: null
2112
+ },
2113
+ {
2114
+ name: "name",
2115
+ type: "string",
2116
+ required: false,
2117
+ hidden: true,
2118
+ isPrimaryKey: false,
2119
+ binding: false,
2120
+ defaultValue: null
2121
+ }
2122
+ ],
2123
+ inputPattern: "mergedBody",
2124
+ inputName: "JobArguments",
2125
+ inputTarget: "bodyField",
2126
+ outputSource: null,
2127
+ outputType: "Orchestrator.RunJob",
2128
+ outputName: "Process response",
2129
+ useRelativeSource: true,
2130
+ bindingPattern: "process",
2131
+ bindingInfo: {
2132
+ resource: "process",
2133
+ resourceKeyPattern: "${metadata.key}",
2134
+ propertyAttribute: "Key",
2135
+ contextField: "releaseKey"
2136
+ },
2137
+ requiresDiscovery: true,
2138
+ isDynamic: true,
2139
+ xmlTemplate: `<bpmn:CallActivity id="{id}" name="{name}">
2140
+ <bpmn:extensionElements>
2141
+ <uipath:activity version="v1">
2142
+ <uipath:type value="Orchestrator.StartCaseMgmtProcessAsync" version="v1" />
2143
+ <uipath:context>
2144
+ <uipath:input name="releaseKey" value="{releaseKey}" />
2145
+ <uipath:input name="folderId" value="{folderId}" />
2146
+ <uipath:input name="folderPath" value="{folderPath}" />
2147
+ <uipath:input name="name" value="{name}" />
2148
+ </uipath:context>
2149
+ <uipath:input name="JobArguments" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
2150
+ <uipath:output name="Process response" type="Orchestrator.RunJob" var="{varId}" />
2151
+ </uipath:activity>
2152
+ </bpmn:extensionElements>
2153
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2154
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2155
+ </bpmn:CallActivity>`,
2156
+ discoveryNotes: "Uses getSupportedOrchestratorTasks('caseManagement', search, 0, 100, true) to list available case management processes"
2157
+ },
2158
+ "A2A.AgentExecution": {
2159
+ extensionType: "A2A.AgentExecution",
2160
+ label: "Start and wait for A2A agent",
2161
+ bpmnElement: "bpmn:ServiceTask",
2162
+ placements: {
2163
+ activity: {
2164
+ type: "bpmn:ServiceTask"
2165
+ }
2166
+ },
2167
+ extensionTag: "uipath:activity",
2168
+ contextFields: [],
2169
+ inputPattern: "mergedBody",
2170
+ inputName: "body",
2171
+ inputTarget: "body",
2172
+ outputSource: null,
2173
+ outputType: "A2A.AgentExecution",
2174
+ outputName: "a2aResponse",
2175
+ useRelativeSource: true,
2176
+ bindingPattern: "none",
2177
+ requiresDiscovery: false,
2178
+ isDynamic: true,
2179
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
2180
+ <bpmn:extensionElements>
2181
+ <uipath:activity version="v1">
2182
+ <uipath:type value="A2A.AgentExecution" version="v1" />
2183
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
2184
+ <uipath:output name="a2aResponse" type="A2A.AgentExecution" var="{varId}" />
2185
+ </uipath:activity>
2186
+ </bpmn:extensionElements>
2187
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2188
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2189
+ </bpmn:ServiceTask>`,
2190
+ inputFieldNotes: "Auto-initialized by A2AFPSFormControl on load. Version is set to v2. Outputs include a2aResponse (jsonSchema with A2A response schema, source=result) and Error (any, source=Error).",
2191
+ outputNotes: "Output schema includes: isSuccess (boolean), response (string), sessionId (string), status (string), taskId (string), artifacts (array of {index, parts, metadata}). Also includes Error output (type=any, source=Error).",
2192
+ inputFields: [
2193
+ {
2194
+ name: "agentUrl",
2195
+ displayName: "Agent URL",
2196
+ type: "string",
2197
+ required: true,
2198
+ description: "URL of the A2A agent endpoint"
2199
+ },
2200
+ {
2201
+ name: "skillId",
2202
+ displayName: "Skill ID",
2203
+ type: "string",
2204
+ required: true,
2205
+ description: "Identifier for the specific skill to invoke on the agent"
2206
+ },
2207
+ {
2208
+ name: "input",
2209
+ displayName: "Input",
2210
+ type: "string",
2211
+ required: true,
2212
+ description: "Input text/message to send to the A2A agent"
2213
+ },
2214
+ {
2215
+ name: "authToken",
2216
+ displayName: "Auth Token",
2217
+ type: "string",
2218
+ required: true,
2219
+ description: "Authentication token for the A2A agent"
2220
+ },
2221
+ {
2222
+ name: "agentName",
2223
+ displayName: "Agent Name",
2224
+ type: "string",
2225
+ required: true,
2226
+ description: "Display name of the A2A agent"
2227
+ }
2228
+ ]
2229
+ },
2230
+ "BPMN.Variables": {
2231
+ extensionType: "BPMN.Variables",
2232
+ label: "BPMN Variables",
2233
+ bpmnElement: "bpmn:Task",
2234
+ placements: {},
2235
+ extensionTag: "uipath:mapping",
2236
+ contextFields: [],
2237
+ inputPattern: "none",
2238
+ outputSource: null,
2239
+ outputType: null,
2240
+ bindingPattern: "none",
2241
+ requiresDiscovery: false,
2242
+ isDynamic: false,
2243
+ xmlTemplate: `<bpmn:Task id="{id}" name="{name}">
2244
+ <bpmn:extensionElements>
2245
+ <uipath:mapping version="v1">
2246
+ <uipath:type value="BPMN.Variables" version="v1" />
2247
+ </uipath:mapping>
2248
+ </bpmn:extensionElements>
2249
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2250
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2251
+ </bpmn:Task>`,
2252
+ inputNotes: "Variable mappings use uipath:mapping with direct input/output elements, not a jsonBody pattern",
2253
+ bpmnElementNotes: "Also used on bpmn:StartEvent and bpmn:EndEvent for variable mappings. On bpmn:Task with no serviceType, defaults to BPMN.Variables.",
2254
+ extensionTagNotes: "Uses uipath:mapping (not uipath:activity). createExtensionTask checks for serviceType=BPMN.Variables on StartEvent/EndEvent/Task and routes to createModdleExtensionVariableMapping."
2255
+ },
2256
+ "BPMN.ScriptTask": {
2257
+ extensionType: "BPMN.ScriptTask",
2258
+ label: "Execute script",
2259
+ bpmnElement: "bpmn:ScriptTask",
2260
+ placements: {},
2261
+ extensionTag: "uipath:mapping",
2262
+ contextFields: [],
2263
+ inputPattern: "scriptArgs",
2264
+ inputName: "args",
2265
+ inputTarget: "bodyField",
2266
+ outputSource: null,
2267
+ outputType: null,
2268
+ bindingPattern: "none",
2269
+ requiresDiscovery: false,
2270
+ isDynamic: false,
2271
+ xmlTemplate: `<bpmn:ScriptTask id="{id}" name="{name}">
2272
+ <bpmn:extensionElements>
2273
+ <uipath:mapping version="v1">
2274
+ <uipath:type value="BPMN.ScriptTask" version="v1" />
2275
+ <uipath:input name="args" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
2276
+ </uipath:mapping>
2277
+ </bpmn:extensionElements>
2278
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2279
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2280
+ </bpmn:ScriptTask>`,
2281
+ inputNotes: "Inputs are merged into a single json input named 'args' with target 'bodyField'. An inputSchema is created from the input variables.",
2282
+ extensionTagNotes: "bpmn:ScriptTask is routed through createModdleExtensionVariableMapping (same as BPMN.Variables). Inputs are merged into a single 'args' JSON body with inputSchema."
2283
+ },
2284
+ "Intsvc.TimerTrigger": {
2285
+ extensionType: "Intsvc.TimerTrigger",
2286
+ label: "Timer trigger",
2287
+ bpmnElement: "bpmn:StartEvent",
2288
+ placements: {},
2289
+ extensionTag: "uipath:activity",
2290
+ contextFields: [],
2291
+ inputPattern: "none",
2292
+ outputSource: ".",
2293
+ outputType: "custom",
2294
+ outputName: "result",
2295
+ useRelativeSource: false,
2296
+ bindingPattern: "none",
2297
+ requiresDiscovery: false,
2298
+ isDynamic: false,
2299
+ xmlTemplate: `<bpmn:StartEvent id="{id}" name="{name}">
2300
+ <bpmn:extensionElements>
2301
+ <uipath:activity version="v1">
2302
+ <uipath:type value="Intsvc.TimerTrigger" version="v1" />
2303
+ <uipath:output name="result" type="custom" source="." var="{varId}" />
2304
+ </uipath:activity>
2305
+ </bpmn:extensionElements>
2306
+ <bpmn:timerEventDefinition><bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT1H</bpmn:timeDuration></bpmn:timerEventDefinition>
2307
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2308
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2309
+ </bpmn:StartEvent>`,
2310
+ inputNotes: "No jsonBody, no input fields, no isSplitInputs in design schema",
2311
+ bpmnElementNotes: "Used via timer event definition on start events; not directly in FPS_TO_NODE_MAPPING",
2312
+ extensionTagNotes: "NOT in isEvents array, uses uipath:activity. However, isIntsvcTriggerDesignSchemaType returns true.",
2313
+ inputFields: []
2314
+ },
2315
+ "Maestro.ReceiveMessageEvent": {
2316
+ extensionType: "Maestro.ReceiveMessageEvent",
2317
+ label: "Receive internal message",
2318
+ bpmnElement: "bpmn:IntermediateCatchEvent",
2319
+ placements: {
2320
+ startEvent: {
2321
+ type: "bpmn:StartEvent",
2322
+ eventDefinition: {
2323
+ type: "bpmn:MessageEventDefinition"
2324
+ }
2325
+ },
2326
+ intermediateEvent: {
2327
+ type: "bpmn:IntermediateCatchEvent",
2328
+ eventDefinition: {
2329
+ type: "bpmn:MessageEventDefinition"
2330
+ }
2331
+ },
2332
+ boundaryEvent: {
2333
+ type: "bpmn:BoundaryEvent",
2334
+ eventDefinition: {
2335
+ type: "bpmn:MessageEventDefinition"
2336
+ }
2337
+ }
2338
+ },
2339
+ extensionTag: "uipath:event",
2340
+ contextFields: [
2341
+ {
2342
+ name: "name",
2343
+ displayName: "Message name",
2344
+ type: "string",
2345
+ required: true,
2346
+ hidden: false,
2347
+ isPrimaryKey: false,
2348
+ binding: false,
2349
+ defaultValue: null
2350
+ },
2351
+ {
2352
+ name: "_label",
2353
+ type: "string",
2354
+ required: false,
2355
+ hidden: true,
2356
+ isPrimaryKey: false,
2357
+ binding: false,
2358
+ defaultValue: null
2359
+ }
2360
+ ],
2361
+ inputPattern: "separateInputs",
2362
+ inputName: "ItemData",
2363
+ inputTarget: "body",
2364
+ outputSource: null,
2365
+ outputType: "Maestro.ReceiveMessageEvent",
2366
+ outputName: "response",
2367
+ useRelativeSource: true,
2368
+ bindingPattern: "none",
2369
+ requiresDiscovery: false,
2370
+ isDynamic: false,
2371
+ xmlTemplate: `<bpmn:IntermediateCatchEvent id="{id}" name="{name}">
2372
+ <bpmn:extensionElements>
2373
+ <uipath:event version="v1">
2374
+ <uipath:type value="Maestro.ReceiveMessageEvent" version="v1" />
2375
+ <uipath:context>
2376
+ <uipath:input name="name" value="{name}" />
2377
+ <uipath:input name="_label" value="{_label}" />
2378
+ </uipath:context>
2379
+ <uipath:input name="ItemData" type="json" target="body"><![CDATA[{}]]></uipath:input>
2380
+ <uipath:output name="response" type="Maestro.ReceiveMessageEvent" var="{varId}" />
2381
+ </uipath:event>
2382
+ </bpmn:extensionElements>
2383
+ <bpmn:messageEventDefinition />
2384
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2385
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2386
+ </bpmn:IntermediateCatchEvent>`,
2387
+ inputNotes: "isSplitInputs=true in design schema but NOT in isSplitInputsEvents code array, so inputs are NOT merged into ItemData for this type. They remain separate.",
2388
+ extensionTagNotes: "In isEvents array, uses uipath:event",
2389
+ inputFields: [
2390
+ {
2391
+ name: "Reference",
2392
+ displayName: "Reference",
2393
+ type: "string",
2394
+ required: true,
2395
+ hidden: false,
2396
+ isPrimaryKey: false,
2397
+ binding: false,
2398
+ defaultValue: null,
2399
+ target: "bodyField",
2400
+ description: "Correlation reference to match this receive event to its sender"
2401
+ }
2402
+ ]
2403
+ },
2404
+ "Maestro.SendMessageEvent": {
2405
+ extensionType: "Maestro.SendMessageEvent",
2406
+ label: "Send internal message",
2407
+ bpmnElement: "bpmn:IntermediateThrowEvent",
2408
+ placements: {
2409
+ intermediateEvent: {
2410
+ type: "bpmn:IntermediateThrowEvent",
2411
+ eventDefinition: {
2412
+ type: "bpmn:MessageEventDefinition"
2413
+ }
2414
+ },
2415
+ endEvent: {
2416
+ type: "bpmn:EndEvent",
2417
+ eventDefinition: {
2418
+ type: "bpmn:MessageEventDefinition"
2419
+ }
2420
+ }
2421
+ },
2422
+ extensionTag: "uipath:event",
2423
+ contextFields: [
2424
+ {
2425
+ name: "name",
2426
+ displayName: "Message name",
2427
+ type: "string",
2428
+ required: true,
2429
+ hidden: false,
2430
+ isPrimaryKey: false,
2431
+ binding: false,
2432
+ defaultValue: null
2433
+ },
2434
+ {
2435
+ name: "_label",
2436
+ type: "string",
2437
+ required: false,
2438
+ hidden: true,
2439
+ isPrimaryKey: false,
2440
+ binding: false,
2441
+ defaultValue: null
2442
+ },
2443
+ {
2444
+ name: "inputSchema",
2445
+ displayName: "Input schema",
2446
+ type: "jsonSchema",
2447
+ required: true,
2448
+ hidden: true,
2449
+ isPrimaryKey: false,
2450
+ binding: false,
2451
+ defaultValue: null
2452
+ }
2453
+ ],
2454
+ inputPattern: "splitInputsItemData",
2455
+ inputName: "ItemData",
2456
+ inputTarget: "body",
2457
+ outputSource: null,
2458
+ outputType: "Maestro.SendMessageEvent",
2459
+ outputName: "response",
2460
+ useRelativeSource: true,
2461
+ bindingPattern: "none",
2462
+ requiresDiscovery: false,
2463
+ isDynamic: false,
2464
+ xmlTemplate: `<bpmn:IntermediateThrowEvent id="{id}" name="{name}">
2465
+ <bpmn:extensionElements>
2466
+ <uipath:event version="v1">
2467
+ <uipath:type value="Maestro.SendMessageEvent" version="v1" />
2468
+ <uipath:context>
2469
+ <uipath:input name="name" value="{name}" />
2470
+ <uipath:input name="_label" value="{_label}" />
2471
+ <uipath:input name="inputSchema" value="{inputSchema}" />
2472
+ </uipath:context>
2473
+ <uipath:input name="ItemData" type="json" target="body"><![CDATA[{"Reference":"","SpecificContent":{},"Error":"","TimeToLive":""}]]></uipath:input>
2474
+ <uipath:output name="response" type="Maestro.SendMessageEvent" var="{varId}" />
2475
+ </uipath:event>
2476
+ </bpmn:extensionElements>
2477
+ <bpmn:messageEventDefinition />
2478
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2479
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2480
+ </bpmn:IntermediateThrowEvent>`,
2481
+ inputNotes: "In isSplitInputsEvents array. Inputs are merged into a single ItemData JSON body at serialization time. Uses SEND_MESSAGE_EVENT_INPUT_SCHEMA as the inputSchema.",
2482
+ extensionTagNotes: "In isEvents array, uses uipath:event",
2483
+ inputFields: [
2484
+ {
2485
+ name: "Reference",
2486
+ displayName: "Reference",
2487
+ type: "string",
2488
+ required: true,
2489
+ hidden: false,
2490
+ isPrimaryKey: false,
2491
+ binding: false,
2492
+ defaultValue: null,
2493
+ target: "body",
2494
+ description: "Correlation reference to match this send event to its receiver"
2495
+ },
2496
+ {
2497
+ name: "SpecificContent",
2498
+ displayName: "Item information",
2499
+ type: "json",
2500
+ required: false,
2501
+ hidden: false,
2502
+ isPrimaryKey: false,
2503
+ binding: false,
2504
+ defaultValue: null,
2505
+ target: "body",
2506
+ description: "JSON payload with the message content"
2507
+ },
2508
+ {
2509
+ name: "TimeToLive",
2510
+ displayName: "Time to live",
2511
+ type: "duration",
2512
+ required: false,
2513
+ hidden: false,
2514
+ isPrimaryKey: false,
2515
+ binding: false,
2516
+ defaultValue: null,
2517
+ target: "body",
2518
+ description: "Duration after which the message expires if not consumed"
2519
+ }
2520
+ ]
2521
+ },
2522
+ "Maestro.CaseRulesEvaluator": {
2523
+ extensionType: "Maestro.CaseRulesEvaluator",
2524
+ label: "Case rules evaluator",
2525
+ bpmnElement: "bpmn:ServiceTask",
2526
+ placements: {},
2527
+ extensionTag: "uipath:activity",
2528
+ contextFields: [
2529
+ {
2530
+ name: "caseDeterministicRules",
2531
+ displayName: "Case deterministic rules",
2532
+ type: "json",
2533
+ required: true,
2534
+ hidden: false,
2535
+ isPrimaryKey: false,
2536
+ binding: false,
2537
+ defaultValue: null
2538
+ },
2539
+ {
2540
+ name: "caseCurrentExecutionState",
2541
+ displayName: "Case current execution state",
2542
+ type: "json",
2543
+ required: true,
2544
+ hidden: false,
2545
+ isPrimaryKey: false,
2546
+ binding: false,
2547
+ defaultValue: null
2548
+ },
2549
+ {
2550
+ name: "_label",
2551
+ type: "string",
2552
+ required: false,
2553
+ hidden: true,
2554
+ isPrimaryKey: false,
2555
+ binding: false,
2556
+ defaultValue: null
2557
+ }
2558
+ ],
2559
+ inputPattern: "mergedBody",
2560
+ inputName: "caseManagerInput",
2561
+ inputTarget: "body",
2562
+ outputSource: null,
2563
+ outputType: "Maestro.CaseRulesEvaluator",
2564
+ outputName: "schedulerOutput",
2565
+ useRelativeSource: true,
2566
+ bindingPattern: "none",
2567
+ requiresDiscovery: false,
2568
+ isDynamic: false,
2569
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
2570
+ <bpmn:extensionElements>
2571
+ <uipath:activity version="v1">
2572
+ <uipath:type value="Maestro.CaseRulesEvaluator" version="v1" />
2573
+ <uipath:context>
2574
+ <uipath:input name="caseDeterministicRules" value="{caseDeterministicRules}" />
2575
+ <uipath:input name="caseCurrentExecutionState" value="{caseCurrentExecutionState}" />
2576
+ <uipath:input name="_label" value="{_label}" />
2577
+ </uipath:context>
2578
+ <uipath:input name="caseManagerInput" type="json" target="body"><![CDATA[{}]]></uipath:input>
2579
+ <uipath:output name="schedulerOutput" type="Maestro.CaseRulesEvaluator" var="{varId}" />
2580
+ </uipath:activity>
2581
+ </bpmn:extensionElements>
2582
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2583
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2584
+ </bpmn:ServiceTask>`,
2585
+ bpmnElementNotes: "Not in FPS_TO_NODE_MAPPING activity section; used internally for case management processes. Likely bpmn:ServiceTask or bpmn:Task."
2586
+ },
2587
+ "Maestro.CaseManagerGuardrails": {
2588
+ extensionType: "Maestro.CaseManagerGuardrails",
2589
+ label: "Case manager guardrails",
2590
+ bpmnElement: "bpmn:ServiceTask",
2591
+ placements: {},
2592
+ extensionTag: "uipath:activity",
2593
+ contextFields: [
2594
+ {
2595
+ name: "decisions",
2596
+ displayName: "Decisions",
2597
+ type: "json",
2598
+ required: true,
2599
+ hidden: false,
2600
+ isPrimaryKey: false,
2601
+ binding: false,
2602
+ defaultValue: null
2603
+ },
2604
+ {
2605
+ name: "_label",
2606
+ type: "string",
2607
+ required: false,
2608
+ hidden: true,
2609
+ isPrimaryKey: false,
2610
+ binding: false,
2611
+ defaultValue: null
2612
+ }
2613
+ ],
2614
+ inputPattern: "mergedBody",
2615
+ inputName: "body",
2616
+ inputTarget: "body",
2617
+ outputSource: null,
2618
+ outputType: "Maestro.CaseManagerGuardrails",
2619
+ outputName: "guardrailsOutput",
2620
+ useRelativeSource: true,
2621
+ bindingPattern: "none",
2622
+ requiresDiscovery: false,
2623
+ isDynamic: false,
2624
+ xmlTemplate: `<bpmn:ServiceTask id="{id}" name="{name}">
2625
+ <bpmn:extensionElements>
2626
+ <uipath:activity version="v1">
2627
+ <uipath:type value="Maestro.CaseManagerGuardrails" version="v1" />
2628
+ <uipath:context>
2629
+ <uipath:input name="decisions" value="{decisions}" />
2630
+ <uipath:input name="_label" value="{_label}" />
2631
+ </uipath:context>
2632
+ <uipath:input name="body" type="json" target="body"><![CDATA[{}]]></uipath:input>
2633
+ <uipath:output name="guardrailsOutput" type="Maestro.CaseManagerGuardrails" var="{varId}" />
2634
+ </uipath:activity>
2635
+ </bpmn:extensionElements>
2636
+ <bpmn:incoming>{incomingEdge}</bpmn:incoming>
2637
+ <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
2638
+ </bpmn:ServiceTask>`,
2639
+ bpmnElementNotes: "Not in FPS_TO_NODE_MAPPING activity section; used internally for case management processes. Likely bpmn:ServiceTask or bpmn:Task."
2640
+ }
2641
+ },
2642
+ bpmnElements: {
2643
+ gateways: {
2644
+ "bpmn:ExclusiveGateway": {
2645
+ bpmnElement: "bpmn:ExclusiveGateway",
2646
+ category: "gateway"
2647
+ },
2648
+ "bpmn:ParallelGateway": {
2649
+ bpmnElement: "bpmn:ParallelGateway",
2650
+ category: "gateway"
2651
+ },
2652
+ "bpmn:InclusiveGateway": {
2653
+ bpmnElement: "bpmn:InclusiveGateway",
2654
+ category: "gateway"
2655
+ },
2656
+ "bpmn:ComplexGateway": {
2657
+ bpmnElement: "bpmn:ComplexGateway",
2658
+ category: "gateway"
2659
+ },
2660
+ "bpmn:EventBasedGateway": {
2661
+ bpmnElement: "bpmn:EventBasedGateway",
2662
+ category: "gateway"
2663
+ },
2664
+ "uipath.control-flow.decision": {
2665
+ bpmnElement: "uipath.control-flow.decision",
2666
+ category: "gateway"
2667
+ },
2668
+ "uipath.control-flow.switch": {
2669
+ bpmnElement: "uipath.control-flow.switch",
2670
+ category: "gateway"
2671
+ }
2672
+ },
2673
+ tasks: {
2674
+ "bpmn:Task": {
2675
+ bpmnElement: "bpmn:Task",
2676
+ category: "task"
2677
+ },
2678
+ "bpmn:UserTask": {
2679
+ bpmnElement: "bpmn:UserTask",
2680
+ category: "task"
2681
+ },
2682
+ "bpmn:ServiceTask": {
2683
+ bpmnElement: "bpmn:ServiceTask",
2684
+ category: "task"
2685
+ },
2686
+ "bpmn:SendTask": {
2687
+ bpmnElement: "bpmn:SendTask",
2688
+ category: "task"
2689
+ },
2690
+ "bpmn:ReceiveTask": {
2691
+ bpmnElement: "bpmn:ReceiveTask",
2692
+ category: "task"
2693
+ },
2694
+ "bpmn:ManualTask": {
2695
+ bpmnElement: "bpmn:ManualTask",
2696
+ category: "task"
2697
+ },
2698
+ "bpmn:BusinessRuleTask": {
2699
+ bpmnElement: "bpmn:BusinessRuleTask",
2700
+ category: "task"
2701
+ },
2702
+ "bpmn:ScriptTask": {
2703
+ bpmnElement: "bpmn:ScriptTask",
2704
+ category: "task"
2705
+ },
2706
+ "bpmn:CallActivity": {
2707
+ bpmnElement: "bpmn:CallActivity",
2708
+ category: "task"
2709
+ },
2710
+ "bpmn:SubProcess": {
2711
+ bpmnElement: "bpmn:SubProcess",
2712
+ category: "task",
2713
+ variants: [
2714
+ "collapsed",
2715
+ "expanded",
2716
+ "eventSubprocess"
2717
+ ]
2718
+ },
2719
+ "bpmn:Transaction": {
2720
+ bpmnElement: "bpmn:Transaction",
2721
+ category: "task"
2722
+ }
2723
+ },
2724
+ events: {
2725
+ "bpmn:StartEvent": {
2726
+ bpmnElement: "bpmn:StartEvent",
2727
+ category: "event",
2728
+ eventDefinitions: [
2729
+ {
2730
+ type: "none"
2731
+ },
2732
+ {
2733
+ type: "bpmn:MessageEventDefinition"
2734
+ },
2735
+ {
2736
+ type: "bpmn:TimerEventDefinition"
2737
+ },
2738
+ {
2739
+ type: "bpmn:ConditionalEventDefinition"
2740
+ },
2741
+ {
2742
+ type: "bpmn:SignalEventDefinition"
2743
+ }
2744
+ ]
2745
+ },
2746
+ "bpmn:IntermediateThrowEvent": {
2747
+ bpmnElement: "bpmn:IntermediateThrowEvent",
2748
+ category: "event",
2749
+ eventDefinitions: [
2750
+ {
2751
+ type: "none"
2752
+ },
2753
+ {
2754
+ type: "bpmn:MessageEventDefinition"
2755
+ },
2756
+ {
2757
+ type: "bpmn:EscalationEventDefinition"
2758
+ },
2759
+ {
2760
+ type: "bpmn:SignalEventDefinition"
2761
+ },
2762
+ {
2763
+ type: "bpmn:LinkEventDefinition"
2764
+ },
2765
+ {
2766
+ type: "bpmn:CompensateEventDefinition"
2767
+ }
2768
+ ]
2769
+ },
2770
+ "bpmn:IntermediateCatchEvent": {
2771
+ bpmnElement: "bpmn:IntermediateCatchEvent",
2772
+ category: "event",
2773
+ eventDefinitions: [
2774
+ {
2775
+ type: "bpmn:MessageEventDefinition"
2776
+ },
2777
+ {
2778
+ type: "bpmn:TimerEventDefinition"
2779
+ },
2780
+ {
2781
+ type: "bpmn:EscalationEventDefinition"
2782
+ },
2783
+ {
2784
+ type: "bpmn:SignalEventDefinition"
2785
+ },
2786
+ {
2787
+ type: "bpmn:ConditionalEventDefinition"
2788
+ },
2789
+ {
2790
+ type: "bpmn:LinkEventDefinition"
2791
+ },
2792
+ {
2793
+ type: "bpmn:CompensateEventDefinition"
2794
+ }
2795
+ ]
2796
+ },
2797
+ "bpmn:EndEvent": {
2798
+ bpmnElement: "bpmn:EndEvent",
2799
+ category: "event",
2800
+ eventDefinitions: [
2801
+ {
2802
+ type: "none"
2803
+ },
2804
+ {
2805
+ type: "bpmn:MessageEventDefinition"
2806
+ },
2807
+ {
2808
+ type: "bpmn:EscalationEventDefinition"
2809
+ },
2810
+ {
2811
+ type: "bpmn:ErrorEventDefinition"
2812
+ },
2813
+ {
2814
+ type: "bpmn:CompensateEventDefinition"
2815
+ },
2816
+ {
2817
+ type: "bpmn:SignalEventDefinition"
2818
+ },
2819
+ {
2820
+ type: "bpmn:TerminateEventDefinition"
2821
+ }
2822
+ ]
2823
+ },
2824
+ "bpmn:BoundaryEvent": {
2825
+ bpmnElement: "bpmn:BoundaryEvent",
2826
+ category: "event",
2827
+ eventDefinitions: [
2828
+ {
2829
+ type: "bpmn:MessageEventDefinition"
2830
+ },
2831
+ {
2832
+ type: "bpmn:TimerEventDefinition"
2833
+ },
2834
+ {
2835
+ type: "bpmn:EscalationEventDefinition"
2836
+ },
2837
+ {
2838
+ type: "bpmn:ConditionalEventDefinition"
2839
+ },
2840
+ {
2841
+ type: "bpmn:ErrorEventDefinition"
2842
+ },
2843
+ {
2844
+ type: "bpmn:SignalEventDefinition"
2845
+ },
2846
+ {
2847
+ type: "bpmn:CompensateEventDefinition"
2848
+ },
2849
+ {
2850
+ type: "bpmn:MessageEventDefinition",
2851
+ interrupting: false
2852
+ },
2853
+ {
2854
+ type: "bpmn:TimerEventDefinition",
2855
+ interrupting: false
2856
+ },
2857
+ {
2858
+ type: "bpmn:EscalationEventDefinition",
2859
+ interrupting: false
2860
+ },
2861
+ {
2862
+ type: "bpmn:ConditionalEventDefinition",
2863
+ interrupting: false
2864
+ },
2865
+ {
2866
+ type: "bpmn:SignalEventDefinition",
2867
+ interrupting: false
2868
+ }
2869
+ ]
2870
+ }
2871
+ },
2872
+ data: {
2873
+ "bpmn:DataStoreReference": {
2874
+ bpmnElement: "bpmn:DataStoreReference",
2875
+ category: "data"
2876
+ },
2877
+ "bpmn:DataObjectReference": {
2878
+ bpmnElement: "bpmn:DataObjectReference",
2879
+ category: "data"
2880
+ }
2881
+ },
2882
+ participants: {
2883
+ "bpmn:Participant": {
2884
+ bpmnElement: "bpmn:Participant",
2885
+ category: "participant"
2886
+ }
2887
+ },
2888
+ uipathShortcuts: {
2889
+ "uipath.agent": {
2890
+ bpmnElement: "uipath.agent",
2891
+ category: "uipathShortcut"
2892
+ },
2893
+ "uipath.human-in-the-loop": {
2894
+ bpmnElement: "uipath.human-in-the-loop",
2895
+ category: "uipathShortcut"
2896
+ },
2897
+ "uipath.api-workflow": {
2898
+ bpmnElement: "uipath.api-workflow",
2899
+ category: "uipathShortcut"
2900
+ },
2901
+ "uipath.process-orchestration": {
2902
+ bpmnElement: "uipath.process-orchestration",
2903
+ category: "uipathShortcut"
2904
+ },
2905
+ "uipath.rpa-workflow": {
2906
+ bpmnElement: "uipath.rpa-workflow",
2907
+ category: "uipathShortcut"
2908
+ },
2909
+ "uipath.connector-activity": {
2910
+ bpmnElement: "uipath.connector-activity",
2911
+ category: "uipathShortcut"
2912
+ },
2913
+ "uipath.connector-trigger": {
2914
+ bpmnElement: "uipath.connector-trigger",
2915
+ category: "uipathShortcut"
2916
+ },
2917
+ "uipath.http-request": {
2918
+ bpmnElement: "uipath.http-request",
2919
+ category: "uipathShortcut"
2920
+ },
2921
+ "uipath.timer-activity": {
2922
+ bpmnElement: "uipath.timer-activity",
2923
+ category: "uipathShortcut",
2924
+ eventDefinition: "bpmn:TimerEventDefinition"
2925
+ },
2926
+ "uipath.timer-trigger": {
2927
+ bpmnElement: "uipath.timer-trigger",
2928
+ category: "uipathShortcut",
2929
+ eventDefinition: "bpmn:TimerEventDefinition"
2930
+ }
2931
+ }
2932
+ },
2933
+ serializationRules: {
2934
+ extensionTagResolution: {
2935
+ description: "How the frontend determines which XML extension tag to use",
2936
+ rules: [
2937
+ "If serviceType is in isEvents array [Intsvc.WaitForEvent, Intsvc.EventTrigger, Maestro.ReceiveMessageEvent, Maestro.SendMessageEvent] => uipath:event",
2938
+ "If serviceType is BPMN.Variables on bpmn:StartEvent, bpmn:EndEvent, or bpmn:Task => uipath:mapping",
2939
+ "If nodeType is bpmn:ScriptTask or bpmn:SubProcess => uipath:mapping",
2940
+ "Otherwise => uipath:activity"
2941
+ ]
2942
+ },
2943
+ isEventsArray: [
2944
+ "Intsvc.WaitForEvent",
2945
+ "Intsvc.EventTrigger",
2946
+ "Maestro.ReceiveMessageEvent",
2947
+ "Maestro.SendMessageEvent"
2948
+ ],
2949
+ isExecutionArray: [
2950
+ "Intsvc.ActivityExecution",
2951
+ "Intsvc.AsyncExecution",
2952
+ "Intsvc.SyncAgentExecution",
2953
+ "Intsvc.AsyncAgentExecution",
2954
+ "Intsvc.SyncWorkflowExecution",
2955
+ "Intsvc.AsyncWorkflowExecution",
2956
+ "Intsvc.UnifiedHttpRequest"
2957
+ ],
2958
+ isSplitInputsEventsArray: [
2959
+ "Maestro.SendMessageEvent"
2960
+ ]
2961
+ }
2962
+ };
2963
+
2964
+ // src/manifest/bpmn-spec.ts
2965
+ var BPMN_SPEC = bpmn_spec_default;
2966
+ var STATIC_UIPATH_EXTENSION_TAG_NAMES = [
2967
+ "binding",
2968
+ "bindings",
2969
+ "caseManagement",
2970
+ "context",
2971
+ "entryPointId",
2972
+ "error",
2973
+ "errorDefinition",
2974
+ "errorMapping",
2975
+ "input",
2976
+ "inputOutput",
2977
+ "inputSchema",
2978
+ "intsvcActivityConfig",
2979
+ "isTransactionRoot",
2980
+ "loopCharacteristics",
2981
+ "migrationVersion",
2982
+ "output",
2983
+ "retry",
2984
+ "scriptVersion",
2985
+ "tag",
2986
+ "tags",
2987
+ "type",
2988
+ "variables"
2989
+ ];
2990
+ var SUPPORTED_UIPATH_EXTENSION_TAG_NAMES = Object.freeze([
2991
+ ...new Set([
2992
+ ...Object.values(BPMN_SPEC.extensionTypes).map((entry) => entry.extensionTag.replace(/^uipath:/, "")),
2993
+ ...STATIC_UIPATH_EXTENSION_TAG_NAMES
2994
+ ])
2995
+ ].sort());
2996
+ var SUPPORTED_UIPATH_EXTENSION_TAGS = Object.freeze(SUPPORTED_UIPATH_EXTENSION_TAG_NAMES.map((tag) => `uipath:${tag}`));
2997
+
2998
+ // src/bpmn-validation/project-validator.ts
2999
+ var KNOWN_UIPATH_TAGS = new Set(SUPPORTED_UIPATH_EXTENSION_TAGS);
3000
+ var SEMANTIC_VALIDATION_ERROR = "BPMN_VALIDATION_ERROR";
3001
+
3002
+ class BpmnValidateService {
3003
+ fileSystem;
3004
+ options;
3005
+ constructor(fileSystem, options = {}) {
3006
+ this.fileSystem = fileSystem;
3007
+ this.options = options;
3008
+ }
3009
+ async validateProject(projectPath) {
3010
+ if (!projectPath) {
3011
+ return this.createFailure([
3012
+ {
3013
+ file: ".",
3014
+ message: "Project path is required.",
3015
+ instruction: "Provide a ProcessOrchestration project path."
3016
+ }
3017
+ ]);
3018
+ }
3019
+ const files = await this.fileSystem.readdir(projectPath);
3020
+ const bpmnFiles = files.filter((file) => file.endsWith(".bpmn"));
3021
+ const diagnostics = [];
3022
+ if (bpmnFiles.length === 0) {
3023
+ diagnostics.push({
3024
+ file: ".",
3025
+ message: "No BPMN files were found.",
3026
+ instruction: "Add at least one .bpmn process file."
3027
+ });
3028
+ }
3029
+ const bindings = await this.loadBindings(projectPath, diagnostics);
3030
+ for (const file of bpmnFiles) {
3031
+ const filePath = this.fileSystem.joinPath(projectPath, file);
3032
+ const content = await this.fileSystem.readFile(filePath);
3033
+ if (content === null || content.byteLength === 0) {
3034
+ diagnostics.push({
3035
+ file,
3036
+ message: "BPMN file could not be read or is empty.",
3037
+ instruction: "Ensure the file exists and contains BPMN XML."
3038
+ });
3039
+ continue;
3040
+ }
3041
+ const xml = decodeFileContent(content);
3042
+ this.validateBpmnFile(file, xml, bindings, diagnostics);
3043
+ await this.runFileValidators({ projectPath, file, xml, fileSystem: this.fileSystem }, diagnostics);
3044
+ }
3045
+ await this.runProjectValidators({ projectPath, bpmnFiles, fileSystem: this.fileSystem }, diagnostics);
3046
+ const errors = diagnostics.filter(isErrorDiagnostic);
3047
+ if (errors.length > 0) {
3048
+ return this.createFailure(errors);
3049
+ }
3050
+ const warnings = diagnostics.filter(isWarningDiagnostic);
3051
+ if (warnings.length > 0) {
3052
+ return {
3053
+ isValid: true,
3054
+ diagnostics,
3055
+ message: this.createWarningMessage(warnings)
3056
+ };
3057
+ }
3058
+ return {
3059
+ isValid: true,
3060
+ diagnostics: []
3061
+ };
3062
+ }
3063
+ validateBpmnFile(file, xml, bindings, diagnostics) {
3064
+ const parseResult = parseXml(xml);
3065
+ diagnostics.push(...parseResult.diagnostics.map((message) => ({
3066
+ file,
3067
+ message,
3068
+ instruction: "Fix the BPMN XML so tags are well-formed."
3069
+ })));
3070
+ if (!parseResult.root) {
3071
+ diagnostics.push({
3072
+ file,
3073
+ message: "BPMN XML does not contain a root element.",
3074
+ instruction: "Export a valid BPMN definitions document."
3075
+ });
3076
+ return;
3077
+ }
3078
+ const definitions = findFirst(parseResult.root, (node) => hasLocalName(node, "definitions"));
3079
+ if (!definitions) {
3080
+ diagnostics.push({
3081
+ file,
3082
+ message: "BPMN definitions element is missing.",
3083
+ instruction: "Use a BPMN document rooted at bpmn:definitions."
3084
+ });
3085
+ return;
3086
+ }
3087
+ const processes = findChildren(definitions, (node) => hasLocalName(node, "process"));
3088
+ if (processes.length === 0) {
3089
+ diagnostics.push({
3090
+ file,
3091
+ message: "BPMN process element is missing.",
3092
+ instruction: "Add a bpmn:process element to the BPMN file."
3093
+ });
3094
+ }
3095
+ for (const process of processes) {
3096
+ if (findDescendants(process, (node) => hasLocalName(node, "startEvent")).length === 0) {
3097
+ diagnostics.push({
3098
+ file,
3099
+ element: describeElement(process),
3100
+ message: "BPMN process has no start event.",
3101
+ instruction: "Add a bpmn:StartEvent to each process."
3102
+ });
3103
+ }
3104
+ }
3105
+ const availableBindings = new Map(bindings);
3106
+ collectInlineBindings(definitions, availableBindings);
3107
+ this.validateUiPathTags(file, definitions, availableBindings, diagnostics);
3108
+ }
3109
+ validateUiPathTags(file, root, bindings, diagnostics) {
3110
+ const uipathNodes = findDescendants(root, (node) => node.name.startsWith("uipath:"));
3111
+ for (const node of uipathNodes) {
3112
+ if (!KNOWN_UIPATH_TAGS.has(node.name)) {
3113
+ diagnostics.push({
3114
+ file,
3115
+ element: describeElement(node),
3116
+ message: `Unsupported UiPath extension tag "${node.name}".`,
3117
+ instruction: `Use a supported UiPath extension tag: ${SUPPORTED_UIPATH_EXTENSION_TAGS.join(", ")}.`,
3118
+ severity: "warning"
3119
+ });
3120
+ }
3121
+ }
3122
+ const payloads = uipathNodes.filter((node) => ["uipath:activity", "uipath:event", "uipath:mapping"].includes(node.name));
3123
+ for (const payload of payloads) {
3124
+ this.validatePayload(file, payload, bindings, diagnostics);
3125
+ }
3126
+ }
3127
+ validatePayload(file, payload, bindings, diagnostics) {
3128
+ const owner = findBpmnOwner(payload);
3129
+ if (!owner) {
3130
+ diagnostics.push({
3131
+ file,
3132
+ element: describeElement(payload),
3133
+ message: `${payload.name} must be inside bpmn:extensionElements on a BPMN element.`,
3134
+ instruction: "Move the UiPath extension payload under the owning BPMN element's extensionElements."
3135
+ });
3136
+ return;
3137
+ }
3138
+ const typeNodes = childElements(payload, "uipath:type");
3139
+ if (payload.attributes.type && typeNodes.length > 0) {
3140
+ diagnostics.push({
3141
+ file,
3142
+ element: describeElement(owner),
3143
+ message: `${payload.name} must not mix a type attribute with legacy uipath:type child elements.`,
3144
+ instruction: "Use either the payload type attribute or one uipath:type child, not both."
3145
+ });
3146
+ return;
3147
+ }
3148
+ if (!payload.attributes.type && typeNodes.length === 0 && !isImplicitVariablesMapping(payload, owner)) {
3149
+ diagnostics.push({
3150
+ file,
3151
+ element: describeElement(owner),
3152
+ message: `${payload.name} must contain exactly one uipath:type child or a type attribute.`,
3153
+ instruction: "Add one uipath:type element with a supported value attribute, or set the payload type attribute."
3154
+ });
3155
+ return;
3156
+ }
3157
+ if (!payload.attributes.type && typeNodes.length > 1) {
3158
+ diagnostics.push({
3159
+ file,
3160
+ element: describeElement(owner),
3161
+ message: `${payload.name} must contain exactly one uipath:type child or a type attribute.`,
3162
+ instruction: "Add one uipath:type element with a supported value attribute, or set the payload type attribute."
3163
+ });
3164
+ return;
3165
+ }
3166
+ const typeNode = typeNodes[0];
3167
+ const extensionType = payload.attributes.type ?? typeNode?.attributes.value ?? inferImplicitExtensionType(payload, owner);
3168
+ if (!extensionType) {
3169
+ diagnostics.push({
3170
+ file,
3171
+ element: describeElement(typeNode ?? payload),
3172
+ message: "UiPath extension type is missing.",
3173
+ instruction: "Set uipath:activity type or uipath:type value to a supported UiPath BPMN extension type."
3174
+ });
3175
+ return;
3176
+ }
3177
+ const contract = BPMN_SPEC.extensionTypes[extensionType];
3178
+ if (!contract) {
3179
+ diagnostics.push({
3180
+ file,
3181
+ element: describeElement(typeNode ?? payload),
3182
+ message: `Unsupported UiPath extension type "${extensionType}".`,
3183
+ instruction: "Use an extension type present in the UiPath BPMN contract, or update the contract before packaging this project.",
3184
+ severity: "warning"
3185
+ });
3186
+ return;
3187
+ }
3188
+ this.validateContractPlacement(file, payload, owner, contract, diagnostics);
3189
+ this.validateContext(file, payload, owner, contract, diagnostics);
3190
+ if (contract.extensionType === "Orchestrator.StartAgentJob") {
3191
+ this.validateStartAgentJobBindings(file, payload, owner, bindings, diagnostics);
3192
+ }
3193
+ this.validateInputs(file, payload, owner, contract, diagnostics);
3194
+ this.validateOutput(file, payload, owner, contract, diagnostics);
3195
+ this.validateBindingReferences(file, payload, bindings, diagnostics);
3196
+ }
3197
+ validateContractPlacement(file, payload, owner, contract, diagnostics) {
3198
+ if (payload.name !== contract.extensionTag) {
3199
+ diagnostics.push({
3200
+ file,
3201
+ element: describeElement(payload),
3202
+ message: `${contract.extensionType} must use ${contract.extensionTag}, not ${payload.name}.`,
3203
+ instruction: `Change the extension tag to ${contract.extensionTag}.`
3204
+ });
3205
+ }
3206
+ const allowedOwners = getAllowedOwnerTypes(contract);
3207
+ if (!allowedOwners.some((allowedOwner) => normalizeBpmnName(allowedOwner) === normalizeBpmnName(owner.name))) {
3208
+ diagnostics.push({
3209
+ file,
3210
+ element: describeElement(owner),
3211
+ message: `${contract.extensionType} cannot be attached to ${owner.name}.`,
3212
+ instruction: `Attach it to one of: ${allowedOwners.join(", ")}.`
3213
+ });
3214
+ }
3215
+ }
3216
+ validateContext(file, payload, owner, contract, diagnostics) {
3217
+ const contexts = childElements(payload, "uipath:context");
3218
+ const contextInputs = contexts.flatMap((context) => childElements(context, "uipath:input"));
3219
+ const actual = new Map(contextInputs.map((input) => [input.attributes.name, input]));
3220
+ const fields = contract.contextFields ?? [];
3221
+ const allowDynamicPayloadShape = usesCanvasOwnedDynamicPayload(contract);
3222
+ const allowed = new Set(fields.map((field) => field.name));
3223
+ for (const field of fields) {
3224
+ const input = actual.get(field.name);
3225
+ if (!allowDynamicPayloadShape && field.required && !hasAttributeValue(input, "value")) {
3226
+ diagnostics.push({
3227
+ file,
3228
+ element: describeElement(owner),
3229
+ message: `${contract.extensionType} is missing required context input "${field.name}".`,
3230
+ instruction: `Add <uipath:input name="${field.name}" value="..." /> inside uipath:context.`
3231
+ });
3232
+ }
3233
+ if (input) {
3234
+ validateTypedValue(file, input, field.type, input.attributes.value, `context input "${field.name}"`, diagnostics);
3235
+ }
3236
+ }
3237
+ for (const input of contextInputs) {
3238
+ const name = input.attributes.name;
3239
+ if (!name) {
3240
+ diagnostics.push({
3241
+ file,
3242
+ element: describeElement(input),
3243
+ message: "uipath:context input is missing a name attribute.",
3244
+ instruction: "Set name to a context field from the UiPath BPMN contract."
3245
+ });
3246
+ } else if (!allowDynamicPayloadShape && allowed.size > 0 && !allowed.has(name)) {
3247
+ diagnostics.push({
3248
+ file,
3249
+ element: describeElement(input),
3250
+ message: `${contract.extensionType} does not support context input "${name}".`,
3251
+ instruction: `Use one of: ${[...allowed].join(", ")}.`
3252
+ });
3253
+ }
3254
+ }
3255
+ }
3256
+ validateInputs(file, payload, owner, contract, diagnostics) {
3257
+ const directInputs = childElements(payload, "uipath:input");
3258
+ const actual = new Map(directInputs.map((input) => [input.attributes.name, input]));
3259
+ if (usesCanvasOwnedDynamicPayload(contract)) {
3260
+ this.validateDynamicDirectInputs(file, directInputs, diagnostics);
3261
+ return;
3262
+ }
3263
+ if (contract.inputPattern === "none") {
3264
+ if (contract.extensionType === "BPMN.Variables") {
3265
+ this.validateVariableMappingInputs(file, directInputs, diagnostics);
3266
+ return;
3267
+ }
3268
+ for (const input of directInputs) {
3269
+ diagnostics.push({
3270
+ file,
3271
+ element: describeElement(input),
3272
+ message: `${contract.extensionType} does not support direct input payload "${input.attributes.name ?? ""}".`,
3273
+ instruction: "Remove the direct uipath:input payload."
3274
+ });
3275
+ }
3276
+ return;
3277
+ }
3278
+ if (["mergedBody", "splitInputsItemData", "scriptArgs"].includes(contract.inputPattern)) {
3279
+ const expectedName = getExpectedInputName(contract);
3280
+ const input = actual.get(expectedName);
3281
+ if (!input) {
3282
+ diagnostics.push({
3283
+ file,
3284
+ element: describeElement(owner),
3285
+ message: `${contract.extensionType} is missing required input payload "${expectedName}".`,
3286
+ instruction: `Add <uipath:input name="${expectedName}" type="json" target="${getExpectedInputTarget(contract)}">...</uipath:input>.`
3287
+ });
3288
+ return;
3289
+ }
3290
+ validateInputShape(file, input, expectedName, contract, diagnostics);
3291
+ for (const extraInput of directInputs) {
3292
+ if (extraInput.attributes.name !== expectedName) {
3293
+ diagnostics.push({
3294
+ file,
3295
+ element: describeElement(extraInput),
3296
+ message: `${contract.extensionType} does not support input payload "${extraInput.attributes.name ?? ""}".`,
3297
+ instruction: `Use only the "${expectedName}" input payload for ${contract.inputPattern}.`
3298
+ });
3299
+ }
3300
+ }
3301
+ return;
3302
+ }
3303
+ const fields = contract.inputFields ?? [];
3304
+ const allowed = new Set(fields.map((field) => field.name));
3305
+ for (const field of fields) {
3306
+ const input = actual.get(field.name);
3307
+ if (field.required && !input) {
3308
+ diagnostics.push({
3309
+ file,
3310
+ element: describeElement(owner),
3311
+ message: `${contract.extensionType} is missing required input payload "${field.name}".`,
3312
+ instruction: `Add a direct uipath:input named "${field.name}".`
3313
+ });
3314
+ }
3315
+ if (input) {
3316
+ validateTypedValue(file, input, field.type, input.text || input.attributes.value, `input payload "${field.name}"`, diagnostics);
3317
+ }
3318
+ }
3319
+ for (const input of directInputs) {
3320
+ const name = input.attributes.name;
3321
+ if (!name) {
3322
+ diagnostics.push({
3323
+ file,
3324
+ element: describeElement(input),
3325
+ message: "uipath:input is missing a name attribute.",
3326
+ instruction: "Set name to an input field from the UiPath BPMN contract."
3327
+ });
3328
+ } else if (allowed.size > 0 && !allowed.has(name)) {
3329
+ diagnostics.push({
3330
+ file,
3331
+ element: describeElement(input),
3332
+ message: `${contract.extensionType} does not support input payload "${name}".`,
3333
+ instruction: `Use one of: ${[...allowed].join(", ")}.`
3334
+ });
3335
+ }
3336
+ }
3337
+ }
3338
+ validateDynamicDirectInputs(file, directInputs, diagnostics) {
3339
+ for (const input of directInputs) {
3340
+ if (!hasAttributeValue(input, "name")) {
3341
+ diagnostics.push({
3342
+ file,
3343
+ element: describeElement(input),
3344
+ message: "uipath:input is missing a name attribute.",
3345
+ instruction: "Set name to the Integration Service payload field."
3346
+ });
3347
+ }
3348
+ if (input.attributes.type === "json") {
3349
+ validateJsonPayload(file, input, `input payload "${input.attributes.name ?? ""}"`, diagnostics);
3350
+ }
3351
+ }
3352
+ }
3353
+ validateVariableMappingInputs(file, directInputs, diagnostics) {
3354
+ for (const input of directInputs) {
3355
+ if (!hasAttributeValue(input, "name")) {
3356
+ diagnostics.push({
3357
+ file,
3358
+ element: describeElement(input),
3359
+ message: "BPMN.Variables mapping input is missing its name attribute.",
3360
+ instruction: "Set name to the process variable being mapped."
3361
+ });
3362
+ }
3363
+ if (input.attributes.type === "json") {
3364
+ validateJsonPayload(file, input, `mapping input "${input.attributes.name ?? ""}"`, diagnostics);
3365
+ }
3366
+ }
3367
+ }
3368
+ validateOutput(file, payload, owner, contract, diagnostics) {
3369
+ if (usesCanvasOwnedDynamicPayload(contract)) {
3370
+ for (const output of childElements(payload, "uipath:output")) {
3371
+ if (!hasAttributeValue(output, "var")) {
3372
+ diagnostics.push({
3373
+ file,
3374
+ element: describeElement(output),
3375
+ message: `${contract.extensionType} output is missing its var attribute.`,
3376
+ instruction: "Set var to the variable that receives the output."
3377
+ });
3378
+ }
3379
+ }
3380
+ return;
3381
+ }
3382
+ if (!contract.outputName && !contract.outputType) {
3383
+ return;
3384
+ }
3385
+ const outputs = childElements(payload, "uipath:output");
3386
+ if (outputs.length === 0) {
3387
+ diagnostics.push({
3388
+ file,
3389
+ element: describeElement(owner),
3390
+ message: `${contract.extensionType} is missing an output payload.`,
3391
+ instruction: "Add a uipath:output matching the UiPath BPMN contract."
3392
+ });
3393
+ return;
3394
+ }
3395
+ for (const output of outputs) {
3396
+ if (contract.outputName && output.attributes.name !== contract.outputName) {
3397
+ diagnostics.push({
3398
+ file,
3399
+ element: describeElement(output),
3400
+ message: `${contract.extensionType} output name must be "${contract.outputName}".`,
3401
+ instruction: `Set the uipath:output name attribute to "${contract.outputName}".`
3402
+ });
3403
+ }
3404
+ if (contract.outputType && output.attributes.type !== contract.outputType) {
3405
+ diagnostics.push({
3406
+ file,
3407
+ element: describeElement(output),
3408
+ message: `${contract.extensionType} output type must be "${contract.outputType}".`,
3409
+ instruction: `Set the uipath:output type attribute to "${contract.outputType}".`
3410
+ });
3411
+ }
3412
+ if (contract.outputSource && output.attributes.source !== contract.outputSource) {
3413
+ diagnostics.push({
3414
+ file,
3415
+ element: describeElement(output),
3416
+ message: `${contract.extensionType} output source must be "${contract.outputSource}".`,
3417
+ instruction: `Set the uipath:output source attribute to "${contract.outputSource}".`
3418
+ });
3419
+ }
3420
+ if (!hasAttributeValue(output, "var")) {
3421
+ diagnostics.push({
3422
+ file,
3423
+ element: describeElement(output),
3424
+ message: `${contract.extensionType} output is missing its var attribute.`,
3425
+ instruction: "Set var to the variable that receives the output."
3426
+ });
3427
+ }
3428
+ }
3429
+ }
3430
+ validateBindingReferences(file, payload, bindings, diagnostics) {
3431
+ const bindingReferences = findDescendants(payload, (node) => {
3432
+ const value = node.attributes.value;
3433
+ return value?.startsWith("=bindings.") === true;
3434
+ });
3435
+ for (const node of bindingReferences) {
3436
+ const bindingId = node.attributes.value.slice("=bindings.".length);
3437
+ if (!bindingId) {
3438
+ diagnostics.push({
3439
+ file,
3440
+ element: describeElement(node),
3441
+ message: "Binding reference is missing a binding id.",
3442
+ instruction: 'Use a binding expression such as value="=bindings.<bindingId>".'
3443
+ });
3444
+ continue;
3445
+ }
3446
+ if (!bindings.has(bindingId)) {
3447
+ diagnostics.push({
3448
+ file,
3449
+ element: describeElement(node),
3450
+ message: `Binding reference "${bindingId}" was not found in project bindings.`,
3451
+ instruction: "Add the binding to BPMN uipath:bindings or bindings_v2.json, or update the BPMN binding reference."
3452
+ });
3453
+ }
3454
+ }
3455
+ }
3456
+ validateStartAgentJobBindings(file, payload, owner, bindings, diagnostics) {
3457
+ const contexts = childElements(payload, "uipath:context");
3458
+ const contextInputs = contexts.flatMap((context) => childElements(context, "uipath:input"));
3459
+ const inputs = new Map(contextInputs.map((input) => [input.attributes.name, input]));
3460
+ if (inputs.has("releaseKey") || inputs.has("folderId")) {
3461
+ diagnostics.push({
3462
+ file,
3463
+ element: describeElement(owner),
3464
+ message: "Orchestrator.StartAgentJob must use binding-backed name and folderPath context inputs, not releaseKey or folderId.",
3465
+ instruction: 'Replace releaseKey/folderId with value="=bindings.<agentNameBindingId>" and value="=bindings.<agentFolderPathBindingId>".'
3466
+ });
3467
+ }
3468
+ for (const expected of ["name", "folderPath"]) {
3469
+ const input = inputs.get(expected);
3470
+ const value = input?.attributes.value;
3471
+ if (!value?.startsWith("=bindings.")) {
3472
+ diagnostics.push({
3473
+ file,
3474
+ element: describeElement(input ?? owner),
3475
+ message: `Orchestrator.StartAgentJob context input "${expected}" must reference project bindings.`,
3476
+ instruction: `Set "${expected}" to a binding expression such as value="=bindings.<${expected}BindingId>".`
3477
+ });
3478
+ continue;
3479
+ }
3480
+ const bindingId = value.slice("=bindings.".length);
3481
+ const binding = bindings.get(bindingId);
3482
+ if (!binding) {
3483
+ diagnostics.push({
3484
+ file,
3485
+ element: describeElement(input ?? owner),
3486
+ message: `Orchestrator.StartAgentJob binding reference "${bindingId}" was not found in project bindings.`,
3487
+ instruction: "Add agent name and folderPath bindings to BPMN uipath:bindings or bindings_v2.json before packaging this BPMN project."
3488
+ });
3489
+ continue;
3490
+ }
3491
+ if (binding.resource !== "process" || binding.resourceSubType !== "Agent" || binding.propertyAttribute !== expected) {
3492
+ diagnostics.push({
3493
+ file,
3494
+ element: describeElement(input ?? owner),
3495
+ message: `Orchestrator.StartAgentJob binding "${bindingId}" must target Agent ${expected}.`,
3496
+ instruction: `Use a process binding with resourceSubType "Agent" and propertyAttribute "${expected}".`
3497
+ });
3498
+ }
3499
+ }
3500
+ }
3501
+ async loadBindings(projectPath, diagnostics) {
3502
+ const bindingsPath = this.fileSystem.joinPath(projectPath, "bindings_v2.json");
3503
+ if (!await this.fileSystem.exists(bindingsPath)) {
3504
+ return new Map;
3505
+ }
3506
+ const content = await this.fileSystem.readFile(bindingsPath);
3507
+ if (content === null || content.byteLength === 0) {
3508
+ diagnostics.push({
3509
+ file: "bindings_v2.json",
3510
+ message: "bindings_v2.json could not be read or is empty.",
3511
+ instruction: "Write a valid bindings_v2.json file or remove malformed binding references from BPMN."
3512
+ });
3513
+ return new Map;
3514
+ }
3515
+ try {
3516
+ const parsed = JSON.parse(decodeFileContent(content));
3517
+ return collectBindings(parsed);
3518
+ } catch (error) {
3519
+ diagnostics.push({
3520
+ file: "bindings_v2.json",
3521
+ message: `bindings_v2.json is not valid JSON: ${String(error)}`,
3522
+ instruction: "Fix bindings_v2.json so it contains valid JSON."
3523
+ });
3524
+ return new Map;
3525
+ }
3526
+ }
3527
+ async runFileValidators(context, diagnostics) {
3528
+ for (const validator of this.options.fileValidators ?? []) {
3529
+ diagnostics.push(...await validator.validate(context));
3530
+ }
3531
+ }
3532
+ async runProjectValidators(context, diagnostics) {
3533
+ for (const validator of this.options.projectValidators ?? []) {
3534
+ diagnostics.push(...await validator.validate(context));
3535
+ }
3536
+ }
3537
+ createFailure(diagnostics) {
3538
+ const message = diagnostics.map(formatDiagnostic).slice(0, 25).join(`
3539
+ `);
3540
+ const suffix = diagnostics.length > 25 ? `
3541
+ ...and ${diagnostics.length - 25} more BPMN validation error(s).` : "";
3542
+ return {
3543
+ isValid: false,
3544
+ errorCode: SEMANTIC_VALIDATION_ERROR,
3545
+ diagnostics,
3546
+ message: `${message}${suffix}`
3547
+ };
3548
+ }
3549
+ createWarningMessage(diagnostics) {
3550
+ const message = diagnostics.map(formatDiagnostic).slice(0, 25).join(`
3551
+ `);
3552
+ const suffix = diagnostics.length > 25 ? `
3553
+ ...and ${diagnostics.length - 25} more BPMN validation warning(s).` : "";
3554
+ return `${message}${suffix}`;
3555
+ }
3556
+ }
3557
+ function decodeFileContent(content) {
3558
+ return new TextDecoder().decode(content);
3559
+ }
3560
+ function parseXml(xml) {
3561
+ const root = {
3562
+ name: "#document",
3563
+ attributes: {},
3564
+ children: [],
3565
+ text: ""
3566
+ };
3567
+ const stack = [root];
3568
+ const diagnostics = [];
3569
+ const tokenPattern = /<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<![^>]*>|<\/?[^>]+>/g;
3570
+ let lastIndex = 0;
3571
+ let match;
3572
+ match = tokenPattern.exec(xml);
3573
+ while (match !== null) {
3574
+ const text = xml.slice(lastIndex, match.index);
3575
+ if (text.trim()) {
3576
+ stack[stack.length - 1].text += decodeXmlEntities(text.trim());
3577
+ }
3578
+ const token = match[0];
3579
+ if (token.startsWith("<![CDATA[")) {
3580
+ stack[stack.length - 1].text += match[1] ?? "";
3581
+ } else if (token.startsWith("</")) {
3582
+ const closeName = token.slice(2, -1).trim();
3583
+ if (stack.length <= 1) {
3584
+ diagnostics.push(`Unexpected closing tag "${closeName}".`);
3585
+ } else if (stack[stack.length - 1].name !== closeName) {
3586
+ let matchingOpenIndex = -1;
3587
+ for (let i = stack.length - 1;i > 0; i -= 1) {
3588
+ if (stack[i].name === closeName) {
3589
+ matchingOpenIndex = i;
3590
+ break;
3591
+ }
3592
+ }
3593
+ if (matchingOpenIndex <= 0) {
3594
+ diagnostics.push(`Unexpected closing tag "${closeName}".`);
3595
+ } else {
3596
+ diagnostics.push(`Mismatched closing tag "${closeName}".`);
3597
+ while (stack.length > matchingOpenIndex) {
3598
+ stack.pop();
3599
+ }
3600
+ }
3601
+ } else {
3602
+ stack.pop();
3603
+ }
3604
+ } else if (!token.startsWith("<!--") && !token.startsWith("<?") && !token.startsWith("<!")) {
3605
+ const selfClosing = token.endsWith("/>");
3606
+ const node = parseStartTag(token, selfClosing);
3607
+ node.parent = stack[stack.length - 1];
3608
+ stack[stack.length - 1].children.push(node);
3609
+ if (!selfClosing) {
3610
+ stack.push(node);
3611
+ }
3612
+ }
3613
+ lastIndex = tokenPattern.lastIndex;
3614
+ match = tokenPattern.exec(xml);
3615
+ }
3616
+ const trailing = xml.slice(lastIndex).trim();
3617
+ if (trailing) {
3618
+ stack[stack.length - 1].text += decodeXmlEntities(trailing);
3619
+ }
3620
+ if (stack.length > 1) {
3621
+ diagnostics.push(`Unclosed tag "${stack[stack.length - 1].name}" in BPMN XML.`);
3622
+ }
3623
+ return {
3624
+ root: root.children[0],
3625
+ diagnostics
3626
+ };
3627
+ }
3628
+ function parseStartTag(token, selfClosing) {
3629
+ const body = token.slice(1, selfClosing ? -2 : -1).trim();
3630
+ const nameMatch = /^([^\s/>]+)/.exec(body);
3631
+ const name = nameMatch?.[1] ?? "";
3632
+ const attributes = {};
3633
+ const attributePattern = /([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
3634
+ let match;
3635
+ match = attributePattern.exec(body);
3636
+ while (match !== null) {
3637
+ attributes[match[1]] = decodeXmlEntities(match[2] ?? match[3] ?? "");
3638
+ match = attributePattern.exec(body);
3639
+ }
3640
+ return {
3641
+ name,
3642
+ attributes,
3643
+ children: [],
3644
+ text: ""
3645
+ };
3646
+ }
3647
+ function childElements(node, name) {
3648
+ return node.children.filter((child) => child.name === name);
3649
+ }
3650
+ function findChildren(node, predicate) {
3651
+ return node.children.filter(predicate);
3652
+ }
3653
+ function findDescendants(node, predicate) {
3654
+ const matches = [];
3655
+ for (const child of node.children) {
3656
+ if (predicate(child)) {
3657
+ matches.push(child);
3658
+ }
3659
+ matches.push(...findDescendants(child, predicate));
3660
+ }
3661
+ return matches;
3662
+ }
3663
+ function findFirst(node, predicate) {
3664
+ if (predicate(node)) {
3665
+ return node;
3666
+ }
3667
+ for (const child of node.children) {
3668
+ const match = findFirst(child, predicate);
3669
+ if (match) {
3670
+ return match;
3671
+ }
3672
+ }
3673
+ return;
3674
+ }
3675
+ function hasLocalName(node, localName) {
3676
+ return normalizeBpmnName(node.name).split(":").pop() === localName.toLowerCase();
3677
+ }
3678
+ function normalizeBpmnName(name) {
3679
+ return name.toLowerCase();
3680
+ }
3681
+ function findBpmnOwner(payload) {
3682
+ const extensionElements = payload.parent;
3683
+ if (extensionElements && hasLocalName(extensionElements, "extensionElements")) {
3684
+ return extensionElements.parent;
3685
+ }
3686
+ if (payload.parent?.name.startsWith("bpmn:")) {
3687
+ return payload.parent;
3688
+ }
3689
+ return;
3690
+ }
3691
+ function describeElement(node) {
3692
+ const id = node.attributes.id ? `#${node.attributes.id}` : "";
3693
+ const name = node.attributes.name ? ` "${node.attributes.name}"` : "";
3694
+ return `${node.name}${id}${name}`;
3695
+ }
3696
+ function hasAttributeValue(node, attribute) {
3697
+ return Boolean(node?.attributes[attribute]?.trim());
3698
+ }
3699
+ function usesCanvasOwnedDynamicPayload(contract) {
3700
+ return contract.isDynamic === true || contract.extensionType.startsWith("Intsvc.") && contract.requiresDiscovery;
3701
+ }
3702
+ function getAllowedOwnerTypes(contract) {
3703
+ if (contract.extensionType === "BPMN.Variables") {
3704
+ return [
3705
+ "bpmn:StartEvent",
3706
+ "bpmn:EndEvent",
3707
+ "bpmn:Task",
3708
+ "bpmn:ScriptTask"
3709
+ ];
3710
+ }
3711
+ const placementTypes = Object.values(contract.placements).map((placement) => placement.type);
3712
+ return placementTypes.length > 0 ? placementTypes : [contract.bpmnElement];
3713
+ }
3714
+ function inferImplicitExtensionType(payload, owner) {
3715
+ return isImplicitVariablesMapping(payload, owner) ? "BPMN.Variables" : undefined;
3716
+ }
3717
+ function isImplicitVariablesMapping(payload, owner) {
3718
+ return payload.name === "uipath:mapping" && !payload.attributes.type && childElements(payload, "uipath:type").length === 0 && hasLocalName(owner, "task");
3719
+ }
3720
+ function getExpectedInputName(contract) {
3721
+ if (contract.inputPattern === "splitInputsItemData") {
3722
+ return "ItemData";
3723
+ }
3724
+ if (contract.inputPattern === "scriptArgs") {
3725
+ return "args";
3726
+ }
3727
+ return contract.inputName ?? "body";
3728
+ }
3729
+ function getExpectedInputTarget(contract) {
3730
+ if (contract.inputPattern === "scriptArgs") {
3731
+ return "bodyField";
3732
+ }
3733
+ return contract.inputTarget ?? "body";
3734
+ }
3735
+ function validateInputShape(file, input, expectedName, contract, diagnostics) {
3736
+ if (input.attributes.type !== "json") {
3737
+ diagnostics.push({
3738
+ file,
3739
+ element: describeElement(input),
3740
+ message: `Input payload "${expectedName}" must declare type="json".`,
3741
+ instruction: 'Set the uipath:input type attribute to "json".'
3742
+ });
3743
+ }
3744
+ const expectedTarget = getExpectedInputTarget(contract);
3745
+ if (input.attributes.target !== expectedTarget) {
3746
+ diagnostics.push({
3747
+ file,
3748
+ element: describeElement(input),
3749
+ message: `Input payload "${expectedName}" must target "${expectedTarget}".`,
3750
+ instruction: `Set the uipath:input target attribute to "${expectedTarget}".`
3751
+ });
3752
+ }
3753
+ validateJsonPayload(file, input, `input payload "${expectedName}"`, diagnostics);
3754
+ }
3755
+ function validateTypedValue(file, node, type, value, label, diagnostics) {
3756
+ if (value === undefined || value === "") {
3757
+ return;
3758
+ }
3759
+ if (value.startsWith("=")) {
3760
+ return;
3761
+ }
3762
+ if (type === "number" && !Number.isFinite(Number(value))) {
3763
+ diagnostics.push({
3764
+ file,
3765
+ element: describeElement(node),
3766
+ message: `${label} must be a number.`,
3767
+ instruction: "Set the value to a numeric literal."
3768
+ });
3769
+ }
3770
+ if (type === "boolean" && !["true", "false"].includes(value)) {
3771
+ diagnostics.push({
3772
+ file,
3773
+ element: describeElement(node),
3774
+ message: `${label} must be a boolean.`,
3775
+ instruction: 'Set the value to "true" or "false".'
3776
+ });
3777
+ }
3778
+ if (["json", "object"].includes(type)) {
3779
+ validateJsonText(file, node, value, label, diagnostics);
3780
+ }
3781
+ }
3782
+ function validateJsonPayload(file, input, label, diagnostics) {
3783
+ const value = input.text.trim();
3784
+ if (!value || value.startsWith("=")) {
3785
+ return;
3786
+ }
3787
+ validateJsonText(file, input, value, label, diagnostics);
3788
+ }
3789
+ function validateJsonText(file, node, value, label, diagnostics) {
3790
+ try {
3791
+ JSON.parse(value);
3792
+ } catch (error) {
3793
+ diagnostics.push({
3794
+ file,
3795
+ element: describeElement(node),
3796
+ message: `${label} contains malformed JSON: ${String(error)}`,
3797
+ instruction: "Replace the payload with valid JSON.",
3798
+ severity: "error"
3799
+ });
3800
+ }
3801
+ }
3802
+ function collectInlineBindings(root, bindings) {
3803
+ for (const binding of findDescendants(root, (node) => node.name === "uipath:binding")) {
3804
+ const id = binding.attributes.id;
3805
+ if (!id) {
3806
+ continue;
3807
+ }
3808
+ bindings.set(id, {
3809
+ id,
3810
+ resource: binding.attributes.resource,
3811
+ resourceSubType: binding.attributes.resourceSubType,
3812
+ propertyAttribute: binding.attributes.propertyAttribute
3813
+ });
3814
+ }
3815
+ }
3816
+ function collectBindings(parsed) {
3817
+ const bindings = new Map;
3818
+ collectBindingRecords(parsed, bindings);
3819
+ return bindings;
3820
+ }
3821
+ function collectBindingRecords(value, bindings) {
3822
+ if (Array.isArray(value)) {
3823
+ for (const item of value) {
3824
+ collectBindingRecords(item, bindings);
3825
+ }
3826
+ return;
3827
+ }
3828
+ if (!isRecord(value)) {
3829
+ return;
3830
+ }
3831
+ const id = getStringField(value, "bindingId") ?? getStringField(value, "bindingKey") ?? getStringField(value, "id");
3832
+ if (id) {
3833
+ bindings.set(id, {
3834
+ id,
3835
+ resource: getStringField(value, "resource"),
3836
+ resourceSubType: getStringField(value, "resourceSubType"),
3837
+ propertyAttribute: getStringField(value, "propertyAttribute")
3838
+ });
3839
+ }
3840
+ for (const nested of Object.values(value)) {
3841
+ collectBindingRecords(nested, bindings);
3842
+ }
3843
+ }
3844
+ function getStringField(value, field) {
3845
+ const fieldValue = value[field];
3846
+ return typeof fieldValue === "string" && fieldValue ? fieldValue : undefined;
3847
+ }
3848
+ function isRecord(value) {
3849
+ return typeof value === "object" && value !== null && !Array.isArray(value);
3850
+ }
3851
+ function formatDiagnostic(diagnostic) {
3852
+ const element = diagnostic.element ? ` ${diagnostic.element}` : "";
3853
+ return `${diagnostic.file}${element}: ${diagnostic.message} ${diagnostic.instruction}`;
3854
+ }
3855
+ function isErrorDiagnostic(diagnostic) {
3856
+ return diagnostic.severity !== "warning";
3857
+ }
3858
+ function isWarningDiagnostic(diagnostic) {
3859
+ return diagnostic.severity === "warning";
3860
+ }
3861
+ function decodeXmlEntities(value) {
3862
+ return value.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
3863
+ }
3864
+ export {
3865
+ BpmnValidateService
3866
+ };