@uipath/case-tool 1.204.0 → 1.205.0-preview.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +24 -11
- package/dist/{authoring-6ckkzfc9.js → authoring-kqh34zzm.js} +49 -30
- package/dist/{business-rule-export-kg5bk8aw.js → business-rule-export-ey588rv7.js} +2 -2
- package/dist/canvas-notes-86fxx1t8.js +19 -0
- package/dist/{case-api-rvamfn02.js → case-api-sme7esce.js} +6 -6
- package/dist/case-bindings-service-cht20gqt.js +430 -0
- package/dist/case-debug-solution-projects-h3w2nx0a.js +34 -0
- package/dist/{case-debug-studio-web-service-xxfesw4v.js → case-debug-studio-web-service-3mkrtaet.js} +16 -10
- package/dist/{case-described-io-service-14hdnqcc.js → case-described-io-service-dx1f4nxe.js} +37 -11
- package/dist/case-event-trigger-bindings-g9ftnm4x.js +16 -0
- package/dist/{case-format-service-yb48785t.js → case-format-service-6aew6tqc.js} +2 -2
- package/dist/{case-pack-service-9185h6ez.js → case-pack-service-pqq8wnfd.js} +6 -6
- package/dist/case-schema-version-h820ne16.js +20 -0
- package/dist/{case-shape-reader-mw58avr0.js → case-shape-reader-dsbraetf.js} +1 -1
- package/dist/{case-splice-service-tkmb7xjp.js → case-splice-service-s5gccctq.js} +53 -8
- package/dist/{case-validate-service-c84e2bhv.js → case-validate-service-rey6btew.js} +128 -42
- package/dist/{connector-enrichment-service-hfv0kwht.js → connector-enrichment-service-crqs2216.js} +23 -20
- package/dist/{connector-lookup-service-whgjceyj.js → connector-lookup-service-dwv8q5eh.js} +6 -6
- package/dist/connector-task-shape-mpazkf7s.js +14 -0
- package/dist/{connector-task-spec-k0cwavrm.js → connector-task-spec-trs4tcb3.js} +196 -40
- package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
- package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
- package/dist/{debug-service-ch3v6jmm.js → debug-service-7q98j726.js} +3 -3
- package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
- package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
- package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
- package/dist/{enrichment-service-3f1kygjs.js → enrichment-service-hv7ff88p.js} +56 -12
- package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
- package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
- package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
- package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
- package/dist/filter-engine-7ep90g7f.js +11 -0
- package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
- package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
- package/dist/index-332n0kxj.js +282 -0
- package/dist/{index-wmffgzmr.js → index-5dxh9z60.js} +21751 -11098
- package/dist/{index-aw2gqqat.js → index-a2fvrrth.js} +4 -4
- package/dist/{index-4yanx3rn.js → index-ekwtgx7y.js} +1089 -218
- package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
- package/dist/index-n9qvnx4x.js +29 -0
- package/dist/{index-hhsf00x8.js → index-ngs0a2he.js} +1 -1
- package/dist/{index-j2r3jb6c.js → index-xq6ajhgq.js} +2 -2
- package/dist/index.js +12 -12
- package/dist/init-entry-points-hhpv3e3f.js +98 -0
- package/dist/{input-reader-1tcqt27f.js → input-reader-c7wz8ra2.js} +3 -3
- package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
- package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
- package/dist/{known-types-0h9kqwyy.js → known-types-jvkdgmzz.js} +5 -4
- package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
- package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
- package/dist/localSolutionDiscovery-yyx234ak.js +13 -0
- package/dist/migration-diagnosis-ns5cw4e3.js +99 -0
- package/dist/{node-strategy-5pz40tee.js → node-strategy-v442hwgd.js} +1 -1
- package/dist/node-sync-service-1wkcyn1n.js +57 -0
- package/dist/out-target-wjgmna0r.js +111 -0
- package/dist/{packager-tool-85q4f3pq.js → packager-tool-1pcmxqny.js} +3 -3
- package/dist/{packager-tool-8a9yqfq7.js → packager-tool-1yfw674x.js} +4 -2
- package/dist/{packager-tool-pdhhzfr5.js → packager-tool-29x6vran.js} +296 -417
- package/dist/packager-tool-2sn7d8fd.js +41 -0
- package/dist/packager-tool-4p11fvf4.js +92 -0
- package/dist/{packager-tool-25hng8h4.js → packager-tool-4rtktkhv.js} +16211 -13084
- package/dist/{packager-tool-yfm83bzd.js → packager-tool-67vy1fz3.js} +4 -3
- package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
- package/dist/packager-tool-7hw344bt.js +107 -0
- package/dist/{packager-tool-3q3d1hk8.js → packager-tool-83v804p7.js} +56 -6
- package/dist/{packager-tool-00y70spr.js → packager-tool-87y6xw3a.js} +2 -1
- package/dist/packager-tool-93mdeqay.js +18 -0
- package/dist/{packager-tool-64rg5ekd.js → packager-tool-9e59z4d6.js} +75 -7
- package/dist/{packager-tool-vepqrsse.js → packager-tool-9kf3fqtr.js} +2 -2
- package/dist/packager-tool-9kvkzc05.js +74 -0
- package/dist/{packager-tool-s6619wtx.js → packager-tool-9sd483vs.js} +2 -2
- package/dist/{packager-tool-f78ntj5g.js → packager-tool-9y1w2wds.js} +51 -6
- package/dist/packager-tool-a17g0pj1.js +62 -0
- package/dist/{packager-tool-167qap9m.js → packager-tool-aagnvyba.js} +845 -38
- package/dist/{packager-tool-0p6dbsp0.js → packager-tool-c5q10254.js} +5 -5
- package/dist/{packager-tool-wj9d9mqe.js → packager-tool-e15kqpyh.js} +12 -13
- package/dist/{packager-tool-c31qx8kc.js → packager-tool-ezds6t5e.js} +2 -2
- package/dist/{packager-tool-d3zvghjd.js → packager-tool-f2z2dscy.js} +308 -120
- package/dist/{packager-tool-hvzjm2nk.js → packager-tool-f8vwy92w.js} +2093 -5805
- package/dist/{packager-tool-rgpdaxbx.js → packager-tool-gx2cer6a.js} +5385 -1098
- package/dist/{packager-tool-xdxr3ync.js → packager-tool-hdxtgckw.js} +11 -1
- package/dist/{packager-tool-mr149jsw.js → packager-tool-k5cpxdm4.js} +17 -7
- package/dist/packager-tool-k6jbedyc.js +69 -0
- package/dist/packager-tool-kdhey8gz.js +153 -0
- package/dist/{packager-tool-cenvh23g.js → packager-tool-kyrm4e5m.js} +718 -87
- package/dist/packager-tool-mqy97y5f.js +52 -0
- package/dist/{packager-tool-jfysbxdt.js → packager-tool-mzf4gmph.js} +4 -4
- package/dist/packager-tool-n7w9wx62.js +25 -0
- package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
- package/dist/packager-tool-r0x3qh59.js +307 -0
- package/dist/{packager-tool-w1b5pyj6.js → packager-tool-r6b5ktzb.js} +730 -14
- package/dist/{packager-tool-zbrda9sn.js → packager-tool-rk25wp3c.js} +1 -1
- package/dist/{packager-tool-xcd87qyx.js → packager-tool-v2kcgjbf.js} +2 -3
- package/dist/{case-bindings-service-d9vezn69.js → packager-tool-wekqkmgn.js} +20 -231
- package/dist/packager-tool-yct6zp4m.js +335 -0
- package/dist/{packager-tool-kpqr938m.js → packager-tool-ydyvtknp.js} +26 -3
- package/dist/{packager-tool-v99ygh9f.js → packager-tool-yn33pw57.js} +124 -58
- package/dist/{packager-tool-4rqd21wc.js → packager-tool-yn7r7zq2.js} +19 -5
- package/dist/{packager-tool-cmwets3m.js → packager-tool-zf8f9pmm.js} +1 -1
- package/dist/packager-tool.js +3 -3
- package/dist/{project-artifacts-rng5m6r2.js → project-artifacts-bgyyb0dm.js} +1 -1
- package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
- package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
- package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
- package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
- package/dist/{resolved-check-p99hysaw.js → resolved-check-aqw7568y.js} +1 -1
- package/dist/{resourcesSyncService-zwjyp1qx.js → resourcesSyncService-d302jnap.js} +32 -170
- package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
- package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
- package/dist/{sdd-convert-service-vf0ps358.js → sdd-convert-service-8jpew7vz.js} +686 -445
- package/dist/{sdd-lookup-dwzpvvwn.js → sdd-lookup-fe900sdb.js} +2 -2
- package/dist/{sdd-resolve-service-mjqad2nn.js → sdd-resolve-service-qdtmxw9b.js} +38 -13
- package/dist/sdd-resolve-siblings-6kfxc2t6.js +53 -0
- package/dist/{solution-auth-kddmbm0p.js → solution-auth-30yycqtv.js} +3 -3
- package/dist/solution-discovery-g6ksnrg1.js +38 -0
- package/dist/{strict-case-rules-tz37bspw.js → strict-case-rules-4tjcaznr.js} +3 -2
- package/dist/{strict-entry-points-v14d7y50.js → strict-entry-points-g2pd4mf4.js} +29 -1
- package/dist/{strict-sdd-audit-4aqdeh59.js → strict-sdd-audit-q7tb9yj7.js} +7 -5
- package/dist/task-type-declaration-7a8fqdvs.js +46 -0
- package/dist/tool.js +12 -12
- package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
- package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
- package/dist/{trigger-enrichment-service-g3vt051f.js → trigger-enrichment-service-sj0p2d1j.js} +23 -20
- package/dist/trigger-entry-point-id-yhqwnkx9.js +15 -0
- package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
- package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
- package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
- package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
- package/package.json +2 -2
- package/dist/migration-diagnosis-ag2sgd1e.js +0 -71
- package/dist/node-sync-service-2tfrgbjs.js +0 -36
- package/dist/out-target-jakehnd3.js +0 -70
- package/dist/packager-tool-57pzrd0g.js +0 -32
- package/dist/packager-tool-dthjwajc.js +0 -13
- package/dist/packager-tool-xy04yy0v.js +0 -32
|
@@ -1,30 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalVariableType,
|
|
3
|
+
gateKey
|
|
4
|
+
} from "./packager-tool-k6jbedyc.js";
|
|
5
|
+
import {
|
|
6
|
+
designerShapeConnectorTasks
|
|
7
|
+
} from "./packager-tool-a17g0pj1.js";
|
|
8
|
+
import {
|
|
9
|
+
RECIPIENT_TYPES,
|
|
10
|
+
SDD_TASK_TYPES,
|
|
11
|
+
UNAUTHORABLE_TASK_TYPES,
|
|
12
|
+
bindingPairFor,
|
|
13
|
+
connectionPairFor
|
|
14
|
+
} from "./packager-tool-4p11fvf4.js";
|
|
1
15
|
import {
|
|
2
16
|
CONNECTOR_TASK_TYPES
|
|
3
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-93mdeqay.js";
|
|
18
|
+
import {
|
|
19
|
+
emitCanvasNotes
|
|
20
|
+
} from "./packager-tool-r0x3qh59.js";
|
|
4
21
|
import {
|
|
5
22
|
BINDING_REFERENCE_PREFIX,
|
|
6
23
|
NAME_BOUND_TASK_TYPES
|
|
7
|
-
} from "./packager-tool-
|
|
8
|
-
import {
|
|
9
|
-
FILE_TYPE_JSON_SCHEMA
|
|
10
|
-
} from "./packager-tool-kpqr938m.js";
|
|
24
|
+
} from "./packager-tool-87y6xw3a.js";
|
|
11
25
|
import {
|
|
12
26
|
CASE_SLA_PROPERTY,
|
|
13
27
|
DEFAULT_GROUP,
|
|
14
28
|
STAGE_SELECTOR_RULES,
|
|
15
29
|
TASK_SELECTOR_RULES,
|
|
16
30
|
VARIABLE_PLACEMENT,
|
|
17
|
-
|
|
18
|
-
|
|
31
|
+
canonicalExpression,
|
|
32
|
+
customOutputFor,
|
|
33
|
+
declaredOutputs,
|
|
34
|
+
expandOutputMarkers,
|
|
35
|
+
expandXrefs,
|
|
36
|
+
extractOutputFor,
|
|
37
|
+
inputsFor,
|
|
38
|
+
markDeferredOutputs,
|
|
39
|
+
outputFor,
|
|
40
|
+
outputTypeFor,
|
|
41
|
+
parseIfCell,
|
|
42
|
+
unquoteLiteral,
|
|
43
|
+
variableOutputType
|
|
44
|
+
} from "./packager-tool-kyrm4e5m.js";
|
|
19
45
|
import"./packager-tool-b250k6w4.js";
|
|
46
|
+
import {
|
|
47
|
+
buildElementId,
|
|
48
|
+
claim,
|
|
49
|
+
claimOutput,
|
|
50
|
+
dedupedId,
|
|
51
|
+
everySpelling,
|
|
52
|
+
indexKey,
|
|
53
|
+
modelKey,
|
|
54
|
+
referenceSpellings,
|
|
55
|
+
scopedSlaKey,
|
|
56
|
+
stageSpellings
|
|
57
|
+
} from "./packager-tool-9kvkzc05.js";
|
|
58
|
+
import {
|
|
59
|
+
BUSINESS_RULE_TASK_VERSION,
|
|
60
|
+
FILE_TYPE_JSON_SCHEMA,
|
|
61
|
+
httpRequestOutputName
|
|
62
|
+
} from "./packager-tool-ydyvtknp.js";
|
|
20
63
|
import"./packager-tool-21qfsbxn.js";
|
|
21
64
|
import {
|
|
22
65
|
namedValue,
|
|
23
66
|
withoutTrailingSlug
|
|
24
|
-
} from "./packager-tool-
|
|
67
|
+
} from "./packager-tool-9y1w2wds.js";
|
|
25
68
|
import {
|
|
26
69
|
buildMinimalCaseDocument
|
|
27
|
-
} from "./packager-tool-
|
|
70
|
+
} from "./packager-tool-v2kcgjbf.js";
|
|
28
71
|
import {
|
|
29
72
|
prefixedId
|
|
30
73
|
} from "./packager-tool-mknccck5.js";
|
|
@@ -34,8 +77,8 @@ import {
|
|
|
34
77
|
} from "./packager-tool-5qp9xza1.js";
|
|
35
78
|
import {
|
|
36
79
|
catchError
|
|
37
|
-
} from "./packager-tool-
|
|
38
|
-
import"./packager-tool-
|
|
80
|
+
} from "./packager-tool-83v804p7.js";
|
|
81
|
+
import"./packager-tool-hdxtgckw.js";
|
|
39
82
|
import"./packager-tool-1yh8g550.js";
|
|
40
83
|
|
|
41
84
|
// src/services/exit-condition-types.ts
|
|
@@ -45,413 +88,6 @@ var EXIT_CONDITION_TYPES = new Set([
|
|
|
45
88
|
"return-to-origin"
|
|
46
89
|
]);
|
|
47
90
|
|
|
48
|
-
// src/services/sdd-convert/ids.ts
|
|
49
|
-
var buildElementId = (stageId, taskId) => `${stageId}-${taskId}`;
|
|
50
|
-
var SLUG_SUFFIX = /^(.*?)\s*\(\s*([^()]+?)\s*\)\s*$/;
|
|
51
|
-
var stageSpellings = (text, position) => {
|
|
52
|
-
const plain = text.replaceAll("`", "").trim();
|
|
53
|
-
const names = [plain];
|
|
54
|
-
const found = SLUG_SUFFIX.exec(plain);
|
|
55
|
-
const bare = found?.[1].trim() ?? "";
|
|
56
|
-
const slug = found?.[2].trim() ?? "";
|
|
57
|
-
if (bare !== "" && bare !== plain)
|
|
58
|
-
names.push(bare);
|
|
59
|
-
return {
|
|
60
|
-
names,
|
|
61
|
-
...slug !== "" && { slug },
|
|
62
|
-
ordinal: `stage ${position}`
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
var referenceSpellings = (text) => {
|
|
66
|
-
const { names, slug } = stageSpellings(text, 0);
|
|
67
|
-
return slug === undefined ? names : [...names, slug];
|
|
68
|
-
};
|
|
69
|
-
var indexKey = (name) => name.replaceAll("`", "").trim().toLowerCase();
|
|
70
|
-
var everySpelling = (name, position) => {
|
|
71
|
-
const { names, slug, ordinal } = stageSpellings(name, position);
|
|
72
|
-
return [...names, ...slug === undefined ? [] : [slug], ordinal].map(indexKey);
|
|
73
|
-
};
|
|
74
|
-
var claim = (index, key, id) => {
|
|
75
|
-
if (!index.has(key))
|
|
76
|
-
index.set(key, id);
|
|
77
|
-
};
|
|
78
|
-
var dedupedId = (base, taken) => {
|
|
79
|
-
let id = base;
|
|
80
|
-
let suffix = 2;
|
|
81
|
-
while (taken.has(id)) {
|
|
82
|
-
id = `${base}${suffix}`;
|
|
83
|
-
suffix += 1;
|
|
84
|
-
}
|
|
85
|
-
taken.add(id);
|
|
86
|
-
return id;
|
|
87
|
-
};
|
|
88
|
-
var exactKey = (name) => name.replaceAll("`", "").trim();
|
|
89
|
-
var claimOutput = (index, key, task, id) => {
|
|
90
|
-
const byTask = index.get(key) ?? new Map;
|
|
91
|
-
index.set(key, byTask);
|
|
92
|
-
if (!byTask.has(exactKey(task)))
|
|
93
|
-
byTask.set(exactKey(task), id);
|
|
94
|
-
};
|
|
95
|
-
var lookupOutput = (index, key, task) => {
|
|
96
|
-
const byTask = index.get(key);
|
|
97
|
-
if (byTask === undefined)
|
|
98
|
-
return;
|
|
99
|
-
const tasksNamed = (name, claim2) => typeof claim2 === "number" ? Array.from({ length: claim2 }, () => name) : [name];
|
|
100
|
-
const exact = byTask.get(exactKey(task));
|
|
101
|
-
if (exact !== undefined) {
|
|
102
|
-
return typeof exact === "number" ? { names: tasksNamed(exactKey(task), exact) } : { id: exact };
|
|
103
|
-
}
|
|
104
|
-
const [onlyName, only] = [...byTask.entries()][0] ?? [];
|
|
105
|
-
if (byTask.size === 1 && onlyName !== undefined && typeof only === "string") {
|
|
106
|
-
return { id: only };
|
|
107
|
-
}
|
|
108
|
-
return {
|
|
109
|
-
names: [...byTask].flatMap(([name, claim2]) => tasksNamed(name, claim2))
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
var scopedSlaKey = (scope, title) => `${scope}\x00${title}`;
|
|
113
|
-
|
|
114
|
-
// src/services/sdd-convert/xrefs.ts
|
|
115
|
-
var QUOTED = String.raw`(?:'((?:\\.|[^'\\])*)'|"((?:\\.|[^"\\])*)"|` + "`((?:\\\\.|[^`\\\\])*)`" + String.raw`|\u201c([^\u201d]*)\u201d)`;
|
|
116
|
-
var XREF_CALL = new RegExp(String.raw`vars\.\$xref\(\s*${QUOTED}\s*,\s*${QUOTED}\s*,\s*${QUOTED}\s*\)`, "g");
|
|
117
|
-
var argumentOf = (groups) => groups.find((value) => value !== undefined) ?? "";
|
|
118
|
-
var unresolvedXrefDetail = (whole, found) => {
|
|
119
|
-
if (found === undefined) {
|
|
120
|
-
return `\`${whole}\` names an output this SDD does not declare, so the marker is left in place rather than pointed at a guess`;
|
|
121
|
-
}
|
|
122
|
-
const spellings = new Set(found.names);
|
|
123
|
-
const listed = [...spellings].map((name) => `\`${name}\``).join(", ");
|
|
124
|
-
if (spellings.size < found.names.length) {
|
|
125
|
-
return `\`${whole}\` names a task that ${found.names.length} tasks in that stage answer to (${listed}), so the marker is left in place rather than pointed at one of them. Task names are unique across the case, so rename all but one`;
|
|
126
|
-
}
|
|
127
|
-
return `\`${whole}\` names its task in a spelling that ${found.names.length} tasks answer to (${listed}), so the marker is left in place rather than pointed at one of them — write the task's name as its heading spells it`;
|
|
128
|
-
};
|
|
129
|
-
var DOTTED_READ = /^\.[A-Za-z_$]/;
|
|
130
|
-
var deferredOutputs = new WeakMap;
|
|
131
|
-
var markDeferredOutputs = (index, ids) => {
|
|
132
|
-
deferredOutputs.set(index, ids);
|
|
133
|
-
};
|
|
134
|
-
var expandXrefs = (text, context) => text.replace(XREF_CALL, (whole, ...rest) => {
|
|
135
|
-
const offset = rest[rest.length - 2];
|
|
136
|
-
const captured = rest.slice(0, -2);
|
|
137
|
-
const stage = argumentOf(captured.slice(0, 4));
|
|
138
|
-
const task = argumentOf(captured.slice(4, 8));
|
|
139
|
-
const output = argumentOf(captured.slice(8, 12));
|
|
140
|
-
const found = lookupOutput(context.outputs, `${indexKey(stage)}|${indexKey(task)}|${indexKey(output)}`, task);
|
|
141
|
-
if (found !== undefined && "id" in found) {
|
|
142
|
-
if (deferredOutputs.get(context.outputs)?.has(found.id)) {
|
|
143
|
-
context.unresolved.push({
|
|
144
|
-
kind: "placeholder",
|
|
145
|
-
where: context.where,
|
|
146
|
-
detail: `\`${whole}\` reads an output of a task the resolved file defers, so \`vars.${found.id}\` resolves to nothing until that task is filled`
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
const after = text.slice(offset + whole.length);
|
|
150
|
-
return DOTTED_READ.test(after) ? `vars.${found.id}?` : `vars.${found.id}`;
|
|
151
|
-
}
|
|
152
|
-
context.unresolved.push({
|
|
153
|
-
kind: "producer-reference",
|
|
154
|
-
where: context.where,
|
|
155
|
-
detail: unresolvedXrefDetail(whole, found)
|
|
156
|
-
});
|
|
157
|
-
return whole;
|
|
158
|
-
});
|
|
159
|
-
var expandOutputMarkers = (output, context) => {
|
|
160
|
-
const expand = (value2) => typeof value2 === "string" && value2.includes("$xref") ? expandXrefs(value2, context) : value2;
|
|
161
|
-
const value = expand(output.value);
|
|
162
|
-
const source = expand(output.source);
|
|
163
|
-
return value === output.value && source === output.source ? output : { ...output, value, source };
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// src/services/sdd-convert/io.ts
|
|
167
|
-
var taskMatcher = (model, taskName) => {
|
|
168
|
-
const mine = exactKey(taskName);
|
|
169
|
-
const folded = indexKey(taskName);
|
|
170
|
-
let unique = true;
|
|
171
|
-
for (const stage of model.stages) {
|
|
172
|
-
for (const other of stage.tasks) {
|
|
173
|
-
const name = exactKey(String(other.name ?? ""));
|
|
174
|
-
if (name !== mine && indexKey(name) === folded)
|
|
175
|
-
unique = false;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
return {
|
|
179
|
-
names: (spelled) => exactKey(spelled) === mine || unique && indexKey(spelled) === folded,
|
|
180
|
-
unique
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
var declaredOutputs = (model, stageName, position, task) => {
|
|
184
|
-
const taskName = String(task.name ?? "");
|
|
185
|
-
const { names: own, slug, ordinal } = stageSpellings(stageName, position);
|
|
186
|
-
const names = [...own, ...slug === undefined ? [] : [slug], ordinal].map(indexKey);
|
|
187
|
-
const matcher = taskMatcher(model, taskName);
|
|
188
|
-
const mine = (producer) => names.includes(indexKey(producer.stage)) && matcher.names(producer.task);
|
|
189
|
-
const rows = [...task.outputRows ?? []];
|
|
190
|
-
const add = (name) => {
|
|
191
|
-
if (name !== "" && !rows.includes(name))
|
|
192
|
-
rows.push(name);
|
|
193
|
-
};
|
|
194
|
-
for (const producer of model.xrefOutputs) {
|
|
195
|
-
if (mine(producer))
|
|
196
|
-
add(producer.output);
|
|
197
|
-
}
|
|
198
|
-
for (const stage of model.stages) {
|
|
199
|
-
for (const other of stage.tasks) {
|
|
200
|
-
for (const row of other.producerInputs ?? []) {
|
|
201
|
-
const producer = row.producer;
|
|
202
|
-
if (producer !== undefined && mine(producer)) {
|
|
203
|
-
add(producer.output);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
if (matcher.unique) {
|
|
209
|
-
for (const name of model.resourceOutputs[indexKey(taskName)] ?? []) {
|
|
210
|
-
add(name);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return rows;
|
|
214
|
-
};
|
|
215
|
-
var OUTPUT_TYPES = new Map([
|
|
216
|
-
["string", "string"],
|
|
217
|
-
["object", "jsonSchema"],
|
|
218
|
-
["json", "jsonSchema"],
|
|
219
|
-
["jsonschema", "jsonSchema"]
|
|
220
|
-
]);
|
|
221
|
-
var outputTypeFor = (model, stageNames, taskName, output) => {
|
|
222
|
-
const matcher = taskMatcher(model, taskName);
|
|
223
|
-
for (const stage of model.stages) {
|
|
224
|
-
for (const task of stage.tasks) {
|
|
225
|
-
for (const row of task.producerInputs ?? []) {
|
|
226
|
-
const producer = row.producer;
|
|
227
|
-
if (producer === undefined || row.direct !== true || typeof row.type !== "string" || !stageNames.includes(indexKey(producer.stage)) || !matcher.names(producer.task) || indexKey(producer.output) !== indexKey(output)) {
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
const mapped = OUTPUT_TYPES.get(row.type.trim().toLowerCase().replaceAll(" ", ""));
|
|
231
|
-
if (mapped !== undefined)
|
|
232
|
-
return mapped;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return;
|
|
237
|
-
};
|
|
238
|
-
var outputFor = (row, elementId, taken, type) => {
|
|
239
|
-
const leaf = row.split(".").at(-1) ?? row;
|
|
240
|
-
const base = leaf === "" ? leaf : `${leaf[0].toLowerCase()}${leaf.slice(1)}`;
|
|
241
|
-
const id = dedupedId(base, taken);
|
|
242
|
-
return {
|
|
243
|
-
name: leaf,
|
|
244
|
-
...type !== undefined && { type },
|
|
245
|
-
id,
|
|
246
|
-
var: id,
|
|
247
|
-
value: id,
|
|
248
|
-
source: `=${row}`,
|
|
249
|
-
target: `=${id}`,
|
|
250
|
-
elementId
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
var variableOutputType = (model, variable) => {
|
|
254
|
-
const declared = model.variableTypes[indexKey(variable)];
|
|
255
|
-
if (typeof declared !== "string" || declared.trim() === "") {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
const key = declared.trim().toLowerCase().replaceAll(" ", "");
|
|
259
|
-
return OUTPUT_TYPES.get(key) ?? "string";
|
|
260
|
-
};
|
|
261
|
-
var extractOutputFor = (row, elementId, taken, type) => {
|
|
262
|
-
const leaf = row.field.split(".").at(-1) ?? row.field;
|
|
263
|
-
const base = leaf === "" ? leaf : `${leaf[0].toLowerCase()}${leaf.slice(1)}`;
|
|
264
|
-
const id = dedupedId(base, taken);
|
|
265
|
-
return {
|
|
266
|
-
name: leaf,
|
|
267
|
-
...type !== undefined && { type },
|
|
268
|
-
id,
|
|
269
|
-
var: row.variable,
|
|
270
|
-
value: row.variable,
|
|
271
|
-
source: `=${row.field}`,
|
|
272
|
-
target: `=${id}`,
|
|
273
|
-
originalVar: id,
|
|
274
|
-
elementId
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
var customOutputFor = (row, type) => ({
|
|
278
|
-
name: row.variable,
|
|
279
|
-
...type !== undefined && { type },
|
|
280
|
-
custom: true,
|
|
281
|
-
var: row.variable,
|
|
282
|
-
value: canonicalExpression(unquoteLiteral(row.expression)),
|
|
283
|
-
source: canonicalExpression(unquoteLiteral(row.expression)),
|
|
284
|
-
target: "",
|
|
285
|
-
body: "",
|
|
286
|
-
elementId: "root"
|
|
287
|
-
});
|
|
288
|
-
var canonicalExpression = (value) => value.startsWith("=metadata.") ? `=js:${value.slice(1)}` : value;
|
|
289
|
-
var unquoteLiteral = (cell) => {
|
|
290
|
-
const text = cell.trim();
|
|
291
|
-
const quote = text[0];
|
|
292
|
-
if (quote !== '"' && quote !== "'")
|
|
293
|
-
return cell;
|
|
294
|
-
if (text.length < 2 || text[text.length - 1] !== quote)
|
|
295
|
-
return cell;
|
|
296
|
-
const inner = text.slice(1, -1);
|
|
297
|
-
for (let at = 0;at < inner.length; at += 1) {
|
|
298
|
-
if (inner[at] === "\\") {
|
|
299
|
-
at += 1;
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
if (inner[at] === quote)
|
|
303
|
-
return cell;
|
|
304
|
-
}
|
|
305
|
-
return inner.replaceAll(`\\${quote}`, quote);
|
|
306
|
-
};
|
|
307
|
-
var RANK_LITERAL = 1;
|
|
308
|
-
var RANK_PRODUCER = 2;
|
|
309
|
-
var RANK_EXPRESSION = 3;
|
|
310
|
-
var unboundProducerDetail = (target, found) => {
|
|
311
|
-
if (found === undefined) {
|
|
312
|
-
return `the Inputs row reads an output (${target}) that no task in this SDD declares`;
|
|
313
|
-
}
|
|
314
|
-
const spellings = new Set(found.names);
|
|
315
|
-
const listed = [...spellings].map((task) => `"${task}"`).join(", ");
|
|
316
|
-
if (spellings.size < found.names.length) {
|
|
317
|
-
return `the Inputs row reads an output (${target}) of a task that ${found.names.length} tasks in that stage answer to (${listed}), so it is left unbound rather than pointed at one of them. Task names are unique across the case, so rename all but one`;
|
|
318
|
-
}
|
|
319
|
-
return `the Inputs row reads an output (${target}) whose task spelling ${found.names.length} tasks answer to (${listed}), so it is left unbound rather than pointed at one of them`;
|
|
320
|
-
};
|
|
321
|
-
var inputsFor = (task, elementId, where, unresolved, outputs) => {
|
|
322
|
-
const ranked = new Map;
|
|
323
|
-
const offer = (name, rank, input) => {
|
|
324
|
-
const existing = ranked.get(name);
|
|
325
|
-
if (existing === undefined || rank > existing.rank) {
|
|
326
|
-
ranked.set(name, { rank, input });
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
for (const row of task.literalInputs ?? []) {
|
|
330
|
-
offer(String(row.name ?? ""), RANK_LITERAL, {
|
|
331
|
-
name: String(row.name ?? ""),
|
|
332
|
-
value: unquoteLiteral(String(row.value ?? "")),
|
|
333
|
-
elementId
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
for (const row of task.expressionInputs ?? []) {
|
|
337
|
-
offer(String(row.name ?? ""), RANK_EXPRESSION, {
|
|
338
|
-
name: String(row.name ?? ""),
|
|
339
|
-
value: canonicalExpression(expandXrefs(String(row.expression ?? row.value ?? ""), {
|
|
340
|
-
outputs,
|
|
341
|
-
where,
|
|
342
|
-
unresolved
|
|
343
|
-
})),
|
|
344
|
-
elementId
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
for (const row of task.producerInputs ?? []) {
|
|
348
|
-
const name = String(row.name ?? "");
|
|
349
|
-
const producer = row.producer;
|
|
350
|
-
const found = producer === undefined ? undefined : lookupOutput(outputs, `${indexKey(producer.stage)}|${indexKey(producer.task)}|${indexKey(producer.output)}`, producer.task);
|
|
351
|
-
if (found === undefined || !("id" in found)) {
|
|
352
|
-
const target = producer === undefined ? "unnamed producer" : `"${producer.stage}"."${producer.task}".${producer.output}`;
|
|
353
|
-
unresolved.push({
|
|
354
|
-
kind: "producer-reference",
|
|
355
|
-
where: `${where}.inputs[${name}]`,
|
|
356
|
-
detail: unboundProducerDetail(target, found)
|
|
357
|
-
});
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
const id = found.id;
|
|
361
|
-
offer(name, RANK_PRODUCER, {
|
|
362
|
-
name,
|
|
363
|
-
value: row.direct === false ? expandXrefs(String(row.value ?? `=js:vars.${id}`), {
|
|
364
|
-
outputs,
|
|
365
|
-
where,
|
|
366
|
-
unresolved
|
|
367
|
-
}) : `=vars.${id}`,
|
|
368
|
-
elementId
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
return [...ranked.values()].map((entry) => entry.input);
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
// src/services/sdd-convert/resources.ts
|
|
375
|
-
var SDD_TASK_TYPES = new Set([
|
|
376
|
-
...NAME_BOUND_TASK_TYPES,
|
|
377
|
-
...CONNECTOR_TASK_TYPES,
|
|
378
|
-
"wait-for-timer"
|
|
379
|
-
]);
|
|
380
|
-
var UNAUTHORABLE_TASK_TYPES = new Set([
|
|
381
|
-
"document-extraction",
|
|
382
|
-
"external-agent",
|
|
383
|
-
"external-workflow",
|
|
384
|
-
"flow-process",
|
|
385
|
-
"http-request",
|
|
386
|
-
"script"
|
|
387
|
-
]);
|
|
388
|
-
var RESOURCE_KINDS = new Map([
|
|
389
|
-
["agent", { resource: "process", subType: "Agent" }],
|
|
390
|
-
["process", { resource: "process", subType: "ProcessOrchestration" }],
|
|
391
|
-
["api-workflow", { resource: "process", subType: "Api" }],
|
|
392
|
-
["case-management", { resource: "process", subType: "CaseManagement" }],
|
|
393
|
-
["function", { resource: "process", subType: "Function" }],
|
|
394
|
-
["rpa", { resource: "process" }],
|
|
395
|
-
["business-rule", { resource: "BusinessRule" }],
|
|
396
|
-
["action", { resource: "app" }]
|
|
397
|
-
]);
|
|
398
|
-
var bindingPairFor = (resourceName, folderPath, type, ordinal) => {
|
|
399
|
-
const resourceKey = `${folderPath}.${resourceName}`;
|
|
400
|
-
const kind = RESOURCE_KINDS.get(type) ?? { resource: "process" };
|
|
401
|
-
const shared = {
|
|
402
|
-
type: "string",
|
|
403
|
-
resource: kind.resource,
|
|
404
|
-
...kind.subType !== undefined && { resourceSubType: kind.subType },
|
|
405
|
-
resourceKey
|
|
406
|
-
};
|
|
407
|
-
const nameId = `bN${ordinal}`;
|
|
408
|
-
const folderId = `bF${ordinal}`;
|
|
409
|
-
return {
|
|
410
|
-
nameId,
|
|
411
|
-
folderId,
|
|
412
|
-
name: {
|
|
413
|
-
id: nameId,
|
|
414
|
-
name: "name",
|
|
415
|
-
...shared,
|
|
416
|
-
default: resourceName,
|
|
417
|
-
propertyAttribute: "name"
|
|
418
|
-
},
|
|
419
|
-
folder: {
|
|
420
|
-
id: folderId,
|
|
421
|
-
name: "folderPath",
|
|
422
|
-
...shared,
|
|
423
|
-
default: folderPath,
|
|
424
|
-
propertyAttribute: "folderPath"
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
var RECIPIENT_TYPES = new Map([["email", 2]]);
|
|
429
|
-
var connectionPairFor = (connectionId, ordinal) => {
|
|
430
|
-
const shared = {
|
|
431
|
-
type: "string",
|
|
432
|
-
resource: "Connection",
|
|
433
|
-
resourceKey: connectionId
|
|
434
|
-
};
|
|
435
|
-
const connectionRef = `bOC${ordinal}`;
|
|
436
|
-
const folderRef = `bOF${ordinal}`;
|
|
437
|
-
return {
|
|
438
|
-
connectionRef,
|
|
439
|
-
folderRef,
|
|
440
|
-
connection: {
|
|
441
|
-
id: connectionRef,
|
|
442
|
-
name: "connection",
|
|
443
|
-
...shared,
|
|
444
|
-
propertyAttribute: "ConnectionId"
|
|
445
|
-
},
|
|
446
|
-
folder: {
|
|
447
|
-
id: folderRef,
|
|
448
|
-
name: "folderKey",
|
|
449
|
-
...shared,
|
|
450
|
-
propertyAttribute: "folderKey"
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
};
|
|
454
|
-
|
|
455
91
|
// src/services/sdd-convert/connector.ts
|
|
456
92
|
var connectorInputs = (inputs, connector, elementId, where, unresolved) => {
|
|
457
93
|
if (connector === undefined)
|
|
@@ -737,19 +373,41 @@ var ruleFor = (condition, idPrefix, context) => {
|
|
|
737
373
|
context.unresolved.push({
|
|
738
374
|
kind: "connector-connection",
|
|
739
375
|
where: context.where,
|
|
740
|
-
detail: "a `wait-for-connector` rule needs its activity's context, and no `**Connector Rule Detail:**` accompanies this stage's entry table"
|
|
376
|
+
detail: "a `wait-for-connector` rule needs its activity's context, and no `**Connector Rule Detail:**` accompanies this stage's entry table, so the rule is written with an empty `context` to fill before debug"
|
|
741
377
|
});
|
|
378
|
+
base.uipath = {
|
|
379
|
+
serviceType: WAIT_FOR_EVENT,
|
|
380
|
+
context: [],
|
|
381
|
+
inputs: [],
|
|
382
|
+
outputs: [],
|
|
383
|
+
bindings: []
|
|
384
|
+
};
|
|
742
385
|
} else {
|
|
386
|
+
const built = connectorContextFor(context.connector, context.where, context.connections, context.bindings, context.unresolved).filter((entry) => entry.name !== "operation" || context.connector?.operation !== undefined);
|
|
387
|
+
const missing = missingActivitySlots(built);
|
|
388
|
+
if (missing.length > 0) {
|
|
389
|
+
context.unresolved.push({
|
|
390
|
+
kind: "connector-context",
|
|
391
|
+
where: context.where,
|
|
392
|
+
detail: `the document names no ${missing.map((name) => `\`${name}\``).join(" or ")} for this \`wait-for-connector\` rule, so it is left out of the rule's \`context\`, to fill before debug`
|
|
393
|
+
});
|
|
394
|
+
}
|
|
743
395
|
base.uipath = {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
396
|
+
serviceType: WAIT_FOR_EVENT,
|
|
397
|
+
context: built,
|
|
398
|
+
...missing.length > 0 && {
|
|
399
|
+
inputs: [],
|
|
400
|
+
outputs: [],
|
|
401
|
+
bindings: []
|
|
402
|
+
}
|
|
748
403
|
};
|
|
749
404
|
}
|
|
750
405
|
}
|
|
751
406
|
return base;
|
|
752
407
|
};
|
|
408
|
+
var WAIT_FOR_EVENT = "Intsvc.WaitForEvent";
|
|
409
|
+
var ACTIVITY_SLOTS = ["connectorKey", "operation"];
|
|
410
|
+
var missingActivitySlots = (entries) => ACTIVITY_SLOTS.filter((name) => !entries.some((entry) => entry.name === name && typeof entry.value === "string" && entry.value !== ""));
|
|
753
411
|
var displayNameOf = (condition) => {
|
|
754
412
|
const name = String(condition.displayName ?? "").trim();
|
|
755
413
|
return name === "" ? {} : { displayName: name };
|
|
@@ -932,6 +590,91 @@ var slaRuleFor = (displayName, duration, rows, where, unresolved, asked = {}) =>
|
|
|
932
590
|
...escalations.length > 0 && { escalationRule: escalations }
|
|
933
591
|
};
|
|
934
592
|
};
|
|
593
|
+
var conditionalSlaRules = (rows, where, unresolved, expand, hasDefault, defaultDuration, escalate, reportNoDefault = true) => {
|
|
594
|
+
const escalationsFor = (duration) => {
|
|
595
|
+
const copied = escalate?.(duration, [])?.escalationRule;
|
|
596
|
+
if (!Array.isArray(copied) || copied.length === 0)
|
|
597
|
+
return {};
|
|
598
|
+
const escalationRule = copied;
|
|
599
|
+
const breaches = escalationRule.some((one) => one.triggerInfo?.type === "sla-breached");
|
|
600
|
+
return {
|
|
601
|
+
escalationRule: breaches ? escalationRule : [
|
|
602
|
+
...escalationRule,
|
|
603
|
+
{
|
|
604
|
+
id: prefixedId("esc_", 6),
|
|
605
|
+
displayName: "SLA breached",
|
|
606
|
+
triggerInfo: { type: "sla-breached" }
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
const rules = [];
|
|
612
|
+
const unconditional = [];
|
|
613
|
+
const gates = new Map;
|
|
614
|
+
for (const [at, row] of rows.entries()) {
|
|
615
|
+
const here = `${where}[${row.displayName ?? at}]`;
|
|
616
|
+
const parts = SLA_DURATION.exec(row.duration.trim());
|
|
617
|
+
const unit = parts === null ? undefined : SLA_UNITS.get(parts[2].toLowerCase());
|
|
618
|
+
const expression = row.expression.trim();
|
|
619
|
+
if (parts === null || unit === undefined || !expression.startsWith("=")) {
|
|
620
|
+
unresolved.push({
|
|
621
|
+
kind: "case-sla",
|
|
622
|
+
where: here,
|
|
623
|
+
detail: `the conditional SLA rule ${row.displayName === undefined ? `\`${expression}\`` : `"${row.displayName}"`} ${!expression.startsWith("=") ? "states its condition as prose, not an `=` expression" : `has the duration \`${row.duration}\`, which gives no count and unit`}, so it is left out rather than guessed at`
|
|
624
|
+
});
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
627
|
+
const rule = {
|
|
628
|
+
id: prefixedId("sla_", 6),
|
|
629
|
+
...row.displayName !== undefined && {
|
|
630
|
+
displayName: row.displayName
|
|
631
|
+
},
|
|
632
|
+
expression: canonicalExpression(expand(expression, `${here}.expression`)),
|
|
633
|
+
count: Number(parts[1]),
|
|
634
|
+
unit,
|
|
635
|
+
...escalationsFor(row.duration)
|
|
636
|
+
};
|
|
637
|
+
if (/^=js:\s*true\s*$/.test(expression)) {
|
|
638
|
+
if (!hasDefault && unconditional.length === 0) {
|
|
639
|
+
const escalationRule = escalate?.(row.duration, unresolved)?.escalationRule;
|
|
640
|
+
const { escalationRule: _copied, ...bare } = rule;
|
|
641
|
+
unconditional.push(escalationRule === undefined ? bare : { ...bare, escalationRule });
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
644
|
+
const kept = defaultDuration ?? (unconditional[0] === undefined ? undefined : `${String(unconditional[0].count)} ${String(unconditional[0].unit)}`);
|
|
645
|
+
if (kept !== undefined && kept !== `${rule.count} ${unit}`) {
|
|
646
|
+
unresolved.push({
|
|
647
|
+
kind: "case-sla",
|
|
648
|
+
where: here,
|
|
649
|
+
detail: `the SLA table restates the default as \`${row.duration}\`, and the default is already ${kept}; the first is kept, and the document has to say which it means`
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
continue;
|
|
653
|
+
}
|
|
654
|
+
const earlier = gates.get(gateKey(rule.expression));
|
|
655
|
+
if (earlier !== undefined) {
|
|
656
|
+
unresolved.push({
|
|
657
|
+
kind: "case-sla",
|
|
658
|
+
where: here,
|
|
659
|
+
detail: `the conditional SLA rule ${row.displayName === undefined ? `\`${expression}\`` : `"${row.displayName}"`} has the same condition as ${earlier}, and only the first rule whose condition holds applies, so it is left out; the document has to say which duration that condition takes`
|
|
660
|
+
});
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
gates.set(gateKey(rule.expression), row.displayName === undefined ? `row ${at + 1}` : `"${row.displayName}"`);
|
|
664
|
+
rules.push(rule);
|
|
665
|
+
}
|
|
666
|
+
if (rules.length > 0 && !hasDefault && unconditional.length === 0) {
|
|
667
|
+
if (!reportNoDefault)
|
|
668
|
+
return [];
|
|
669
|
+
unresolved.push({
|
|
670
|
+
kind: "case-sla",
|
|
671
|
+
where,
|
|
672
|
+
detail: `the SLA table gives ${rules.length === 1 ? "a conditional rule" : `${rules.length} conditional rules`} and no default — no Duration cell and no \`=js:true\` row — and the engine runs its last rule unconditionally, so none of them is written; the document has to state the duration that applies otherwise`
|
|
673
|
+
});
|
|
674
|
+
return [];
|
|
675
|
+
}
|
|
676
|
+
return [...rules, ...unconditional];
|
|
677
|
+
};
|
|
935
678
|
|
|
936
679
|
// src/services/sdd-convert/triggers.ts
|
|
937
680
|
var MANUAL_TRIGGERS = new Set(["manual", "none", "n/a", "na"]);
|
|
@@ -1016,10 +759,23 @@ var boundTriggerFor = (declared, triggers) => {
|
|
|
1016
759
|
ambiguous: callable.length === 0 ? "every declared trigger is a timer, so none of them is the one a caller starts the case through" : `${callable.length} of the declared triggers are non-timer, so which one a blank \`sourceTriggers\` means is not stated`
|
|
1017
760
|
};
|
|
1018
761
|
};
|
|
762
|
+
var variableTypeFor = (name, declared, unresolved) => {
|
|
763
|
+
if (declared === undefined)
|
|
764
|
+
return "string";
|
|
765
|
+
const known = canonicalVariableType(declared);
|
|
766
|
+
if (known !== undefined)
|
|
767
|
+
return known.type;
|
|
768
|
+
unresolved.push({
|
|
769
|
+
kind: "variable-type",
|
|
770
|
+
where: `variables[${name}].type`,
|
|
771
|
+
detail: `"${name}" is declared \`${declared}\`, which is no case variable type — the Case Designer writes string, integer, float, double, boolean, datetime, date, time, object, file, array or jsonSchema — so it is written as declared, and validate reports it until the Type cell names one of them`
|
|
772
|
+
});
|
|
773
|
+
return declared;
|
|
774
|
+
};
|
|
1019
775
|
var jsonSchemaBody = (name, type, model, unresolved) => {
|
|
1020
776
|
if (type !== "jsonSchema")
|
|
1021
777
|
return;
|
|
1022
|
-
const declared = model.variableBodies?.[
|
|
778
|
+
const declared = model.variableBodies?.[modelKey(name)];
|
|
1023
779
|
if (declared === undefined || declared.trim() === "") {
|
|
1024
780
|
unresolved.push({
|
|
1025
781
|
kind: "variable-body",
|
|
@@ -1041,7 +797,7 @@ var jsonSchemaBody = (name, type, model, unresolved) => {
|
|
|
1041
797
|
};
|
|
1042
798
|
var caseVariablesFor = (model, triggers = [], unresolved = []) => {
|
|
1043
799
|
const buckets = { inputs: [], outputs: [], inputOutputs: [], bridges: new Map };
|
|
1044
|
-
const categorised = model.variables.filter((name) => model.variableCategories[
|
|
800
|
+
const categorised = model.variables.filter((name) => model.variableCategories[modelKey(name)] !== undefined).length;
|
|
1045
801
|
if (model.variables.length > 0 && categorised === 0) {
|
|
1046
802
|
unresolved.push({
|
|
1047
803
|
kind: "variable-category",
|
|
@@ -1050,7 +806,7 @@ var caseVariablesFor = (model, triggers = [], unresolved = []) => {
|
|
|
1050
806
|
});
|
|
1051
807
|
}
|
|
1052
808
|
for (const name of model.variables) {
|
|
1053
|
-
const key =
|
|
809
|
+
const key = modelKey(name);
|
|
1054
810
|
const declaredCategory = model.variableCategories[key];
|
|
1055
811
|
if (declaredCategory === undefined && categorised > 0) {
|
|
1056
812
|
unresolved.push({
|
|
@@ -1062,7 +818,7 @@ var caseVariablesFor = (model, triggers = [], unresolved = []) => {
|
|
|
1062
818
|
const category = declaredCategory ?? "variable";
|
|
1063
819
|
const groups = VARIABLE_PLACEMENT.get(category) ?? ["inputOutputs"];
|
|
1064
820
|
const carriesDefault = DEFAULT_GROUP.get(category) ?? "inputOutputs";
|
|
1065
|
-
const type = model.variableTypes[key]
|
|
821
|
+
const type = variableTypeFor(name, model.variableTypes[key], unresolved);
|
|
1066
822
|
const body = jsonSchemaBody(name, type, model, unresolved);
|
|
1067
823
|
const fileBody = category === "in" && type === "file" ? FILE_TYPE_JSON_SCHEMA : undefined;
|
|
1068
824
|
const declared = model.variableDefaults[key] ?? "";
|
|
@@ -1247,15 +1003,17 @@ var finishCaseDocument = (document, model, index, unresolved) => {
|
|
|
1247
1003
|
detail: "no stage declares a `case-entered` entry condition, so nothing makes a first stage eligible and the case never starts"
|
|
1248
1004
|
});
|
|
1249
1005
|
}
|
|
1250
|
-
const slaRules = index.
|
|
1006
|
+
const slaRules = index.caseSlaRules;
|
|
1251
1007
|
if (slaRules.length > 0) {
|
|
1252
1008
|
document.metadata = { ...document.metadata, slaRules };
|
|
1253
|
-
}
|
|
1009
|
+
}
|
|
1010
|
+
const hasDefaultRule = slaRules.some((rule) => /^=js:\s*true\s*$/.test(String(rule.expression ?? "")));
|
|
1011
|
+
if (!hasDefaultRule && (model.caseSla === true || /\d/.test(String(model.caseSlaDuration ?? "")))) {
|
|
1254
1012
|
const stated = String(model.caseSlaDuration ?? "").trim();
|
|
1255
1013
|
unresolved.push({
|
|
1256
1014
|
kind: "case-sla",
|
|
1257
1015
|
where: "metadata.slaRules",
|
|
1258
|
-
detail: `this SDD declares a case SLA but no rule could be emitted from it: the duration cell is ${stated === "" ? "absent" : `\`${stated}\`, which gives no count and unit`}. Any conditional rules or escalations it declares outside a recognised SLA heading are not carried either — a combined rule table under a heading like \`SLA Escalation\`, or a condition written as prose rather than an expression, is left for authoring rather than guessed at`
|
|
1016
|
+
detail: `this SDD declares a case SLA but no default rule could be emitted from it: the duration cell is ${stated === "" ? "absent" : `\`${stated}\`, which gives no count and unit`}. Any conditional rules or escalations it declares outside a recognised SLA heading are not carried either — a combined rule table under a heading like \`SLA Escalation\`, or a condition written as prose rather than an expression, is left for authoring rather than guessed at. Conditional rules it does declare are dropped with the default, since without one the engine runs the last rule for every case`
|
|
1259
1017
|
});
|
|
1260
1018
|
}
|
|
1261
1019
|
const caseVariables = caseVariablesFor(model, emittedTriggers, unresolved);
|
|
@@ -1315,6 +1073,331 @@ var finishCaseDocument = (document, model, index, unresolved) => {
|
|
|
1315
1073
|
}
|
|
1316
1074
|
return { conditionCount };
|
|
1317
1075
|
};
|
|
1076
|
+
// src/services/sdd-convert/http-request-metadata.json
|
|
1077
|
+
var http_request_metadata_default = {
|
|
1078
|
+
activityPropertyConfiguration: {
|
|
1079
|
+
configuration: '=jsonString:{"essentialConfiguration":{"connectorVersion":"1.5.3","scriptRef":null,"customFieldsRequestDetails":null,"instanceParameters":{"connectorKey":"uipath-uipath-http","objectName":"http-request","httpMethod":"POST","activityType":"Curated","version":"1.0.0","supportsStreaming":false,"subType":"method"},"objectName":"http-request","operation":"create","packageVersion":"1.0.0","httpMethod":"POST","path":"/http-request","unifiedTypesCompatible":true,"savedJitInputFieldId":"in_http-request"},"optionalConfiguration":{"_textBlocks":[{"name":"contentTypeNotice","text":"The content-type header must be application/json.","position":"above"}],"objectActions":[],"connectorName":"HTTP","agentIdentity":null,"maxPageSize":100,"jobArguments":null,"isAutopilotInvalidConfig":false,"additionalHeaders":null,"cachedLookupValues":[],"cachedBrowserItems":[],"cachedPropertyMappings":[],"primaryKeys":[],"objectDisplayName":"HTTP Request","eventMode":null,"eventOperation":null,"hasBreakingChanges":false,"fieldsContainer":{"outputTypeDefinition":"{\\"body\\":object;\\"code\\":number;\\"method\\":string;\\"rawStringBody\\":string;\\"request\\":{\\"headers\\":object;\\"methodType\\":string;\\"query\\":object;\\"type\\":string;\\"url\\":string}}","outputJsonSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"method":{"title":"Method","type":"string","description":"Specifies the HTTP method to be used for the request."},"body":{"title":"Body","$ref":"#/definitions/body"},"code":{"title":"Code","type":"integer","description":"The Code"},"rawStringBody":{"title":"Raw body","type":"string","description":"The Raw string body"},"request":{"title":"Request","$ref":"#/definitions/request"}},"definitions":{"body":{"type":"object","properties":{}},"request":{"type":"object","properties":{"type":{"title":"Request type","type":"string","description":"The Request type"},"url":{"title":"Request url","type":"string","description":"The Request url"},"methodType":{"title":"Method","type":"string","description":"The Request method type"}}}}},"hasFileOutput":false,"populateOutputFields":true,"inputFields":[{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"authentication","name":"authentication","displayName":"Authentication","description":"Authentication","type":"string","sortOrder":1,"defaultValue":"manual","primaryKey":false,"enum":[{"name":"Manual authentication","value":"manual","description":"Provide authentication details directly in the request"},{"name":"Connector based authentication","value":"connector","description":"Use authentication details from a configured connector"}],"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"showMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]},{"actionType":"clearMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]}],"textBlocks":[{"name":"contentTypeNotice","text":"The content-type header must be application/json.","position":"above"}],"validation":false},"fieldActions":[{"actionType":"showMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]},{"actionType":"clearMessages","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false}],"messages":["contentTypeNotice"]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"targetConnector","name":"targetConnector","displayName":"Connector","description":"Select a connector","type":"string","sortOrder":2,"primaryKey":false,"lookup":{"objectName":"connectors","lookupNames":["name"],"lookupValue":"key","path":"/Connectors?hasHttpRequest=true","orderBy":"NONE","defaultLookupValues":[{"name":"HTTP","key":"uipath-uipath-http","priority":1,"isDefault":true,"description":"UiPath HTTP connector for general API requests"}]},"design":{"component":"Connectors","loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"displayPattern":"{name}","isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]}],"position":"primary","solutionResourceKind":"connector","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"connection","name":"connection","displayName":"Connection","description":"Connections","type":"string","sortOrder":3,"primaryKey":false,"design":{"component":"Connections","loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":true,"isVariable":false}]}],"position":"primary","solutionResourceKind":"connection","validation":false},"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","isCleared":true,"isVariable":false}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false},{"type":"field","refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":true,"isVariable":false}]},{"rules":[{"refFieldName":"targetConnector","refFieldValues":["*"],"isCleared":false,"isConstantValue":false,"isWorkflowExpression":false}],"actionType":"grabValue","groupNames":[],"messages":null}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"method","name":"method","displayName":"Method","description":"Specifies the HTTP method to be used for the request.","type":"string","sortOrder":4,"defaultValue":"GET","primaryKey":false,"enum":[{"name":"GET","value":"GET"},{"name":"POST","value":"POST"},{"name":"PUT","value":"PUT"},{"name":"PATCH","value":"PATCH"},{"name":"DELETE","value":"DELETE"},{"name":"OPTIONS","value":"OPTIONS"},{"name":"HEAD","value":"HEAD"}],"design":{"loadByDefault":true,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":true,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"url","name":"url","displayName":"URL","description":"The web address where the HTTP request is sent.","type":"string","sortOrder":5,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":true,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"path","name":"path","displayName":"Path","description":"The endpoint path for the REST API request.","type":"string","sortOrder":5,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"headers","name":"headers","displayName":"Headers","description":"Headers","type":"object","sortOrder":6,"primaryKey":false,"design":{"component":"Dictionary","loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","dictionaryWidget":{"windowTitle":"","windowDescription":"","columnKeyTitle":"","columnKeyDescription":"","columnKeyHint":"","columnValueTitle":"","columnValueDescription":"","columnValueHint":""},"validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":true,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"query","name":"query","displayName":"Query parameters","description":"Query parameters","type":"object","sortOrder":7,"primaryKey":false,"design":{"component":"Dictionary","loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"position":"primary","dictionaryWidget":{"windowTitle":"","windowDescription":"","columnKeyTitle":"","columnKeyDescription":"","columnKeyHint":"","columnValueTitle":"","columnValueDescription":"","columnValueHint":""},"validation":false},"fieldActions":null,"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":true,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"requestBodyType","name":"requestBodyType","displayName":"Request body type","description":"Determines how the request body is encoded. Available for manual authentication only; connector-based requests remain JSON.","type":"string","sortOrder":8,"defaultValue":"raw","primaryKey":false,"enum":[{"name":"Raw","value":"raw","description":"Send the body as-is using the Content-Type header (e.g. JSON, XML, plain text)."},{"name":"Multipart form data","value":"multipartFormData","description":"Send one or more form-data parts encoded as multipart/form-data."}],"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":true,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"String","assemblyQualifiedName":"String","isValueType":true},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"body","name":"body","displayName":"Body","description":"Contains the data to be sent with the HTTP request.","type":"object","sortOrder":9,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"hide","rules":[{"type":"field","refFieldName":"method","refFieldValues":["GET","HEAD","OPTIONS","DELETE"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"method","refFieldValues":["POST","PATCH","PUT"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":true,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"multipartFormData","name":"multipartFormData","displayName":"Form data parts","description":"Multipart form-data parts. Provide a list of parts; each part is an object with \'name\' (required), \'value\' (required), and optional \'filename\', \'contentType\' and \'encoding\'. A value that is an attachment reference is sent as a file; set encoding to \'base64\' to send a base64 string as bytes; objects are sent as JSON.","type":"object","sortOrder":10,"primaryKey":false,"design":{"loadByDefault":false,"isMultiSelect":false,"enableUserOverride":false,"isHidden":false,"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"position":"primary","validation":false},"fieldActions":[{"actionType":"show","priorityOrder":1,"rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["manual"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true},{"type":"field","refFieldName":"requestBodyType","refFieldValues":["multipartFormData"],"isCleared":false,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"requestBodyType","refFieldValues":["raw"],"isCleared":true,"isVariable":false,"isWorkflowExpression":true}]},{"actionType":"hide","rules":[{"type":"field","refFieldName":"authentication","refFieldValues":["connector"],"isCleared":true,"isVariable":false}]}],"searchable":false,"searchableJoins":null,"required":false,"request":true,"response":false,"responseCurated":false,"fieldLocation":"body","onCanvas":null,"isJitField":false,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null}],"outputFields":[{"typeScriptDefinition":null,"useUrlInput":false,"resolvedUrl":null,"id":"http-request","name":"http-request","displayName":"HTTP Request","description":"","type":"Generatedhttp-request","sortOrder":null,"format":null,"mask":null,"defaultValue":null,"primaryKey":false,"lookup":null,"enum":null,"design":null,"fieldActions":null,"searchable":false,"searchableOperators":null,"searchableNames":null,"searchableJoins":null,"required":false,"request":false,"response":true,"responseCurated":false,"fieldLocation":"output","onCanvas":null,"isJitField":true,"isFieldActionParent":false,"isMainResponseField":true,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null}],"jitTypeNeedsRefresh":false,"jitInputField":{"typeScriptDefinition":"{\\"authentication\\":string;\\"body\\":object;\\"connection\\":string;\\"headers\\":object;\\"method\\":string;\\"multipartFormData\\":object;\\"path\\":string;\\"query\\":object;\\"requestBodyType\\":string;\\"targetConnector\\":string;\\"url\\":string}","useUrlInput":false,"resolvedUrl":null,"id":"in_http-request","name":"http-request","displayName":"HTTP Request","description":"HTTP Request input object","type":"Generatedhttp-request","sortOrder":null,"format":null,"mask":null,"defaultValue":"{\\n \\"authentication\\": null,\\n \\"body\\": null,\\n \\"connection\\": null,\\n \\"headers\\": null,\\n \\"method\\": null,\\n \\"multipartFormData\\": null,\\n \\"path\\": null,\\n \\"query\\": null,\\n \\"requestBodyType\\": null,\\n \\"targetConnector\\": null,\\n \\"url\\": null\\n}","primaryKey":false,"lookup":null,"enum":null,"design":null,"fieldActions":null,"searchable":false,"searchableOperators":null,"searchableNames":null,"searchableJoins":null,"required":true,"request":false,"response":false,"responseCurated":false,"fieldLocation":"jitObjectInput","onCanvas":null,"isJitField":true,"isFieldActionParent":false,"isMainResponseField":false,"isMethodParameter":false,"isBackgroundField":false,"filterTree":null,"filterNeedsRefresh":null,"arrayInputPaths":null,"clrType":{"_elementType":null,"_isNullable":false,"isArray":false,"genericTypeArguments":[],"fullName":null,"name":"Object","assemblyQualifiedName":"Object","isValueType":false},"forceExpressionEditor":false,"requiredGroups":null,"disableExpressions":false,"backingField":null,"searchableDisplayName":null,"selectedResourceId":null},"inputMode":null,"searchableFields":[],"hasUnifiedTypes":true,"jitTypeHash":null}}}',
|
|
1080
|
+
uiPathActivityTypeId: "5c4cc855-b42a-37e6-b910-de8588998fce",
|
|
1081
|
+
errorState: {
|
|
1082
|
+
issues: []
|
|
1083
|
+
}
|
|
1084
|
+
},
|
|
1085
|
+
activityMetadata: {
|
|
1086
|
+
activity: {
|
|
1087
|
+
isAppActivity: false,
|
|
1088
|
+
packageId: 196648,
|
|
1089
|
+
svgIconUrl: "icons/0dad78c9d04c245b126d8edb4c451aa8a0d395d34731cf5702441f6284c70ccc.svg",
|
|
1090
|
+
displayName: "HTTP Request",
|
|
1091
|
+
assemblyQualifiedName: "UiPath.IntegrationService.Activities.Runtime.Activities.ConnectorActivity, UiPath.IntegrationService.Activities.Runtime, Version=1.34.0.0, Culture=neutral, PublicKeyToken=null",
|
|
1092
|
+
description: "Use HTTP requests to interact with APIs via the selected connector and connection configuration.",
|
|
1093
|
+
category: "",
|
|
1094
|
+
activityColor: "#E56D5C",
|
|
1095
|
+
configuration: '{"connectorKey":"uipath-uipath-http","objectName":"http-request","httpMethod":"POST","activityType":"Curated","version":"1.0.0","supportsStreaming":false,"subType":"method"}',
|
|
1096
|
+
uiPathActivityTypeId: "5c4cc855-b42a-37e6-b910-de8588998fce",
|
|
1097
|
+
isExperimental: false,
|
|
1098
|
+
helpUrlTemplate: "https://docs.uipath.com/{0}/activities/other/latest/integration-service/uipath-uipath-http-HTTP-Request",
|
|
1099
|
+
isEnabled: true,
|
|
1100
|
+
targetPlatform: "CrossPlatform",
|
|
1101
|
+
isAdvanced: false,
|
|
1102
|
+
isRestricted: false,
|
|
1103
|
+
hasWpfOnlyDesigner: false,
|
|
1104
|
+
tags: [
|
|
1105
|
+
""
|
|
1106
|
+
]
|
|
1107
|
+
},
|
|
1108
|
+
meta: {
|
|
1109
|
+
packageName: "UiPath.IntegrationService.Activities",
|
|
1110
|
+
packageVersion: "1.34.0-alpha.20261013.3",
|
|
1111
|
+
activityColor: "#E56D5C",
|
|
1112
|
+
packageCategoryDisplayName: "HTTP"
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
inputMetadata: {},
|
|
1116
|
+
telemetryData: {
|
|
1117
|
+
connectorKey: "uipath-uipath-http",
|
|
1118
|
+
connectorName: "HTTP",
|
|
1119
|
+
operationType: "create",
|
|
1120
|
+
objectName: "http-request",
|
|
1121
|
+
objectDisplayName: "HTTP Request",
|
|
1122
|
+
primaryKeyName: ""
|
|
1123
|
+
},
|
|
1124
|
+
bindings: []
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
// src/services/sdd-convert/http-request.ts
|
|
1128
|
+
var HTTP_CONNECTOR_KEY = "uipath-uipath-http";
|
|
1129
|
+
var OUTPUTS = [
|
|
1130
|
+
{
|
|
1131
|
+
name: "code",
|
|
1132
|
+
displayName: "Response status code",
|
|
1133
|
+
type: "number",
|
|
1134
|
+
source: "=response.code"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
name: "headers",
|
|
1138
|
+
displayName: "Response headers",
|
|
1139
|
+
type: "object",
|
|
1140
|
+
source: "=response.headers"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
name: "body",
|
|
1144
|
+
displayName: "Response body",
|
|
1145
|
+
type: "object",
|
|
1146
|
+
source: "=response.body"
|
|
1147
|
+
}
|
|
1148
|
+
];
|
|
1149
|
+
var ERROR_SCHEMA = {
|
|
1150
|
+
type: "object",
|
|
1151
|
+
properties: {
|
|
1152
|
+
code: { type: "string" },
|
|
1153
|
+
message: { type: "string" },
|
|
1154
|
+
detail: { type: "string" },
|
|
1155
|
+
category: { type: "string" },
|
|
1156
|
+
status: { type: "number" },
|
|
1157
|
+
element: { type: "string" }
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1160
|
+
var httpRequestOutputs = (elementId, taken, reserved = new Set) => [
|
|
1161
|
+
...OUTPUTS.map((output) => {
|
|
1162
|
+
const id = mint(String(output.name), taken, reserved);
|
|
1163
|
+
return { ...output, var: id, value: id, id, elementId };
|
|
1164
|
+
}),
|
|
1165
|
+
(() => {
|
|
1166
|
+
const id = mint("error", taken, reserved);
|
|
1167
|
+
return {
|
|
1168
|
+
name: "Error",
|
|
1169
|
+
displayName: "Error",
|
|
1170
|
+
type: "jsonSchema",
|
|
1171
|
+
source: "=Error",
|
|
1172
|
+
_jsonSchema: ERROR_SCHEMA,
|
|
1173
|
+
id,
|
|
1174
|
+
var: id,
|
|
1175
|
+
value: id,
|
|
1176
|
+
elementId,
|
|
1177
|
+
body: ERROR_SCHEMA
|
|
1178
|
+
};
|
|
1179
|
+
})()
|
|
1180
|
+
];
|
|
1181
|
+
var mint = (base, taken, reserved) => {
|
|
1182
|
+
const id = dedupedId(base, new Set([...taken, ...reserved]));
|
|
1183
|
+
taken.add(id);
|
|
1184
|
+
return id;
|
|
1185
|
+
};
|
|
1186
|
+
var objectCell = (text) => {
|
|
1187
|
+
if (text === undefined)
|
|
1188
|
+
return {};
|
|
1189
|
+
const [error, parsed] = catchError(() => JSON.parse(text));
|
|
1190
|
+
if (error)
|
|
1191
|
+
return { error: "is not JSON" };
|
|
1192
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? { value: parsed } : { error: "is not a JSON object" };
|
|
1193
|
+
};
|
|
1194
|
+
var bodyValue = (text) => {
|
|
1195
|
+
if (text.startsWith("="))
|
|
1196
|
+
return { value: text };
|
|
1197
|
+
const [error] = catchError(() => JSON.parse(text));
|
|
1198
|
+
return error ? { error: "is neither JSON nor an `=` expression" } : { value: `=js:( ${text})` };
|
|
1199
|
+
};
|
|
1200
|
+
var BODY_METHODS = new Set(["POST", "PUT", "PATCH"]);
|
|
1201
|
+
var HTTP_METHODS = new Set([
|
|
1202
|
+
"GET",
|
|
1203
|
+
"POST",
|
|
1204
|
+
"PUT",
|
|
1205
|
+
"PATCH",
|
|
1206
|
+
"DELETE",
|
|
1207
|
+
"OPTIONS",
|
|
1208
|
+
"HEAD"
|
|
1209
|
+
]);
|
|
1210
|
+
var IMPLICIT = "ImplicitConnection";
|
|
1211
|
+
var CONNECTION_BINDING_NAME = `${HTTP_CONNECTOR_KEY} connection`;
|
|
1212
|
+
var binding = (id, rest) => ({
|
|
1213
|
+
id,
|
|
1214
|
+
name: CONNECTION_BINDING_NAME,
|
|
1215
|
+
type: "string",
|
|
1216
|
+
resource: "Connection",
|
|
1217
|
+
...rest
|
|
1218
|
+
});
|
|
1219
|
+
var implicitBinding = (bindings) => {
|
|
1220
|
+
const found = bindings.find((one) => one.name === CONNECTION_BINDING_NAME && one.resourceKey === IMPLICIT);
|
|
1221
|
+
if (found !== undefined)
|
|
1222
|
+
return String(found.id);
|
|
1223
|
+
const id = "bHttpImplicit";
|
|
1224
|
+
bindings.push(binding(id, {
|
|
1225
|
+
resourceKey: IMPLICIT,
|
|
1226
|
+
default: IMPLICIT,
|
|
1227
|
+
propertyAttribute: "ConnectionId"
|
|
1228
|
+
}));
|
|
1229
|
+
return id;
|
|
1230
|
+
};
|
|
1231
|
+
var connectionBindings = (connectionId, context) => {
|
|
1232
|
+
const known = context.connections.get(`http:${connectionId}`);
|
|
1233
|
+
const ordinal = context.connections.size + 1;
|
|
1234
|
+
const connectionRef = known ?? `bHttpC${ordinal}`;
|
|
1235
|
+
const folderRef = `${connectionRef}F`;
|
|
1236
|
+
const connection = binding(connectionRef, {
|
|
1237
|
+
resourceKey: connectionId,
|
|
1238
|
+
default: connectionId,
|
|
1239
|
+
propertyAttribute: "ConnectionId"
|
|
1240
|
+
});
|
|
1241
|
+
const folder = {
|
|
1242
|
+
id: folderRef,
|
|
1243
|
+
name: "FolderKey",
|
|
1244
|
+
type: "string",
|
|
1245
|
+
resource: "Connection",
|
|
1246
|
+
resourceKey: connectionId,
|
|
1247
|
+
propertyAttribute: "folderKey"
|
|
1248
|
+
};
|
|
1249
|
+
if (known === undefined) {
|
|
1250
|
+
context.connections.set(`http:${connectionId}`, connectionRef);
|
|
1251
|
+
context.bindings.push(connection, folder);
|
|
1252
|
+
}
|
|
1253
|
+
return { connection, folder };
|
|
1254
|
+
};
|
|
1255
|
+
var input = (name, elementId) => {
|
|
1256
|
+
const id = prefixedId("v", 8);
|
|
1257
|
+
return { name, type: "json", target: name, id, var: id, elementId };
|
|
1258
|
+
};
|
|
1259
|
+
var contextEntry = (name, value, type = "string") => ({
|
|
1260
|
+
name,
|
|
1261
|
+
value,
|
|
1262
|
+
type
|
|
1263
|
+
});
|
|
1264
|
+
var httpRequestData = (http, connector, outputs, context) => {
|
|
1265
|
+
const { where, unresolved, elementId } = context;
|
|
1266
|
+
const expand = (value) => value.startsWith("=") ? expandXrefs(value, {
|
|
1267
|
+
outputs: context.outputs,
|
|
1268
|
+
where,
|
|
1269
|
+
unresolved
|
|
1270
|
+
}) : value;
|
|
1271
|
+
const expandEntries = (object) => Object.fromEntries(Object.entries(object).map(([key, value]) => [
|
|
1272
|
+
key,
|
|
1273
|
+
typeof value === "string" ? expand(value) : value
|
|
1274
|
+
]));
|
|
1275
|
+
const request = http ?? {};
|
|
1276
|
+
const stated = (request.method ?? "").toUpperCase();
|
|
1277
|
+
const method = HTTP_METHODS.has(stated) ? stated : "";
|
|
1278
|
+
if (stated === "") {
|
|
1279
|
+
unresolved.push({
|
|
1280
|
+
kind: "connector-context",
|
|
1281
|
+
where,
|
|
1282
|
+
detail: "this `http-request` task states no `**Method:**`, so the request has none and the task cannot run until one is set"
|
|
1283
|
+
});
|
|
1284
|
+
} else if (method === "") {
|
|
1285
|
+
unresolved.push({
|
|
1286
|
+
kind: "connector-context",
|
|
1287
|
+
where,
|
|
1288
|
+
detail: `this \`http-request\` task's \`**Method:**\` is "${String(request.method)}", which is not one the activity offers (${[...HTTP_METHODS].join(", ")}), so the request has none and the task cannot run until one is set`
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
const targetConnector = typeof connector?.connectorKey === "string" && connector.connectorKey !== "" ? connector.connectorKey : undefined;
|
|
1292
|
+
const connectionId = typeof connector?.connectionId === "string" ? connector.connectionId : undefined;
|
|
1293
|
+
const connectorMode = targetConnector !== undefined && connectionId !== undefined;
|
|
1294
|
+
if (targetConnector !== undefined && !connectorMode && (request.url ?? "") === "") {
|
|
1295
|
+
unresolved.push({
|
|
1296
|
+
kind: "connector-context",
|
|
1297
|
+
where,
|
|
1298
|
+
detail: "this `http-request` task runs as a manual request until a connection is set, and states no `**URL:**` to call"
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
if (targetConnector === undefined && (request.url ?? "") === "") {
|
|
1302
|
+
unresolved.push({
|
|
1303
|
+
kind: "connector-context",
|
|
1304
|
+
where,
|
|
1305
|
+
detail: "this `http-request` task names no connector, so it calls `**URL:**` directly, and it states none"
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
const body = {
|
|
1309
|
+
authentication: connectorMode ? "connector" : "manual",
|
|
1310
|
+
...connectorMode && { targetConnector },
|
|
1311
|
+
...method !== "" && { method }
|
|
1312
|
+
};
|
|
1313
|
+
if (request.url !== undefined && request.url !== "") {
|
|
1314
|
+
if (connectorMode)
|
|
1315
|
+
body.path = expand(request.url);
|
|
1316
|
+
else
|
|
1317
|
+
body.url = expand(request.url);
|
|
1318
|
+
}
|
|
1319
|
+
for (const [key, cell] of [
|
|
1320
|
+
["headers", request.headers],
|
|
1321
|
+
["query", request.query]
|
|
1322
|
+
]) {
|
|
1323
|
+
const read = objectCell(cell);
|
|
1324
|
+
if (read.value !== undefined)
|
|
1325
|
+
body[key] = expandEntries(read.value);
|
|
1326
|
+
if (read.error !== undefined) {
|
|
1327
|
+
unresolved.push({
|
|
1328
|
+
kind: "connector-context",
|
|
1329
|
+
where,
|
|
1330
|
+
detail: `this \`http-request\` task's \`**${key === "headers" ? "Headers" : "Query"}:**\` ${read.error}, so it is left out; write it as a JSON object such as \`{"Name": "value"}\``
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
if (request.body !== undefined && request.body !== "") {
|
|
1335
|
+
const read = bodyValue(request.body);
|
|
1336
|
+
if (method !== "" && !BODY_METHODS.has(method)) {
|
|
1337
|
+
unresolved.push({
|
|
1338
|
+
kind: "connector-context",
|
|
1339
|
+
where,
|
|
1340
|
+
detail: `this \`http-request\` task's method is ${method}, which carries no body, so its \`**Body:**\` is left out; use POST, PUT or PATCH to send one`
|
|
1341
|
+
});
|
|
1342
|
+
} else if (read.value !== undefined) {
|
|
1343
|
+
if (!connectorMode)
|
|
1344
|
+
body.requestBodyType = "raw";
|
|
1345
|
+
body.body = expand(read.value);
|
|
1346
|
+
} else {
|
|
1347
|
+
unresolved.push({
|
|
1348
|
+
kind: "connector-context",
|
|
1349
|
+
where,
|
|
1350
|
+
detail: `this \`http-request\` task's \`**Body:**\` ${String(read.error)}, so it is left out; write a JSON literal such as \`{"name": "value"}\`, or an \`=\` expression`
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
let connectionValue;
|
|
1355
|
+
let resourceKey = null;
|
|
1356
|
+
let folderKey = null;
|
|
1357
|
+
const taskBindings = [];
|
|
1358
|
+
if (connectorMode && connectionId !== undefined) {
|
|
1359
|
+
const pair = connectionBindings(connectionId, context);
|
|
1360
|
+
connectionValue = `${BINDING_REFERENCE_PREFIX}${String(pair.connection.id)}`;
|
|
1361
|
+
resourceKey = connectionId;
|
|
1362
|
+
folderKey = `${BINDING_REFERENCE_PREFIX}${String(pair.folder.id)}`;
|
|
1363
|
+
taskBindings.push(pair.connection, pair.folder);
|
|
1364
|
+
unresolved.push({
|
|
1365
|
+
kind: "connector-context",
|
|
1366
|
+
where,
|
|
1367
|
+
detail: `the folder binding \`${String(pair.folder.id)}\` needs the connection's folder GUID as its \`default\`; the document names the connection and no folder key, so \`sdd resolve\` or a person supplies it`
|
|
1368
|
+
});
|
|
1369
|
+
} else {
|
|
1370
|
+
if (targetConnector !== undefined) {
|
|
1371
|
+
unresolved.push({
|
|
1372
|
+
kind: "connector-connection",
|
|
1373
|
+
where,
|
|
1374
|
+
detail: `this \`http-request\` task reuses \`${String(targetConnector)}\`'s authentication and names no \`**Connection ID:**\`, so nothing is bound and it runs as a manual request until a connection is set`
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
connectionValue = `${BINDING_REFERENCE_PREFIX}${implicitBinding(context.bindings)}`;
|
|
1378
|
+
}
|
|
1379
|
+
return {
|
|
1380
|
+
serviceType: "Intsvc.UnifiedHttpRequest",
|
|
1381
|
+
inputs: [
|
|
1382
|
+
input("pathParameters", elementId),
|
|
1383
|
+
input("queryParameters", elementId),
|
|
1384
|
+
{ ...input("body", elementId), body }
|
|
1385
|
+
],
|
|
1386
|
+
outputs,
|
|
1387
|
+
context: [
|
|
1388
|
+
contextEntry("connectorKey", HTTP_CONNECTOR_KEY),
|
|
1389
|
+
contextEntry("connection", connectionValue),
|
|
1390
|
+
contextEntry("resourceKey", resourceKey),
|
|
1391
|
+
contextEntry("folderKey", folderKey),
|
|
1392
|
+
contextEntry("method", "POST"),
|
|
1393
|
+
contextEntry("path", "/http-request"),
|
|
1394
|
+
contextEntry("objectName", "http-request"),
|
|
1395
|
+
{ name: "metadata", type: "json", body: structuredClone(http_request_metadata_default) },
|
|
1396
|
+
contextEntry("activityConfigurationVersion", "v2")
|
|
1397
|
+
],
|
|
1398
|
+
bindings: taskBindings
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1318
1401
|
|
|
1319
1402
|
// src/services/sdd-convert/emit.ts
|
|
1320
1403
|
var isDeferredTask = (resolved, stageName, task) => {
|
|
@@ -1412,6 +1495,12 @@ var emitTask = (task, taskId, context) => {
|
|
|
1412
1495
|
conditions: placeholderConditions.length
|
|
1413
1496
|
};
|
|
1414
1497
|
}
|
|
1498
|
+
for (const detail of task.unreadTables ?? [])
|
|
1499
|
+
unresolved.push({
|
|
1500
|
+
kind: "task-io-table",
|
|
1501
|
+
where: `${taskWhere}.data`,
|
|
1502
|
+
detail
|
|
1503
|
+
});
|
|
1415
1504
|
const recipient = task.recipient;
|
|
1416
1505
|
const recipientType = recipient === undefined ? undefined : RECIPIENT_TYPES.get(recipient.kind);
|
|
1417
1506
|
if (recipient !== undefined && recipientType === undefined) {
|
|
@@ -1498,6 +1587,9 @@ var emitTask = (task, taskId, context) => {
|
|
|
1498
1587
|
where: taskWhere,
|
|
1499
1588
|
unresolved
|
|
1500
1589
|
})),
|
|
1590
|
+
...type === "business-rule" && {
|
|
1591
|
+
version: BUSINESS_RULE_TASK_VERSION
|
|
1592
|
+
},
|
|
1501
1593
|
...type === "action" && task.taskTitle !== undefined && {
|
|
1502
1594
|
taskTitle: task.taskTitle
|
|
1503
1595
|
},
|
|
@@ -1512,6 +1604,16 @@ var emitTask = (task, taskId, context) => {
|
|
|
1512
1604
|
...timer
|
|
1513
1605
|
}
|
|
1514
1606
|
};
|
|
1607
|
+
if (type === "http-request") {
|
|
1608
|
+
emitted.data = httpRequestData(task.http, task.connector, emitted.data.outputs ?? [], {
|
|
1609
|
+
elementId,
|
|
1610
|
+
where: taskWhere,
|
|
1611
|
+
bindings,
|
|
1612
|
+
connections,
|
|
1613
|
+
unresolved,
|
|
1614
|
+
outputs: outputIds
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1515
1617
|
return { task: emitted, conditions };
|
|
1516
1618
|
};
|
|
1517
1619
|
var SHARES_WITH_SIBLING = "parallel-after-predecessor";
|
|
@@ -1579,7 +1681,21 @@ var emitStages = (document, model, index, unresolved) => {
|
|
|
1579
1681
|
} = index;
|
|
1580
1682
|
let taskCount = 0;
|
|
1581
1683
|
let conditionCount = 0;
|
|
1582
|
-
for (const {
|
|
1684
|
+
for (const {
|
|
1685
|
+
stage,
|
|
1686
|
+
stageId,
|
|
1687
|
+
tasks: plannedTasks,
|
|
1688
|
+
slaRules: stageRules
|
|
1689
|
+
} of planned) {
|
|
1690
|
+
const hasDefaultRule = stageRules.some((rule) => /^=js:\s*true\s*$/.test(String(rule.expression ?? "")));
|
|
1691
|
+
if (!hasDefaultRule && (stage.hasSla === true || /\d/.test(String(stage.slaDuration ?? "")))) {
|
|
1692
|
+
const stated = String(stage.slaDuration ?? "").trim();
|
|
1693
|
+
unresolved.push({
|
|
1694
|
+
kind: "case-sla",
|
|
1695
|
+
where: `nodes[${stage.name}].data.slaRules`,
|
|
1696
|
+
detail: `this stage declares an SLA and no rule could be emitted from it: the duration cell is ${stated === "" ? "absent, so the escalation rows have no duration to be a percentage of" : `\`${stated}\`, which gives no count and a unit the case schema names (min, h, d, w, m, and the spellings that map to them)`}. The stage's SLA title, duration, escalation rows and any conditional rules are all dropped together — without a default the engine would run the last conditional rule for every case — so authoring the duration is what carries them`
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1583
1699
|
const where = `nodes[${stage.name}]`;
|
|
1584
1700
|
const tasks = [];
|
|
1585
1701
|
const declared = [];
|
|
@@ -1650,7 +1766,7 @@ var emitStages = (document, model, index, unresolved) => {
|
|
|
1650
1766
|
parentElement: { id: "root", type: "case-management:root" },
|
|
1651
1767
|
isInvalidDropTarget: false,
|
|
1652
1768
|
isPendingParent: false,
|
|
1653
|
-
...
|
|
1769
|
+
...stageRules.length > 0 && { slaRules: stageRules },
|
|
1654
1770
|
tasks: sets,
|
|
1655
1771
|
entryConditions,
|
|
1656
1772
|
exitConditions
|
|
@@ -1706,13 +1822,6 @@ var planCase = (model, unresolved) => {
|
|
|
1706
1822
|
const title = indexKey(String(stageSla.displayName));
|
|
1707
1823
|
slaIds.set(title, entry);
|
|
1708
1824
|
slaIds.set(scopedSlaKey(stageId, title), entry);
|
|
1709
|
-
} else if (stage.hasSla === true || /\d/.test(String(stage.slaDuration ?? ""))) {
|
|
1710
|
-
const stated = String(stage.slaDuration ?? "").trim();
|
|
1711
|
-
unresolved.push({
|
|
1712
|
-
kind: "case-sla",
|
|
1713
|
-
where: `nodes[${stage.name}].data.slaRules`,
|
|
1714
|
-
detail: `this stage declares an SLA and no rule could be emitted from it: the duration cell is ${stated === "" ? "absent, so the escalation rows have no duration to be a percentage of" : `\`${stated}\`, which gives no count and a unit the case schema names (min, h, d, w, m, and the spellings that map to them)`}. The stage's SLA title, duration and escalation rows are all dropped together, so authoring the duration is what carries them`
|
|
1715
|
-
});
|
|
1716
1825
|
}
|
|
1717
1826
|
const spelling = stageSpellings(stage.name, position + 1);
|
|
1718
1827
|
for (const name of spelling.names) {
|
|
@@ -1730,6 +1839,7 @@ var planCase = (model, unresolved) => {
|
|
|
1730
1839
|
const tasks = stage.tasks.map((task) => {
|
|
1731
1840
|
const taskId = prefixedId("t", 8);
|
|
1732
1841
|
const taskName = taskNameOf(task);
|
|
1842
|
+
const taskType = typeof task.type === "string" ? task.type : undefined;
|
|
1733
1843
|
tasksByExactName.push([taskName, taskId]);
|
|
1734
1844
|
stagesByTaskName.set(taskName, [
|
|
1735
1845
|
...stagesByTaskName.get(taskName) ?? [],
|
|
@@ -1769,8 +1879,45 @@ var planCase = (model, unresolved) => {
|
|
|
1769
1879
|
extractByField.set(field, variable);
|
|
1770
1880
|
}
|
|
1771
1881
|
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1882
|
+
const httpOutputs = taskType === "http-request" ? httpRequestOutputs(buildElementId(stageId, taskId), takenOutputIds, new Set(model.variables)) : [];
|
|
1883
|
+
const httpDeclared = taskType === "http-request" ? declaredOutputs(model, stage.name, position + 1, task) : [];
|
|
1884
|
+
for (const output of httpOutputs) {
|
|
1885
|
+
const name = String(output.name).toLowerCase();
|
|
1886
|
+
const spellings = [
|
|
1887
|
+
...httpDeclared.flatMap(({ row, aliases }) => [row, ...aliases].filter((spelling2) => httpRequestOutputName(spelling2) === name)),
|
|
1888
|
+
...[...extractByField.keys()].filter((field) => httpRequestOutputName(field) === name)
|
|
1889
|
+
];
|
|
1890
|
+
const variable = [...extractByField].find(([field]) => httpRequestOutputName(field) === name)?.[1];
|
|
1891
|
+
if (variable !== undefined) {
|
|
1892
|
+
output.var = variable;
|
|
1893
|
+
output.value = variable;
|
|
1894
|
+
output.target = `=${String(output.id)}`;
|
|
1895
|
+
output.originalVar = output.id;
|
|
1896
|
+
}
|
|
1897
|
+
own.set(String(output.name), output);
|
|
1898
|
+
indexOutput(new Set([
|
|
1899
|
+
String(output.name),
|
|
1900
|
+
...spellings,
|
|
1901
|
+
...variable === undefined ? [] : [variable]
|
|
1902
|
+
]), output);
|
|
1903
|
+
}
|
|
1904
|
+
if (taskType === "http-request") {
|
|
1905
|
+
const offered = httpOutputs.map((output) => String(output.name));
|
|
1906
|
+
const authored = new Set([
|
|
1907
|
+
...extractByField.values(),
|
|
1908
|
+
...(task.customRows ?? []).map((entry) => String(entry.variable ?? ""))
|
|
1909
|
+
].filter((name) => name !== "").map(indexKey));
|
|
1910
|
+
const unnamed = new Set(httpDeclared.flatMap(({ row, aliases }) => [row, ...aliases]).filter((spelling2) => httpRequestOutputName(spelling2) === undefined && !authored.has(indexKey(spelling2))));
|
|
1911
|
+
for (const row of unnamed) {
|
|
1912
|
+
unresolved.push({
|
|
1913
|
+
kind: "output-type",
|
|
1914
|
+
where: `nodes[${stage.name}].data.tasks[${taskName}].outputs[${row}]`,
|
|
1915
|
+
detail: `an \`http-request\` task has the activity's own outputs only (${offered.join(", ")}), so the declared output "${row}" is not written; read the field it names from \`body\` instead`
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
for (const { row, aliases } of taskType === "http-request" ? [] : declaredOutputs(model, stage.name, position + 1, task)) {
|
|
1920
|
+
const consumerType = [row, ...aliases].map((spelling2) => outputTypeFor(model, everySpelling(stage.name, position + 1), taskName, spelling2)).find((found) => found !== undefined);
|
|
1774
1921
|
const variable = extractByField.get(row);
|
|
1775
1922
|
const type = consumerType ?? (variable === undefined ? undefined : variableOutputType(model, variable));
|
|
1776
1923
|
if (type === undefined) {
|
|
@@ -1780,10 +1927,11 @@ var planCase = (model, unresolved) => {
|
|
|
1780
1927
|
detail: "no row in this SDD types this output; its shape comes from the resolved resource's own schema, which needs a tenant — `uip maestro case tasks describe --type <type> --id <id>` returns it, and `uip maestro case splice <plan> --task-id <taskId> --described <that result>` writes it in"
|
|
1781
1928
|
});
|
|
1782
1929
|
}
|
|
1783
|
-
const output = variable === undefined ? outputFor(row, buildElementId(stageId, taskId), takenOutputIds, type) : extractOutputFor({ field: row, variable }, buildElementId(stageId, taskId), takenOutputIds, type);
|
|
1930
|
+
const output = variable === undefined ? outputFor(row, buildElementId(stageId, taskId), takenOutputIds, type, taskType) : extractOutputFor({ field: row, variable }, buildElementId(stageId, taskId), takenOutputIds, type, taskType);
|
|
1784
1931
|
own.set(row, output);
|
|
1785
1932
|
indexOutput(new Set([
|
|
1786
1933
|
row,
|
|
1934
|
+
...aliases,
|
|
1787
1935
|
String(output.name),
|
|
1788
1936
|
...variable === undefined ? [] : [variable]
|
|
1789
1937
|
]), output);
|
|
@@ -1807,7 +1955,7 @@ var planCase = (model, unresolved) => {
|
|
|
1807
1955
|
outputsByTask.set(taskId, own);
|
|
1808
1956
|
return { task, taskId };
|
|
1809
1957
|
});
|
|
1810
|
-
return { stage, stageId, tasks, stageSla };
|
|
1958
|
+
return { stage, stageId, tasks, stageSla, slaRules: [] };
|
|
1811
1959
|
});
|
|
1812
1960
|
const tasksPerName = countByName(tasksByExactName);
|
|
1813
1961
|
reportRepeatedTaskNames(stagesByTaskName, unresolved);
|
|
@@ -1853,8 +2001,98 @@ var planCase = (model, unresolved) => {
|
|
|
1853
2001
|
bindingsByKey,
|
|
1854
2002
|
connections,
|
|
1855
2003
|
slaIds,
|
|
1856
|
-
...caseSla !== undefined && { caseSla }
|
|
2004
|
+
...caseSla !== undefined && { caseSla },
|
|
2005
|
+
caseSlaRules: []
|
|
2006
|
+
};
|
|
2007
|
+
};
|
|
2008
|
+
|
|
2009
|
+
// src/services/sdd-convert/sla-rules.ts
|
|
2010
|
+
var statesSla = (flag, duration) => flag === true || /\d/.test(String(duration ?? ""));
|
|
2011
|
+
var named = (rule, at, title) => {
|
|
2012
|
+
const displayName = typeof rule.displayName === "string" ? rule.displayName : `${title} rule ${at + 1}`;
|
|
2013
|
+
const escalations = Array.isArray(rule.escalationRule) ? rule.escalationRule : undefined;
|
|
2014
|
+
return {
|
|
2015
|
+
...rule,
|
|
2016
|
+
displayName,
|
|
2017
|
+
...escalations !== undefined && {
|
|
2018
|
+
escalationRule: escalations.map((one) => ({
|
|
2019
|
+
...one,
|
|
2020
|
+
displayName: `${String(one.displayName)} (${displayName})`
|
|
2021
|
+
}))
|
|
2022
|
+
}
|
|
2023
|
+
};
|
|
2024
|
+
};
|
|
2025
|
+
var register = (rule, target, slaIds, unresolved) => {
|
|
2026
|
+
if (typeof rule.displayName !== "string")
|
|
2027
|
+
return true;
|
|
2028
|
+
const key = indexKey(rule.displayName);
|
|
2029
|
+
const scoped = scopedSlaKey(target.scope, key);
|
|
2030
|
+
if (slaIds.has(scoped)) {
|
|
2031
|
+
unresolved.push({
|
|
2032
|
+
kind: "case-sla",
|
|
2033
|
+
where: `${target.where}[${rule.displayName}]`,
|
|
2034
|
+
detail: `two SLA rules in ${target.scope === "root" ? "the case" : "this stage"} are named "${rule.displayName}", and the runtime tells an SLA's status changes apart by name, so this conditional rule is left out; the document has to name each rule once`
|
|
2035
|
+
});
|
|
2036
|
+
return false;
|
|
2037
|
+
}
|
|
2038
|
+
const entry = { id: String(rule.id), stageId: target.scope };
|
|
2039
|
+
slaIds.set(scoped, entry);
|
|
2040
|
+
if (!slaIds.has(key))
|
|
2041
|
+
slaIds.set(key, entry);
|
|
2042
|
+
return true;
|
|
2043
|
+
};
|
|
2044
|
+
var targetSlaRules = (target, shared) => {
|
|
2045
|
+
const { outputs, slaIds, unresolved } = shared;
|
|
2046
|
+
const { fallback } = target;
|
|
2047
|
+
const built = conditionalSlaRules(target.conditional, target.where, unresolved, (expression, where) => expandXrefs(expression, { outputs, where, unresolved }), fallback !== undefined, fallback === undefined ? undefined : `${String(fallback.count)} ${String(fallback.unit)}`, (duration, sink) => slaRuleFor(target.title, duration, target.escalationRows, target.escalationWhere, sink, target.asked), !target.declared);
|
|
2048
|
+
const tableDefault = built.at(-1);
|
|
2049
|
+
const last = fallback ?? (tableDefault === undefined || typeof tableDefault.displayName === "string" ? tableDefault : { ...tableDefault, displayName: target.title });
|
|
2050
|
+
const conditional = (fallback === undefined ? built.slice(0, -1) : built).map((rule, at) => named(rule, at, target.title));
|
|
2051
|
+
if (last === undefined)
|
|
2052
|
+
return [];
|
|
2053
|
+
if (fallback === undefined)
|
|
2054
|
+
register(last, target, slaIds, unresolved);
|
|
2055
|
+
return [
|
|
2056
|
+
...conditional.filter((rule) => register(rule, target, slaIds, unresolved)),
|
|
2057
|
+
last
|
|
2058
|
+
];
|
|
2059
|
+
};
|
|
2060
|
+
var planSlaRules = (index, model, unresolved) => {
|
|
2061
|
+
const shared = {
|
|
2062
|
+
outputs: index.outputIds,
|
|
2063
|
+
slaIds: index.slaIds,
|
|
2064
|
+
unresolved
|
|
1857
2065
|
};
|
|
2066
|
+
for (const one of index.planned) {
|
|
2067
|
+
one.slaRules = targetSlaRules({
|
|
2068
|
+
scope: one.stageId,
|
|
2069
|
+
where: `nodes[${one.stage.name}].data.slaRules`,
|
|
2070
|
+
conditional: one.stage.conditionalSlas ?? [],
|
|
2071
|
+
fallback: one.stageSla,
|
|
2072
|
+
title: String(one.stage.slaTitle ?? `${one.stage.name} SLA`),
|
|
2073
|
+
escalationRows: one.stage.slaEscalationRows ?? [],
|
|
2074
|
+
escalationWhere: `nodes[${one.stage.name}].data.sla`,
|
|
2075
|
+
asked: {
|
|
2076
|
+
table: one.stage.slaEscalations,
|
|
2077
|
+
map: one.stage.slaResponses
|
|
2078
|
+
},
|
|
2079
|
+
declared: statesSla(one.stage.hasSla, one.stage.slaDuration)
|
|
2080
|
+
}, shared);
|
|
2081
|
+
}
|
|
2082
|
+
index.caseSlaRules = targetSlaRules({
|
|
2083
|
+
scope: "root",
|
|
2084
|
+
where: "metadata.slaRules",
|
|
2085
|
+
conditional: model.caseConditionalSlas ?? [],
|
|
2086
|
+
fallback: index.caseSla,
|
|
2087
|
+
title: model.caseSlaTitle ?? CASE_SLA_PROPERTY,
|
|
2088
|
+
escalationRows: model.caseSlaEscalationRows,
|
|
2089
|
+
escalationWhere: "metadata.slaRules",
|
|
2090
|
+
asked: {
|
|
2091
|
+
table: model.caseSlaEscalations,
|
|
2092
|
+
map: model.caseSlaResponses
|
|
2093
|
+
},
|
|
2094
|
+
declared: statesSla(model.caseSla, model.caseSlaDuration)
|
|
2095
|
+
}, shared);
|
|
1858
2096
|
};
|
|
1859
2097
|
|
|
1860
2098
|
// src/services/sdd-convert/rule-names.ts
|
|
@@ -1941,9 +2179,12 @@ var convertSddToCasePlan = (model, options) => {
|
|
|
1941
2179
|
}
|
|
1942
2180
|
}
|
|
1943
2181
|
markDeferredOutputs(index.outputIds, placeholderOutputs);
|
|
2182
|
+
planSlaRules(index, model, unresolved);
|
|
1944
2183
|
const { taskCount, conditionCount } = emitStages(document, model, index, unresolved);
|
|
1945
2184
|
const caseLevel = finishCaseDocument(document, model, index, unresolved);
|
|
1946
2185
|
uniquifyConditionNames(document);
|
|
2186
|
+
designerShapeConnectorTasks(document);
|
|
2187
|
+
emitCanvasNotes(document, model.canvasNotes);
|
|
1947
2188
|
return {
|
|
1948
2189
|
document,
|
|
1949
2190
|
derived: {
|
|
@@ -1959,4 +2200,4 @@ export {
|
|
|
1959
2200
|
convertSddToCasePlan
|
|
1960
2201
|
};
|
|
1961
2202
|
|
|
1962
|
-
//# debugId=
|
|
2203
|
+
//# debugId=FCC3E2D1F580064164756E2164756E21
|