@uipath/flow-tool 1.205.0-preview.276 → 1.206.0-preview.279
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/README.md +14 -12
- package/dist/THIRD-PARTY-NOTICES.md +77 -49
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/authoring-x84r2a2j.js +23 -0
- package/dist/binding-service-s0wvr2xm.js +114 -0
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-gnftxwsf.js} +5 -6
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/{connector-service-m08dysc2.js → connector-service-r86mtxwn.js} +270 -275
- package/dist/{conversion-FQTRFHRX-e5wr281j.js → conversion-7O2PDOQB-3wwppx87.js} +477 -472
- package/dist/{de-FGHEJRCI-PK6WALXW-0dnvnmke.js → de-2BEKRUMY-MD7L477H-rj1rmtav.js} +425 -37
- package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
- package/dist/{de-VMMG2MN7-2ecwpg1b.js → de-3CU65EDB-r7r10am9.js} +82 -7
- package/dist/{de-UZI7FJDO-awjpqfz0.js → de-AI7ML6JM-km47f8k4.js} +20 -5
- package/dist/{de-B3EKCNFC-zdwybhh7.js → de-VQWT6L5Y-mch4qwyv.js} +38 -5
- package/dist/{de-XNTCMP5Z-xfkfqg20.js → de-XNTCMP5Z-nd4scb43.js} +1 -4
- package/dist/debug-conversation-trigger-3wzy90kj.js +23 -0
- package/dist/debug-http-client-zydr7tna.js +31 -0
- package/dist/debug-service-hdktqeek.js +60 -0
- package/dist/edge-service-zck3s9ss.js +267 -0
- package/dist/{elk.bundled-vpsbxz0p.js → elk.bundled-phy0zc81.js} +6860 -6860
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-ba7wzsxp.js +254 -0
- package/dist/en-LQHKFSEY-zf6a2myg.js +24 -0
- package/dist/en-U2NSIIZN-whenw6wh.js +58 -0
- package/dist/en-WPCQ4JKF-t3x07ggr.js +148 -0
- package/dist/en-X6T4SP2Y-FPGCJIFV-qdfapfzs.js +2756 -0
- package/dist/en-X6T4SP2Y-xe57av1w.js +2752 -0
- package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
- package/dist/{es-KR3ZSNMP-QLWVVWKJ-5egs0gj9.js → es-7ZTQTGKN-TXQBFYRA-bzh1e1gq.js} +422 -34
- package/dist/{es-EKHIPSW6-ya88nvm0.js → es-EKHIPSW6-asfceac2.js} +1 -4
- package/dist/{es-KEBF3AIM-g5rszh8f.js → es-EP563JWQ-1agj5n4e.js} +38 -5
- package/dist/{es-WY6FZ3HO-zksnn6dp.js → es-KHVY67FO-natcvmmm.js} +82 -7
- package/dist/{es-MX-5RELIXKI-jtjbcxbb.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
- package/dist/{es-MX-ZP2LJ3V7-k4brnfa9.js → es-MX-F7ZEHSNE-gxpm47vv.js} +82 -7
- package/dist/{es-MX-XXZJGC4R-W6EEIHXR-c2m4yjpj.js → es-MX-IHGRIEWH-23X37OPS-7cqdzpcy.js} +425 -37
- package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
- package/dist/{es-MX-OR6G2SFR-7yykk5ma.js → es-MX-OR6G2SFR-02t13sen.js} +1 -4
- package/dist/{es-MX-EL3CDS3F-sh84yvjr.js → es-MX-S2RFDGDE-x9r0tv30.js} +38 -5
- package/dist/{es-4UBUTCQA-t7hsackg.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
- package/dist/filter-engine-dh9s90gb.js +10 -0
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/flow-api-d4dvmadm.js +38 -0
- package/dist/{flow-debug-service-gc2ky1ve.js → flow-debug-service-hy21ddd9.js} +151 -195
- package/dist/flow-eval-node-target-tdrwqca7.js +29 -0
- package/dist/flow-eval-run-api-w4j8ra60.js +9 -0
- package/dist/{flow-eval-run-service-2cbr0jtw.js → flow-eval-run-service-5en4ahyn.js} +125 -149
- package/dist/{flow-eval-service-24jbkhhz.js → flow-eval-service-2j28ect1.js} +57 -81
- package/dist/{flow-init-sdk-source-xvdvkq7d.js → flow-init-sdk-source-xnr4bg25.js} +8 -11
- package/dist/flow-init-service-bj3ev9bz.js +26 -0
- package/dist/flow-io-9q6xk473.js +24 -0
- package/dist/{flow-migrate-service-t3pnd2r3.js → flow-migrate-service-dkx85jj5.js} +33 -54
- package/dist/{flow-pack-service-b910q207.js → flow-pack-service-58m51sp8.js} +79 -103
- package/dist/flow-validate-service-9a3zate4.js +46 -0
- package/dist/{fr-DPD4GHX3-exeypjwk.js → fr-7LK3QUWT-a94yejcs.js} +38 -5
- package/dist/{fr-Y6NPVODW-AS7T42TR-v4qe2tha.js → fr-7ZDL4MVO-CXMRZDOF-qjkg6y2r.js} +425 -37
- package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
- package/dist/{fr-VBM5WRC2-707ha692.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
- package/dist/{fr-PRMYCRDC-0bk078by.js → fr-I42FODC5-p80x5v4b.js} +83 -8
- package/dist/{fr-IHD66TVT-vfvmefbx.js → fr-IHD66TVT-eq8h0d6c.js} +1 -4
- package/dist/{governance-fetcher-ffvbtwbd.js → governance-fetcher-h8hpcwyh.js} +17 -21
- package/dist/{headless-4x4v3sy6.js → headless-41t9wwb7.js} +2395 -43269
- package/dist/{hitl-service-3m4ce3mt.js → hitl-service-hccqhm63.js} +22 -42
- package/dist/index-4e3w8x62.js +31 -0
- package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
- package/dist/index-5xh0cjag.js +82 -0
- package/dist/index-7fet3f0s.js +10 -0
- package/dist/index-d4bdedx3.js +32 -0
- package/dist/index-f5kq7265.js +24 -0
- package/dist/index-g2p2ww34.js +39 -0
- package/dist/index-ng011fzs.js +974 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/{index-1b2je9n2.js → index-px95xmkg.js} +290 -268
- package/dist/index-tdwpejt6.js +22 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +19 -28
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/init.js +22 -43
- package/dist/inline-entity-resolver-0neh2b43.js +25 -0
- package/dist/input-reader-zqaep7k7.js +11 -0
- package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
- package/dist/{ja-HFEQKCZF-hb2f25p8.js → ja-GI3OUHPZ-28fy60r0.js} +83 -8
- package/dist/{ja-JE5ZL7EY-hacj2m31.js → ja-JE5ZL7EY-607k4c7p.js} +1 -4
- package/dist/{ja-Q5PXKJ2V-BR5GRIDQ-fgqqpryf.js → ja-LGAM5HKR-NTPKIZEM-nv67917s.js} +422 -34
- package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
- package/dist/ja-WY2W6733-ayr36h1f.js +71 -0
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/known-types-v9sxcq1c.js +13 -0
- package/dist/{ko-AYBDSRZG-G43C3XUW-kng13fsg.js → ko-7B4SUZB7-2SLI636D-grbtfrcv.js} +424 -36
- package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
- package/dist/{ko-DJJRKCG5-5h3k9csc.js → ko-DJJRKCG5-4fekzjn4.js} +1 -4
- package/dist/{ko-LA5OSS5P-mq5h8sbk.js → ko-H2RGQWKJ-9696w762.js} +38 -5
- package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
- package/dist/{ko-B4SEC7QX-thq2wt6a.js → ko-RYKAL74T-10m4z8vw.js} +83 -8
- package/dist/localization-skqjy9nr.js +45 -0
- package/dist/maestro-automate-entry-d1v5q5mv.js +14 -0
- package/dist/{node-xqc0h091.js → node-0jy3qx5b.js} +69 -638
- package/dist/node-service-2nxpk751.js +64 -0
- package/dist/{node-strategy-1dmmhvf3.js → node-strategy-wrjxmbzt.js} +9 -12
- package/dist/node-sync-service-68vq10je.js +56 -0
- package/dist/packager-tool-14rdgz3c.js +55 -0
- package/dist/packager-tool-1rhch6b5.js +496 -0
- package/dist/packager-tool-21t17xzz.js +5073 -0
- package/dist/{packager-tool-pvhx9e12.js → packager-tool-2b0tn4p4.js} +58 -176
- package/dist/{packager-tool-f9jxca9z.js → packager-tool-368bft50.js} +11 -11
- package/dist/{packager-tool-a5afh1dc.js → packager-tool-4fv0sq2h.js} +61 -67
- package/dist/packager-tool-4g87fbz6.js +273 -0
- package/dist/packager-tool-4zt1s51a.js +53 -0
- package/dist/{packager-tool-frjt46rb.js → packager-tool-508ka40b.js} +23 -23
- package/dist/{packager-tool-gbv6f0ac.js → packager-tool-5104bnpv.js} +22 -21
- package/dist/packager-tool-5dgpfh5e.js +1274 -0
- package/dist/packager-tool-5ve5ms3b.js +2393 -0
- package/dist/{packager-tool-dxgrhfq5.js → packager-tool-64r7e4ek.js} +8 -8
- package/dist/{packager-tool-h6pf3qxq.js → packager-tool-65yf8zqb.js} +180 -1237
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-htrt75v4.js → packager-tool-6jpvvxyb.js} +27 -22
- package/dist/packager-tool-6vhefpmq.js +461 -0
- package/dist/{packager-tool-1nfbzy0h.js → packager-tool-72xwbsmw.js} +441 -556
- package/dist/packager-tool-7atc775f.js +30 -0
- package/dist/packager-tool-7mxn3e7j.js +27 -0
- package/dist/{packager-tool-wvmtp8zt.js → packager-tool-7qtnffkc.js} +8 -7
- package/dist/{packager-tool-ymma2s85.js → packager-tool-8ba22j6n.js} +9 -6
- package/dist/{packager-tool-apawc11t.js → packager-tool-8ed52y5r.js} +1584 -1261
- package/dist/{packager-tool-v11fm907.js → packager-tool-8n4bdvke.js} +13 -13
- package/dist/{packager-tool-p8gab24q.js → packager-tool-8qypzm9v.js} +424 -404
- package/dist/packager-tool-9217bxm2.js +6 -0
- package/dist/{packager-tool-zfrp8ecz.js → packager-tool-951nhh3e.js} +82 -82
- package/dist/{packager-tool-ap0zt7de.js → packager-tool-99d2kj94.js} +8 -11
- package/dist/{packager-tool-z21c6mbp.js → packager-tool-a1h0q79w.js} +48 -48
- package/dist/{packager-tool-xk78j7dz.js → packager-tool-ac6rvny7.js} +52 -57
- package/dist/{packager-tool-1d64q5s5.js → packager-tool-b2pkwwj1.js} +1273 -1300
- package/dist/{packager-tool-yetpbbey.js → packager-tool-bbkkxbyq.js} +9 -8
- package/dist/{packager-tool-409n51pv.js → packager-tool-d07g2kpn.js} +7 -7
- package/dist/{packager-tool-8zzmg2f3.js → packager-tool-dx6sjbkd.js} +19 -19
- package/dist/{packager-tool-8g5931fz.js → packager-tool-em4ppegs.js} +36 -43
- package/dist/{packager-tool-zgsvggdr.js → packager-tool-f7rk9xhv.js} +4 -4
- package/dist/{packager-tool-jrnjzs5t.js → packager-tool-fzgfb0jt.js} +32175 -36281
- package/dist/{packager-tool-9rmaeaww.js → packager-tool-gdpw0daf.js} +25211 -11966
- package/dist/packager-tool-hk0fnvz5.js +14 -0
- package/dist/{packager-tool-dbsdy4xx.js → packager-tool-jd3v0bh1.js} +4 -4
- package/dist/{packager-tool-tqjfdpda.js → packager-tool-jmrhzfyj.js} +106 -80
- package/dist/{packager-tool-2px5qqm4.js → packager-tool-kz3t4raw.js} +490 -246
- package/dist/{packager-tool-7bam8cjq.js → packager-tool-mdf7bws6.js} +53255 -27261
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-nkrmjr3a.js → packager-tool-mphfxa9g.js} +125 -125
- package/dist/{packager-tool-kn86394c.js → packager-tool-p123mtfx.js} +66 -692
- package/dist/{packager-tool-t7ahhaer.js → packager-tool-pxq0bwp0.js} +208 -138
- package/dist/{packager-tool-j95w4fj3.js → packager-tool-q0f1dvtd.js} +11 -11
- package/dist/{packager-tool-8qp60s20.js → packager-tool-q2f18crb.js} +3 -3
- package/dist/packager-tool-q2kwk5bf.js +57 -0
- package/dist/{packager-tool-09rvpfjd.js → packager-tool-rxqxza90.js} +192 -183
- package/dist/{packager-tool-3m4ve01f.js → packager-tool-ryds9860.js} +33 -36
- package/dist/{packager-tool-ykbahxma.js → packager-tool-t17t9svg.js} +6 -6
- package/dist/{packager-tool-myhbp761.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
- package/dist/{packager-tool-1frs4sr4.js → packager-tool-yewnsyag.js} +37 -5
- package/dist/packager-tool-zdqbp34f.js +14 -0
- package/dist/{packager-tool-pacrqxv2.js → packager-tool-ze3fnf3s.js} +52 -34
- package/dist/packager-tool.js +12 -32
- package/dist/prepare-uip-ad7mfs8t.js +92 -0
- package/dist/{pt-3KUMINBZ-d0fexmny.js → pt-2RGHDOG4-gwe2ptvg.js} +38 -5
- package/dist/{pt-BR-3LGIH33I-tqbrd89y.js → pt-BR-3LGIH33I-hdf332je.js} +1 -4
- package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
- package/dist/{pt-BR-6VFBW5QT-hsck9gjj.js → pt-BR-IL3KLBID-m1mvqqzb.js} +83 -8
- package/dist/{pt-BR-WNNZTIMN-6fent688.js → pt-BR-JWHVZE6H-gvkknv49.js} +38 -5
- package/dist/{pt-BR-TKHNHMET-4Z5H4N5G-pzw3328h.js → pt-BR-PHLFHMXZ-JFPKUXIZ-gyb27t6e.js} +425 -37
- package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
- package/dist/{pt-RMIAKZB4-t80exmp7.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
- package/dist/{pt-ROXU257Y-OWZOS54V-ywap2t39.js → pt-N7ZTJT4W-GVODJMRX-p5b51p0b.js} +424 -36
- package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
- package/dist/{pt-PFZXVOQH-qshq0b2m.js → pt-PFZXVOQH-xvcm5b61.js} +1 -4
- package/dist/{pt-WOTPKWPZ-1rxcy8hs.js → pt-VLA5IOHO-8t4pze0h.js} +83 -8
- package/dist/{ro-GHOBYW2S-4zevc9dy.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
- package/dist/{ro-KMDT7LYJ-yhpnsdvw.js → ro-53TS7SWG-hnjx1c7b.js} +38 -5
- package/dist/{ro-AN5G62WQ-kcj00jwq.js → ro-AN5G62WQ-fzsv2ymm.js} +1 -4
- package/dist/{ro-AVAWPKOO-6WCG756B-v7pjv1hc.js → ro-FLNXVYJI-ZN43XZKK-2tajkc94.js} +422 -34
- package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
- package/dist/{ro-PB44YXML-zmhhwp5h.js → ro-IRNFX376-mh84zk3n.js} +82 -7
- package/dist/{ru-GSCT4ARZ-FTVCGQTL-gee86v14.js → ru-GSCT4ARZ-FTVCGQTL-v3d4ag31.js} +2 -4
- package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
- package/dist/{ru-T73OPRTC-4knxw497.js → ru-T73OPRTC-50m7tty9.js} +1 -4
- package/dist/{ru-WBLQ5B2U-wemdzdqd.js → ru-WBLQ5B2U-5qpt0mvh.js} +1 -4
- package/dist/{ru-WBLQ5B2U-8r3c7v6d.js → ru-WBLQ5B2U-bf20yr5y.js} +1 -4
- package/dist/{ru-WBLQ5B2U-kdey8qa4.js → ru-WBLQ5B2U-w2wmp3xb.js} +1 -4
- package/dist/{serialization-BXU6AKAN-vdqyr29x.js → serialization-Z3UYT6BW-y9gb55mp.js} +1638 -761
- package/dist/services/extract-schema/default-schema-document.d.ts +31 -0
- package/dist/services/node-service.d.ts +6 -3
- package/dist/services/node-validators/file-node-connection-validator.d.ts +2 -0
- package/dist/services/node-validators/index.d.ts +1 -0
- package/dist/services/orchestrator-connection-field.d.ts +24 -0
- package/dist/services/packaging-utils.d.ts +2 -2
- package/dist/services/vars-reference-rule.d.ts +4 -3
- package/dist/solution-auth-j8x84n5z.js +11 -0
- package/dist/solution-discovery-vn4q32bf.js +38 -0
- package/dist/{tidy-service-hz61ypyj.js → tidy-service-m33hhtc7.js} +37 -55
- package/dist/tool.js +18 -27
- package/dist/{tr-JMIP7ZSL-G3QYPVT2-gswngwcr.js → tr-7AIZZWZ6-ESAESUPL-77g9b7jb.js} +422 -34
- package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
- package/dist/{tr-SEC6RGZ4-0ttavjya.js → tr-EJKY7DVQ-rkctqva4.js} +83 -8
- package/dist/{tr-KHOCWWLF-8apf5y44.js → tr-KHOCWWLF-m9t24j5y.js} +1 -4
- package/dist/{tr-SC55DYHY-e4zgcd4t.js → tr-PIQY7JIT-2mkwk0kq.js} +38 -5
- package/dist/{tr-GDTLECMM-kngksm3r.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
- package/dist/utils/container-ports.d.ts +22 -0
- package/dist/utils/handle-expansion.d.ts +57 -3
- package/dist/utils/workflow-file-format.d.ts +14 -0
- package/dist/validation.js +44 -68
- package/dist/{variable-service-9ex4a93n.js → variable-service-ea1erf93.js} +28 -49
- package/dist/{wait-for-flow-job-b0vj8828.js → wait-for-flow-job-a4xtda36.js} +29 -36
- package/dist/{zh-CN-MX7VIOF2-xznrtchf.js → zh-CN-4FH7E7UL-84y6j2ea.js} +82 -7
- package/dist/{zh-CN-4NI2EGMV-8g027vv3.js → zh-CN-4NI2EGMV-dt0wg0wh.js} +1 -4
- package/dist/{zh-CN-IFFXSEJS-MZQ4HU3Z-ge1ynmtz.js → zh-CN-CN2ARPFS-NIQTWDK2-b5c91fwn.js} +422 -34
- package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
- package/dist/{en-BPJVY3U7-xkpj5xc5.js → zh-CN-NIEVKROA-q4tbbwqz.js} +26 -7
- package/dist/{zh-CN-I5D7WHBD-ge92tbx9.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
- package/dist/{zh-TW-53SU6EH4-33x57egq.js → zh-TW-53SU6EH4-w0wz3nwg.js} +1 -4
- package/dist/{zh-TW-5SJ3GZT2-bsg054mw.js → zh-TW-5WQA6QTM-hns69sd4.js} +83 -8
- package/dist/{zh-TW-IYBNYAMG-J7FWTQTK-sx8d4ymg.js → zh-TW-7RUFEVFK-VKVRSVTP-jq2pcmar.js} +421 -33
- package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
- package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
- package/dist/{zh-TW-TN3MPNXL-jcgg2hcs.js → zh-TW-MSQM7YTT-m7r7nwnj.js} +38 -5
- package/package.json +2 -2
- package/dist/authoring-e1k40hyw.js +0 -24
- package/dist/binding-service-0qffbxg7.js +0 -157
- package/dist/de-FGHEJRCI-gn4cf5gh.js +0 -2697
- package/dist/de-MUJPA4EB-209jpeqe.js +0 -173
- package/dist/de-UZI7FJDO-mwvc4cxe.js +0 -200
- package/dist/debug-conversation-trigger-2crr9w4n.js +0 -30
- package/dist/debug-http-client-yqjzsnhw.js +0 -32
- package/dist/debug-service-nra3n02y.js +0 -61
- package/dist/edge-service-y44f2rgd.js +0 -170
- package/dist/en-E454CJNK-ytfw06kj.js +0 -98
- package/dist/en-EJCBA3LK-0wb3b1xy.js +0 -146
- package/dist/en-EJCBA3LK-dtpdghgj.js +0 -146
- package/dist/en-GN2ZGWUE-03z2df4k.js +0 -136
- package/dist/en-LQHKFSEY-vvbe8ve9.js +0 -26
- package/dist/en-M7GQYBV2-5nfmpnfz.js +0 -2018
- package/dist/en-TBNO2WUV-77KTKLDE-4ktf0pqw.js +0 -1942
- package/dist/en-TBNO2WUV-9nan43e5.js +0 -1936
- package/dist/es-4UBUTCQA-m1ytpyx2.js +0 -200
- package/dist/es-7SE7HX2X-qda7whn6.js +0 -173
- package/dist/es-KR3ZSNMP-0cszm2n3.js +0 -2697
- package/dist/es-MX-2MYFZU7X-6v0q5rbn.js +0 -173
- package/dist/es-MX-5RELIXKI-9jhqtddc.js +0 -200
- package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +0 -2697
- package/dist/filter-engine-7ep90g7f.js +0 -11
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/flow-api-sat010z1.js +0 -42
- package/dist/flow-eval-node-target-cwxb4kfe.js +0 -52
- package/dist/flow-eval-run-api-xdygjzfv.js +0 -13
- package/dist/flow-init-service-k7k5vx2z.js +0 -47
- package/dist/flow-io-2qdyj5e0.js +0 -44
- package/dist/flow-validate-service-x2mbk3et.js +0 -70
- package/dist/fr-MDFKNZ4C-qmypp92m.js +0 -173
- package/dist/fr-VBM5WRC2-63z7w4mh.js +0 -200
- package/dist/fr-Y6NPVODW-q5ef3htr.js +0 -2697
- package/dist/index-cg9qhfb1.js +0 -635
- package/dist/index-d090f35d.js +0 -66
- package/dist/index-gxcjq6ns.js +0 -110
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/index-nsn889vf.js +0 -27
- package/dist/index-sqhbn7ew.js +0 -157
- package/dist/index-wycgq0ff.js +0 -3178
- package/dist/index-y1ym28vg.js +0 -667
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/inline-entity-resolver-c854cqma.js +0 -45
- package/dist/input-reader-n7kzdrev.js +0 -12
- package/dist/ja-43QL7CGO-h6qfxfay.js +0 -200
- package/dist/ja-MDG4BKZQ-gayaca2c.js +0 -38
- package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +0 -2697
- package/dist/ja-UTQEAP34-hvyf683h.js +0 -173
- package/dist/known-types-r51zxb9g.js +0 -19
- package/dist/ko-AXCHW2OK-pkwdcbmx.js +0 -173
- package/dist/ko-AYBDSRZG-am0h0m2r.js +0 -2697
- package/dist/ko-TLL6Z6CD-ag6gjynr.js +0 -200
- package/dist/localization-d6gjmrsw.js +0 -47
- package/dist/maestro-automate-entry-6f9act3w.js +0 -22
- package/dist/node-service-d4xpqs0z.js +0 -92
- package/dist/node-sync-service-76b9e4r5.js +0 -61
- package/dist/packager-tool-0gctz400.js +0 -17
- package/dist/packager-tool-4mna26cc.js +0 -133
- package/dist/packager-tool-4x7tzvv0.js +0 -1176
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-6ejqwbw9.js +0 -26
- package/dist/packager-tool-6z1hsm2h.js +0 -143
- package/dist/packager-tool-7ja1b5hh.js +0 -8809
- package/dist/packager-tool-9era57c0.js +0 -28
- package/dist/packager-tool-9jxzgsxc.js +0 -14
- package/dist/packager-tool-c23zrhj8.js +0 -11
- package/dist/packager-tool-d6qf5qmb.js +0 -49
- package/dist/packager-tool-e3yks66r.js +0 -95
- package/dist/packager-tool-e5hj89zm.js +0 -6
- package/dist/packager-tool-e87tzg4y.js +0 -1937
- package/dist/packager-tool-eypvc2kv.js +0 -23
- package/dist/packager-tool-gbgfwx8f.js +0 -2
- package/dist/packager-tool-hk1gxnth.js +0 -11
- package/dist/packager-tool-hxyjn885.js +0 -24
- package/dist/packager-tool-j78fwwhq.js +0 -16
- package/dist/packager-tool-jgfzfqjm.js +0 -53
- package/dist/packager-tool-jysvpt8p.js +0 -11
- package/dist/packager-tool-m3wkcxf5.js +0 -11
- package/dist/packager-tool-mcaf4ewf.js +0 -46
- package/dist/packager-tool-mgcz986r.js +0 -143
- package/dist/packager-tool-p79yh9ww.js +0 -97
- package/dist/packager-tool-paq9c70w.js +0 -1332
- package/dist/packager-tool-pcvhcn2k.js +0 -2019
- package/dist/packager-tool-qkn0c042.js +0 -1922
- package/dist/packager-tool-qszay16r.js +0 -180
- package/dist/packager-tool-red2crtp.js +0 -5367
- package/dist/packager-tool-rs6jm14d.js +0 -23
- package/dist/packager-tool-s7wb0s9n.js +0 -6297
- package/dist/packager-tool-sc961w0q.js +0 -16
- package/dist/packager-tool-skcjythd.js +0 -22085
- package/dist/packager-tool-t07ev0jj.js +0 -1083
- package/dist/packager-tool-xj0agqpk.js +0 -11
- package/dist/packager-tool-z83pga0z.js +0 -1942
- package/dist/pt-3DIO5QWG-hb763vct.js +0 -173
- package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +0 -2697
- package/dist/pt-BR-USP2T7GD-rppy42ym.js +0 -200
- package/dist/pt-BR-Y6K6XHXK-37a932vp.js +0 -173
- package/dist/pt-RMIAKZB4-67enhx3m.js +0 -200
- package/dist/pt-ROXU257Y-yd80gx6s.js +0 -2697
- package/dist/ro-AVAWPKOO-42m6am1w.js +0 -2697
- package/dist/ro-BWR3ONRR-jmap5ajd.js +0 -173
- package/dist/ro-GHOBYW2S-mhnqsgaa.js +0 -200
- package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
- package/dist/ru-GSCT4ARZ-jrxwev63.js +0 -10
- package/dist/ru-WBLQ5B2U-dpqvtfwr.js +0 -10
- package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
- package/dist/shared-utils-tqnx96mg.js +0 -21
- package/dist/solution-auth-8qz5pw7z.js +0 -14
- package/dist/solution-discovery-6t0z143v.js +0 -44
- package/dist/tr-5IIHSFW5-stsb3dar.js +0 -173
- package/dist/tr-GDTLECMM-k5fhmq13.js +0 -200
- package/dist/tr-JMIP7ZSL-fb67ft9w.js +0 -2696
- package/dist/zh-CN-I5D7WHBD-sr5h0a98.js +0 -200
- package/dist/zh-CN-IFFXSEJS-tke4mzty.js +0 -2697
- package/dist/zh-CN-OUMLDKDS-q3a1rr5c.js +0 -38
- package/dist/zh-CN-R2KU4U5L-q4yhc33t.js +0 -173
- package/dist/zh-TW-2AVLM723-xsmap3gk.js +0 -200
- package/dist/zh-TW-GNKMELBF-r4ay2475.js +0 -173
- package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +0 -2697
- /package/dist/{packager-tool-yc4kw997.js → packager-tool-1qg04b7q.js} +0 -0
- /package/dist/{packager-tool-cqtsj6yh.js → packager-tool-2sazb7th.js} +0 -0
- /package/dist/{packager-tool-s9ff3kk4.js → packager-tool-887wr6jm.js} +0 -0
- /package/dist/{packager-tool-aw9v0raw.js → packager-tool-8c7nddd1.js} +0 -0
- /package/dist/{packager-tool-9cq9atem.js → packager-tool-a9xgmn1q.js} +0 -0
- /package/dist/{packager-tool-4kr6g0zw.js → packager-tool-cvh1a0nm.js} +0 -0
- /package/dist/{packager-tool-27avrkyk.js → packager-tool-k3egwd1m.js} +0 -0
- /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
- /package/dist/{packager-tool-10vc8pq4.js → packager-tool-wr7gn964.js} +0 -0
|
@@ -1,146 +1,178 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
IDP_PROCESSOR_BINDING_RESOURCE,
|
|
4
|
-
isContainerNodeManifest,
|
|
5
|
-
readIdpProcessorKey
|
|
6
|
-
} from "./packager-tool-qszay16r.js";
|
|
7
|
-
import {
|
|
8
|
-
require_lib
|
|
9
|
-
} from "./packager-tool-zfrp8ecz.js";
|
|
10
|
-
import {
|
|
11
|
-
en_default
|
|
12
|
-
} from "./packager-tool-e3yks66r.js";
|
|
13
|
-
import {
|
|
14
|
-
AmbiguousAgentInputRootError,
|
|
15
|
-
CONNECTOR_PARAM_BUCKET_KEYS,
|
|
16
|
-
DATA_TRANSFORM_NODE_TYPES,
|
|
17
|
-
DEFAULT_AGENT_INPUT_ENCODING,
|
|
18
|
-
ITERATOR_FIELDS,
|
|
19
|
-
SCHEMA_CONTAINER_MARKER,
|
|
20
|
-
SCRIPT_TASK_NODE_TYPES,
|
|
21
|
-
UnresolvedAgentInputTypeError,
|
|
22
|
-
buildAgentInputTypeResolver,
|
|
23
|
-
buildDerivedInputDefinition,
|
|
24
|
-
canPruneAgentInputs,
|
|
25
|
-
collectArtifactDescendants,
|
|
26
|
-
collectCompositeConnectorInputs,
|
|
27
|
-
collectInlineAgentClusterInputs,
|
|
28
|
-
collectInlineAgentInputsFromAgent,
|
|
29
|
-
compositeConnectorInputKey,
|
|
30
|
-
deriveAgentInputVariables,
|
|
31
|
-
deriveMergedAgentInputVariables,
|
|
32
|
-
detectAmbiguousAgentInputRoot,
|
|
33
|
-
extractAgentInputName,
|
|
34
|
-
getContainerChildProps,
|
|
35
|
-
isCompositeConnectorValue,
|
|
36
|
-
mergeCompositeConnectorInputs,
|
|
37
|
-
preDeriveAgentInputDefinitions,
|
|
38
|
-
rewriteInputTokensToSource,
|
|
39
|
-
rewriteStringsDeep,
|
|
40
|
-
scanSourceRefsDeep,
|
|
41
|
-
serializeExpressionValue,
|
|
42
|
-
serializeExpressionValueAsMappingSource,
|
|
43
|
-
serializeTemplateInterpolations,
|
|
44
|
-
transformEdgeExpression,
|
|
45
|
-
transformExpression,
|
|
46
|
-
transformNodeExpressions,
|
|
47
|
-
unwrapScriptBody
|
|
48
|
-
} from "./packager-tool-t07ev0jj.js";
|
|
49
|
-
import {
|
|
50
|
-
FIRE_AND_FORGET_INPUT,
|
|
51
|
-
IN_FILTER_OPERATOR,
|
|
52
|
-
JIT_OBJECT_INPUT_MODE,
|
|
2
|
+
init_esm_shims,
|
|
53
3
|
JSON_STRING_PREFIX,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
4
|
+
JIT_OBJECT_INPUT_MODE,
|
|
5
|
+
parseConfigurationJson,
|
|
6
|
+
generateNodeVariables2,
|
|
7
|
+
instance,
|
|
8
|
+
FIRE_AND_FORGET_INPUT2,
|
|
9
|
+
getResourceByServiceType,
|
|
10
|
+
AGENTIC_SWITCH_NODE_TYPE,
|
|
11
|
+
AGENTIC_SWITCH_DEFAULT_MODEL,
|
|
12
|
+
AGENTIC_SWITCH_QUESTION_ID,
|
|
13
|
+
AGENTIC_SWITCH_DEFAULT_THRESHOLD,
|
|
14
|
+
ERROR_HANDLE_ID,
|
|
15
|
+
TIMEOUT_HANDLE_ID,
|
|
16
|
+
TIMEOUT_ERROR_CODE,
|
|
17
|
+
TIMEOUT_HANDLE_OFFSETS,
|
|
57
18
|
VARS_IDENTIFIER,
|
|
19
|
+
expressionText,
|
|
20
|
+
toEngineRefPath,
|
|
21
|
+
isEngineRef,
|
|
22
|
+
engineRefNeedsJsEvaluator,
|
|
23
|
+
isMultiRecordRead,
|
|
58
24
|
clampRecordLimit,
|
|
59
25
|
clampRecordSkip,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
IN_FILTER_OPERATOR,
|
|
27
|
+
NOT_IN_FILTER_OPERATOR,
|
|
28
|
+
LEGACY_IN_FILTER_OPERATOR,
|
|
29
|
+
IS_NULL_FILTER_OPERATOR,
|
|
30
|
+
IS_NOT_NULL_FILTER_OPERATOR,
|
|
31
|
+
IS_TRUE_FILTER_OPERATOR,
|
|
32
|
+
IS_FALSE_FILTER_OPERATOR,
|
|
33
|
+
isValuelessFilterOperator,
|
|
34
|
+
isValueListFilterOperator,
|
|
35
|
+
splitInValues,
|
|
63
36
|
filterRowWasAuthored,
|
|
64
37
|
filterRowYieldsPredicate,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
isEngineRef,
|
|
70
|
-
isFileType,
|
|
71
|
-
isMultiRecordRead,
|
|
72
|
-
isValueListFilterOperator,
|
|
73
|
-
parseConfigurationJson,
|
|
38
|
+
filterRowDropWouldWiden,
|
|
39
|
+
toFilterModel,
|
|
40
|
+
filterModelRows,
|
|
41
|
+
normalizeSingleRecordFilters,
|
|
74
42
|
publishedRecordIdReference,
|
|
43
|
+
isFileType,
|
|
75
44
|
resolveUpdateRecordSource,
|
|
76
|
-
splitInValues,
|
|
77
45
|
stripVarsPrefix,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
parseDoWhileLimit,
|
|
120
|
-
relatedColumnMapIn,
|
|
121
|
-
relatedPathsIn,
|
|
122
|
-
resolveContextBindingPlaceholders,
|
|
123
|
-
resolveDoWhileLimit,
|
|
124
|
-
supportsVariableUpdates,
|
|
125
|
-
validateRelatedPaths
|
|
126
|
-
} from "./packager-tool-s7wb0s9n.js";
|
|
46
|
+
findTerminalNodes,
|
|
47
|
+
ITERATOR_FIELDS2,
|
|
48
|
+
assetsOnlyReference,
|
|
49
|
+
soleInterpolation,
|
|
50
|
+
SCRIPT_TASK_NODE_TYPES,
|
|
51
|
+
DATA_TRANSFORM_NODE_TYPES,
|
|
52
|
+
unwrapScriptBody,
|
|
53
|
+
serializeTemplateInterpolations2,
|
|
54
|
+
transformExpression,
|
|
55
|
+
serializeExpressionValueAsMappingSource,
|
|
56
|
+
normalizeJsExpressionBody,
|
|
57
|
+
serializeExpressionValue,
|
|
58
|
+
transformNodeExpressions,
|
|
59
|
+
transformEdgeExpression,
|
|
60
|
+
CONNECTOR_PARAM_BUCKET_KEYS2,
|
|
61
|
+
extractAgentInputName2,
|
|
62
|
+
isCompositeConnectorValue2,
|
|
63
|
+
compositeConnectorInputKey2,
|
|
64
|
+
collectCompositeConnectorInputs2,
|
|
65
|
+
rewriteInputTokensToSource2,
|
|
66
|
+
buildBindingMap2,
|
|
67
|
+
UnresolvedAgentInputTypeError2,
|
|
68
|
+
AmbiguousAgentInputRootError2,
|
|
69
|
+
AgentInputNameCollisionError2,
|
|
70
|
+
detectAmbiguousAgentInputRoot2,
|
|
71
|
+
AgentAssetInputError,
|
|
72
|
+
buildAgentInputTypeResolver2,
|
|
73
|
+
canPruneAgentInputs2,
|
|
74
|
+
deriveAgentInputVariables2,
|
|
75
|
+
scanSourceRefsDeep2,
|
|
76
|
+
collectInlineAgentClusterInputs2,
|
|
77
|
+
collectInlineAgentInputsFromAgent2,
|
|
78
|
+
collectArtifactDescendants2,
|
|
79
|
+
findEmbeddedConnectorAssets2,
|
|
80
|
+
mergeCompositeConnectorInputs2,
|
|
81
|
+
deriveMergedAgentInputVariables2,
|
|
82
|
+
preDeriveAgentInputDefinitions,
|
|
83
|
+
buildDerivedInputDefinition,
|
|
84
|
+
rewriteStringsDeep2,
|
|
85
|
+
telemetryService
|
|
86
|
+
} from "./packager-tool-mdf7bws6.js";
|
|
127
87
|
import {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
88
|
+
JS_EXPRESSION_PREFIX2,
|
|
89
|
+
isExpressionValue2,
|
|
90
|
+
decodeLiteral2,
|
|
91
|
+
getJsExpressionBody2,
|
|
92
|
+
hasMustache2,
|
|
93
|
+
templateInterpolationBody2,
|
|
94
|
+
QES_UNSAFE_CHAR2,
|
|
95
|
+
isQesUncarryableValue2,
|
|
96
|
+
FLAT_SEP2,
|
|
97
|
+
isUnsafeKey2,
|
|
98
|
+
isPlainObject2,
|
|
99
|
+
asNonEmptyString2,
|
|
100
|
+
isTriggerNodeType2,
|
|
101
|
+
isEndNodeType2,
|
|
102
|
+
LOOP_NODE_TYPE2,
|
|
103
|
+
DOWHILE_NODE_TYPE2,
|
|
104
|
+
isLoopNodeType2,
|
|
105
|
+
ERROR_HANDLER_NODE_TYPE2,
|
|
106
|
+
ERROR_HANDLER_ENTRY_HANDLE2,
|
|
107
|
+
ERROR_HANDLER_DONE_HANDLE2,
|
|
108
|
+
isErrorHandlerNodeType2,
|
|
109
|
+
getOutputMappings2,
|
|
110
|
+
isCollectionLoopNodeType2,
|
|
111
|
+
isDoWhileNodeType2,
|
|
112
|
+
DOWHILE_MAX_LIMIT2,
|
|
113
|
+
DOWHILE_MIN_LIMIT2,
|
|
114
|
+
parseDoWhileLimit2,
|
|
115
|
+
resolveDoWhileLimit2,
|
|
116
|
+
DECISION_NODE_TYPE2,
|
|
117
|
+
MOCK_NODE_TYPE2,
|
|
118
|
+
supportsVariableUpdates2,
|
|
119
|
+
SUBFLOW_NODE_TYPE2,
|
|
120
|
+
isConversationalOrVoiceAgentNodeType2,
|
|
121
|
+
isVoiceAgentNodeType2,
|
|
122
|
+
isAgentNodeType2,
|
|
123
|
+
isAgentResourceNodeType2,
|
|
124
|
+
isCallContextEmpty2,
|
|
125
|
+
HITL_NODE_TYPE2,
|
|
126
|
+
HITL_CODED_ACTION_NODE_TYPE2,
|
|
127
|
+
HITL_DOC_VALIDATION_NODE_TYPE2,
|
|
128
|
+
HITL_DOC_CLASSIFICATION_NODE_TYPE2,
|
|
129
|
+
isHitlNodeType2,
|
|
130
|
+
isHitlCodedActionNodeType2,
|
|
131
|
+
METADATA_IDENTIFIER2,
|
|
132
|
+
splitPathSegments2,
|
|
133
|
+
DEFAULT_AGENT_INPUT_ENCODING2,
|
|
134
|
+
relatedPathsIn2,
|
|
135
|
+
relatedColumnMapIn2,
|
|
136
|
+
validateRelatedPaths2,
|
|
137
|
+
isIsoDuration2,
|
|
138
|
+
isTimeLimitEnabled2,
|
|
139
|
+
resolveTimeLimitDuration2,
|
|
140
|
+
RETRY_DEFAULTS2,
|
|
141
|
+
retryBackoffHasMaxDuration2,
|
|
142
|
+
resolveRetry2,
|
|
143
|
+
isGatewayNodeType2,
|
|
144
|
+
getGatewayBranches2,
|
|
145
|
+
getGatewayConditionSources2,
|
|
146
|
+
rewriteGatewayExpressions2,
|
|
147
|
+
CONNECTOR_TRIGGER_PREFIX2,
|
|
148
|
+
CONNECTOR_EVENT_PREFIX2,
|
|
149
|
+
BINDINGS_PATH_PREFIX2,
|
|
150
|
+
canonicalizeResourceCasing2,
|
|
151
|
+
isStartEventNode2,
|
|
152
|
+
isTriggerScopedInput2,
|
|
153
|
+
getEffectiveTriggerInputs2,
|
|
154
|
+
parseBindingPlaceholder2,
|
|
155
|
+
resolveContextBindingPlaceholders2,
|
|
156
|
+
matchContextBindings2,
|
|
157
|
+
UnresolvedBindingsError2,
|
|
158
|
+
SCHEMA_CONTAINER_MARKER2,
|
|
159
|
+
getContainerChildProps2
|
|
160
|
+
} from "./packager-tool-fzgfb0jt.js";
|
|
132
161
|
import {
|
|
133
|
-
|
|
134
|
-
|
|
162
|
+
isContainerNodeManifest,
|
|
163
|
+
readIdpProcessorKey,
|
|
164
|
+
IDP_PROCESSOR_BINDING_RESOURCE,
|
|
165
|
+
IDP_PROCESSOR_BINDING_NAME,
|
|
166
|
+
IDP_PROCESSOR_FOLDER_PATH_BINDING_NAME,
|
|
167
|
+
IDP_PROCESSOR_NAME_BINDING_NAME,
|
|
168
|
+
SERVICES_NAMESPACE
|
|
169
|
+
} from "./packager-tool-6vhefpmq.js";
|
|
135
170
|
import {
|
|
136
|
-
|
|
137
|
-
} from "./packager-tool-
|
|
138
|
-
import"./packager-tool-4mna26cc.js";
|
|
139
|
-
import"./packager-tool-c23zrhj8.js";
|
|
171
|
+
require_lib
|
|
172
|
+
} from "./packager-tool-951nhh3e.js";
|
|
140
173
|
import {
|
|
141
|
-
__require,
|
|
142
174
|
__toESM
|
|
143
|
-
} from "./packager-tool-
|
|
175
|
+
} from "./packager-tool-6an893wm.js";
|
|
144
176
|
|
|
145
177
|
// ../../node_modules/min-dash/dist/index.esm.js
|
|
146
178
|
var nativeToString = Object.prototype.toString;
|
|
@@ -498,7 +530,7 @@ DescriptorBuilder.prototype.addTrait = function(t, inherited) {
|
|
|
498
530
|
Object.defineProperty(p, "definedBy", {
|
|
499
531
|
value: t
|
|
500
532
|
});
|
|
501
|
-
var
|
|
533
|
+
var replaces = p.replaces, redefines = p.redefines;
|
|
502
534
|
if (replaces || redefines) {
|
|
503
535
|
this.redefineProperty(p, replaces || redefines, replaces);
|
|
504
536
|
} else {
|
|
@@ -574,9 +606,9 @@ Registry.prototype.registerType = function(type, pkg) {
|
|
|
574
606
|
Registry.prototype.mapTypes = function(nsName, iterator, trait) {
|
|
575
607
|
var type = isBuiltIn(nsName.name) ? { name: nsName.name } : this.typeMap[nsName.name];
|
|
576
608
|
var self = this;
|
|
577
|
-
function traverse(cls,
|
|
609
|
+
function traverse(cls, trait) {
|
|
578
610
|
var parentNs = parseName(cls, isBuiltIn(cls) ? "" : nsName.prefix);
|
|
579
|
-
self.mapTypes(parentNs, iterator,
|
|
611
|
+
self.mapTypes(parentNs, iterator, trait);
|
|
580
612
|
}
|
|
581
613
|
function traverseTrait(cls) {
|
|
582
614
|
return traverse(cls, true);
|
|
@@ -957,56 +989,56 @@ function Parser(options) {
|
|
|
957
989
|
if (cachedAttrs !== null) {
|
|
958
990
|
return cachedAttrs;
|
|
959
991
|
}
|
|
960
|
-
var nsUri, nsUriPrefix, nsName, defaultAlias = isNamespace && nsMatrix["xmlns"], attrList = isNamespace && maybeNS ? [] : null,
|
|
992
|
+
var nsUri, nsUriPrefix, nsName, defaultAlias = isNamespace && nsMatrix["xmlns"], attrList = isNamespace && maybeNS ? [] : null, i = attrsStart, s = attrsString, l = s.length, hasNewMatrix, newalias, value, alias, name, attrs = {}, seenAttrs = {}, skipAttr, w, j;
|
|
961
993
|
parseAttr:
|
|
962
|
-
for (;
|
|
994
|
+
for (;i < l; i++) {
|
|
963
995
|
skipAttr = false;
|
|
964
|
-
|
|
965
|
-
if (
|
|
996
|
+
w = s.charCodeAt(i);
|
|
997
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
966
998
|
continue;
|
|
967
999
|
}
|
|
968
|
-
if (
|
|
969
|
-
if (
|
|
1000
|
+
if (w < 65 || w > 122 || w > 90 && w < 97) {
|
|
1001
|
+
if (w !== 95 && w !== 58) {
|
|
970
1002
|
handleWarning("illegal first char attribute name");
|
|
971
1003
|
skipAttr = true;
|
|
972
1004
|
}
|
|
973
1005
|
}
|
|
974
|
-
for (
|
|
975
|
-
|
|
976
|
-
if (
|
|
1006
|
+
for (j = i + 1;j < l; j++) {
|
|
1007
|
+
w = s.charCodeAt(j);
|
|
1008
|
+
if (w > 96 && w < 123 || w > 64 && w < 91 || w > 47 && w < 59 || w === 46 || w === 45 || w === 95) {
|
|
977
1009
|
continue;
|
|
978
1010
|
}
|
|
979
|
-
if (
|
|
1011
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
980
1012
|
handleWarning("missing attribute value");
|
|
981
|
-
|
|
1013
|
+
i = j;
|
|
982
1014
|
continue parseAttr;
|
|
983
1015
|
}
|
|
984
|
-
if (
|
|
1016
|
+
if (w === 61) {
|
|
985
1017
|
break;
|
|
986
1018
|
}
|
|
987
1019
|
handleWarning("illegal attribute name char");
|
|
988
1020
|
skipAttr = true;
|
|
989
1021
|
}
|
|
990
|
-
name = s.substring(
|
|
1022
|
+
name = s.substring(i, j);
|
|
991
1023
|
if (name === "xmlns:xmlns") {
|
|
992
1024
|
handleWarning("illegal declaration of xmlns");
|
|
993
1025
|
skipAttr = true;
|
|
994
1026
|
}
|
|
995
|
-
|
|
996
|
-
if (
|
|
997
|
-
|
|
998
|
-
if (
|
|
999
|
-
|
|
1000
|
-
if (
|
|
1027
|
+
w = s.charCodeAt(j + 1);
|
|
1028
|
+
if (w === 34) {
|
|
1029
|
+
j = s.indexOf('"', i = j + 2);
|
|
1030
|
+
if (j === -1) {
|
|
1031
|
+
j = s.indexOf("'", i);
|
|
1032
|
+
if (j !== -1) {
|
|
1001
1033
|
handleWarning("attribute value quote missmatch");
|
|
1002
1034
|
skipAttr = true;
|
|
1003
1035
|
}
|
|
1004
1036
|
}
|
|
1005
|
-
} else if (
|
|
1006
|
-
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1009
|
-
if (
|
|
1037
|
+
} else if (w === 39) {
|
|
1038
|
+
j = s.indexOf("'", i = j + 2);
|
|
1039
|
+
if (j === -1) {
|
|
1040
|
+
j = s.indexOf('"', i);
|
|
1041
|
+
if (j !== -1) {
|
|
1010
1042
|
handleWarning("attribute value quote missmatch");
|
|
1011
1043
|
skipAttr = true;
|
|
1012
1044
|
}
|
|
@@ -1014,33 +1046,33 @@ function Parser(options) {
|
|
|
1014
1046
|
} else {
|
|
1015
1047
|
handleWarning("missing attribute value quotes");
|
|
1016
1048
|
skipAttr = true;
|
|
1017
|
-
for (
|
|
1018
|
-
|
|
1019
|
-
if (
|
|
1049
|
+
for (j = j + 1;j < l; j++) {
|
|
1050
|
+
w = s.charCodeAt(j + 1);
|
|
1051
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
1020
1052
|
break;
|
|
1021
1053
|
}
|
|
1022
1054
|
}
|
|
1023
1055
|
}
|
|
1024
|
-
if (
|
|
1056
|
+
if (j === -1) {
|
|
1025
1057
|
handleWarning("missing closing quotes");
|
|
1026
|
-
|
|
1058
|
+
j = l;
|
|
1027
1059
|
skipAttr = true;
|
|
1028
1060
|
}
|
|
1029
1061
|
if (!skipAttr) {
|
|
1030
|
-
value = s.substring(
|
|
1062
|
+
value = s.substring(i, j);
|
|
1031
1063
|
}
|
|
1032
|
-
|
|
1033
|
-
for (;
|
|
1034
|
-
|
|
1035
|
-
if (
|
|
1064
|
+
i = j;
|
|
1065
|
+
for (;j + 1 < l; j++) {
|
|
1066
|
+
w = s.charCodeAt(j + 1);
|
|
1067
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
1036
1068
|
break;
|
|
1037
1069
|
}
|
|
1038
|
-
if (
|
|
1070
|
+
if (i === j) {
|
|
1039
1071
|
handleWarning("illegal character after attribute end");
|
|
1040
1072
|
skipAttr = true;
|
|
1041
1073
|
}
|
|
1042
1074
|
}
|
|
1043
|
-
|
|
1075
|
+
i = j + 1;
|
|
1044
1076
|
if (skipAttr) {
|
|
1045
1077
|
continue parseAttr;
|
|
1046
1078
|
}
|
|
@@ -1087,29 +1119,29 @@ function Parser(options) {
|
|
|
1087
1119
|
attrList.push(name, value);
|
|
1088
1120
|
continue;
|
|
1089
1121
|
}
|
|
1090
|
-
|
|
1091
|
-
if (
|
|
1122
|
+
w = name.indexOf(":");
|
|
1123
|
+
if (w === -1) {
|
|
1092
1124
|
attrs[name] = value;
|
|
1093
1125
|
continue;
|
|
1094
1126
|
}
|
|
1095
|
-
if (!(nsName = nsMatrix[name.substring(0,
|
|
1096
|
-
handleWarning(missingNamespaceForPrefix(name.substring(0,
|
|
1127
|
+
if (!(nsName = nsMatrix[name.substring(0, w)])) {
|
|
1128
|
+
handleWarning(missingNamespaceForPrefix(name.substring(0, w)));
|
|
1097
1129
|
continue;
|
|
1098
1130
|
}
|
|
1099
|
-
name = defaultAlias === nsName ? name.substr(
|
|
1131
|
+
name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w);
|
|
1100
1132
|
attrs[name] = value;
|
|
1101
1133
|
}
|
|
1102
1134
|
if (maybeNS) {
|
|
1103
|
-
for (
|
|
1104
|
-
name = attrList[
|
|
1105
|
-
value = attrList[
|
|
1106
|
-
|
|
1107
|
-
if (
|
|
1108
|
-
if (!(nsName = nsMatrix[name.substring(0,
|
|
1109
|
-
handleWarning(missingNamespaceForPrefix(name.substring(0,
|
|
1135
|
+
for (i = 0, l = attrList.length;i < l; i++) {
|
|
1136
|
+
name = attrList[i++];
|
|
1137
|
+
value = attrList[i];
|
|
1138
|
+
w = name.indexOf(":");
|
|
1139
|
+
if (w !== -1) {
|
|
1140
|
+
if (!(nsName = nsMatrix[name.substring(0, w)])) {
|
|
1141
|
+
handleWarning(missingNamespaceForPrefix(name.substring(0, w)));
|
|
1110
1142
|
continue;
|
|
1111
1143
|
}
|
|
1112
|
-
name = defaultAlias === nsName ? name.substr(
|
|
1144
|
+
name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w);
|
|
1113
1145
|
}
|
|
1114
1146
|
attrs[name] = value;
|
|
1115
1147
|
}
|
|
@@ -1553,13 +1585,13 @@ ElementHandler.prototype.handleEnd = function() {
|
|
|
1553
1585
|
}
|
|
1554
1586
|
};
|
|
1555
1587
|
ElementHandler.prototype.createElement = function(node) {
|
|
1556
|
-
var attributes = node.attributes, Type = this.type, descriptor = getModdleDescriptor(Type), context = this.context,
|
|
1588
|
+
var attributes = node.attributes, Type = this.type, descriptor = getModdleDescriptor(Type), context = this.context, instance = new Type({}), model = this.model, propNameNs;
|
|
1557
1589
|
forEach(attributes, function(value, name) {
|
|
1558
1590
|
var prop = descriptor.propertiesByName[name], values;
|
|
1559
1591
|
if (prop && prop.isReference) {
|
|
1560
1592
|
if (!prop.isMany) {
|
|
1561
1593
|
context.addReference({
|
|
1562
|
-
element:
|
|
1594
|
+
element: instance,
|
|
1563
1595
|
property: prop.ns.name,
|
|
1564
1596
|
id: value
|
|
1565
1597
|
});
|
|
@@ -1567,7 +1599,7 @@ ElementHandler.prototype.createElement = function(node) {
|
|
|
1567
1599
|
values = value.split(" ");
|
|
1568
1600
|
forEach(values, function(v) {
|
|
1569
1601
|
context.addReference({
|
|
1570
|
-
element:
|
|
1602
|
+
element: instance,
|
|
1571
1603
|
property: prop.ns.name,
|
|
1572
1604
|
id: v
|
|
1573
1605
|
});
|
|
@@ -1583,16 +1615,16 @@ ElementHandler.prototype.createElement = function(node) {
|
|
|
1583
1615
|
if (model.getPackage(propNameNs.prefix)) {
|
|
1584
1616
|
context.addWarning({
|
|
1585
1617
|
message: "unknown attribute <" + name + ">",
|
|
1586
|
-
element:
|
|
1618
|
+
element: instance,
|
|
1587
1619
|
property: name,
|
|
1588
1620
|
value
|
|
1589
1621
|
});
|
|
1590
1622
|
}
|
|
1591
1623
|
}
|
|
1592
|
-
|
|
1624
|
+
instance.set(name, value);
|
|
1593
1625
|
}
|
|
1594
1626
|
});
|
|
1595
|
-
return
|
|
1627
|
+
return instance;
|
|
1596
1628
|
};
|
|
1597
1629
|
ElementHandler.prototype.getPropertyForNode = function(node) {
|
|
1598
1630
|
var name = node.name;
|
|
@@ -1742,7 +1774,7 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1742
1774
|
var context = new Context(assign({}, options, { rootHandler })), parser = new Parser({ proxy: true }), stack = createStack();
|
|
1743
1775
|
rootHandler.context = context;
|
|
1744
1776
|
stack.push(rootHandler);
|
|
1745
|
-
function handleError(err, getContext,
|
|
1777
|
+
function handleError(err, getContext, lax) {
|
|
1746
1778
|
var ctx = getContext();
|
|
1747
1779
|
var { line, column, data } = ctx;
|
|
1748
1780
|
if (data.charAt(0) === "<" && data.indexOf(" ") !== -1) {
|
|
@@ -1752,7 +1784,7 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1752
1784
|
` + "line: " + line + `
|
|
1753
1785
|
` + "column: " + column + `
|
|
1754
1786
|
` + "nested error: " + err.message;
|
|
1755
|
-
if (
|
|
1787
|
+
if (lax) {
|
|
1756
1788
|
context.addWarning({
|
|
1757
1789
|
message,
|
|
1758
1790
|
error: err
|
|
@@ -1838,12 +1870,12 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1838
1870
|
}
|
|
1839
1871
|
handleCData(text, getContext);
|
|
1840
1872
|
}
|
|
1841
|
-
var uriMap = model.getPackages().reduce(function(
|
|
1842
|
-
|
|
1843
|
-
return
|
|
1844
|
-
}, Object.entries(DEFAULT_NS_MAP).reduce(function(
|
|
1845
|
-
|
|
1846
|
-
return
|
|
1873
|
+
var uriMap = model.getPackages().reduce(function(uriMap, p) {
|
|
1874
|
+
uriMap[p.uri] = p.prefix;
|
|
1875
|
+
return uriMap;
|
|
1876
|
+
}, Object.entries(DEFAULT_NS_MAP).reduce(function(map, [prefix, url]) {
|
|
1877
|
+
map[url] = prefix;
|
|
1878
|
+
return map;
|
|
1847
1879
|
}, model.config && model.config.nsMap || {}));
|
|
1848
1880
|
parser.ns(uriMap).on("openTag", function(obj, decodeStr, selfClosing, getContext) {
|
|
1849
1881
|
var attrs = obj.attrs || {};
|
|
@@ -1859,8 +1891,8 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1859
1891
|
ns: obj.ns
|
|
1860
1892
|
};
|
|
1861
1893
|
handleOpen(node, getContext);
|
|
1862
|
-
}).on("question", handleQuestion).on("closeTag", handleClose).on("cdata", handleCData).on("text", function(text,
|
|
1863
|
-
handleText(
|
|
1894
|
+
}).on("question", handleQuestion).on("closeTag", handleClose).on("cdata", handleCData).on("text", function(text, decodeEntities, getContext) {
|
|
1895
|
+
handleText(decodeEntities(text), getContext);
|
|
1864
1896
|
}).on("error", handleError).on("warn", handleWarning);
|
|
1865
1897
|
return new Promise(function(resolve, reject) {
|
|
1866
1898
|
var err;
|
|
@@ -1952,8 +1984,8 @@ Namespaces.prototype.logUsed = function(ns) {
|
|
|
1952
1984
|
};
|
|
1953
1985
|
Namespaces.prototype.getUsed = function(ns) {
|
|
1954
1986
|
var allNs = [].concat(this.wellknown, this.custom);
|
|
1955
|
-
return allNs.filter((
|
|
1956
|
-
var nsKey = this.getNSKey(
|
|
1987
|
+
return allNs.filter((ns) => {
|
|
1988
|
+
var nsKey = this.getNSKey(ns);
|
|
1957
1989
|
return this.used[nsKey];
|
|
1958
1990
|
});
|
|
1959
1991
|
};
|
|
@@ -2213,7 +2245,7 @@ ElementSerializer.prototype.parseGenericAttributes = function(element, attribute
|
|
|
2213
2245
|
ElementSerializer.prototype.parseContainments = function(properties) {
|
|
2214
2246
|
var self = this, body = this.body, element = this.element;
|
|
2215
2247
|
forEach(properties, function(p) {
|
|
2216
|
-
var value = element.get(p.name),
|
|
2248
|
+
var value = element.get(p.name), { isReference, isMany } = p;
|
|
2217
2249
|
if (!isMany) {
|
|
2218
2250
|
value = [value];
|
|
2219
2251
|
}
|
|
@@ -2269,7 +2301,7 @@ ElementSerializer.prototype.logNamespace = function(ns, wellknown, local) {
|
|
|
2269
2301
|
};
|
|
2270
2302
|
ElementSerializer.prototype.logNamespaceUsed = function(ns, local) {
|
|
2271
2303
|
var namespaces = this.getNamespaces(local);
|
|
2272
|
-
var
|
|
2304
|
+
var prefix = ns.prefix, uri = ns.uri, newPrefix, idx, wellknownUri;
|
|
2273
2305
|
if (!prefix && !uri) {
|
|
2274
2306
|
return { localName: ns.localName };
|
|
2275
2307
|
}
|
|
@@ -6112,7 +6144,7 @@ function SimpleBpmnModdle(additionalPackages, options) {
|
|
|
6112
6144
|
return new BpmnModdle(pks, options);
|
|
6113
6145
|
}
|
|
6114
6146
|
|
|
6115
|
-
// ../../node_modules/@uipath/flow-converter/dist/serialization-
|
|
6147
|
+
// ../../node_modules/@uipath/flow-converter/dist/serialization-Z3UYT6BW.js
|
|
6116
6148
|
var import_json5 = __toESM(require_lib(), 1);
|
|
6117
6149
|
|
|
6118
6150
|
// ../../node_modules/@uipath/bpmn-auto-layout/dist/index.js
|
|
@@ -6308,8 +6340,8 @@ class Grid {
|
|
|
6308
6340
|
}
|
|
6309
6341
|
find(element) {
|
|
6310
6342
|
let row, col;
|
|
6311
|
-
row = this.grid.findIndex((
|
|
6312
|
-
col =
|
|
6343
|
+
row = this.grid.findIndex((row) => {
|
|
6344
|
+
col = row.findIndex((el) => {
|
|
6313
6345
|
return el === element;
|
|
6314
6346
|
});
|
|
6315
6347
|
return col !== -1;
|
|
@@ -6348,7 +6380,7 @@ class Grid {
|
|
|
6348
6380
|
}
|
|
6349
6381
|
adjustRowForMultipleIncoming(elements, currentElement) {
|
|
6350
6382
|
const results = elements.map((element) => this.find(element));
|
|
6351
|
-
const lowestRow = Math.min(...results.map((result) => result[0]).filter((
|
|
6383
|
+
const lowestRow = Math.min(...results.map((result) => result[0]).filter((row) => row >= 0));
|
|
6352
6384
|
const [row, col] = this.find(currentElement);
|
|
6353
6385
|
if (lowestRow < row && !this.grid[lowestRow][col]) {
|
|
6354
6386
|
this.grid[lowestRow][col] = currentElement;
|
|
@@ -6357,7 +6389,7 @@ class Grid {
|
|
|
6357
6389
|
}
|
|
6358
6390
|
adjustColumnForMultipleIncoming(elements, currentElement) {
|
|
6359
6391
|
const results = elements.map((element) => this.find(element));
|
|
6360
|
-
const maxCol = Math.max(...results.map((result) => result[1]).filter((
|
|
6392
|
+
const maxCol = Math.max(...results.map((result) => result[1]).filter((col) => col >= 0));
|
|
6361
6393
|
const [row, col] = this.find(currentElement);
|
|
6362
6394
|
if (maxCol + 1 > col) {
|
|
6363
6395
|
this.grid[row][maxCol + 1] = currentElement;
|
|
@@ -6556,13 +6588,13 @@ function connectElements(source, target, layoutGrid) {
|
|
|
6556
6588
|
}
|
|
6557
6589
|
if (dX === 0) {
|
|
6558
6590
|
if (isDirectPathBlocked(source, target, layoutGrid)) {
|
|
6559
|
-
const
|
|
6591
|
+
const yOffset = -Math.sign(dY) * DEFAULT_CELL_HEIGHT / 2;
|
|
6560
6592
|
return [
|
|
6561
6593
|
getDockingPoint(sourceMid, sourceBounds, "r"),
|
|
6562
6594
|
{ x: sourceMid.x + DEFAULT_CELL_WIDTH / 2, y: sourceMid.y },
|
|
6563
|
-
{ x: targetMid.x + DEFAULT_CELL_WIDTH / 2, y: targetMid.y +
|
|
6564
|
-
{ x: targetMid.x, y: targetMid.y +
|
|
6565
|
-
getDockingPoint(targetMid, targetBounds, Math.sign(
|
|
6595
|
+
{ x: targetMid.x + DEFAULT_CELL_WIDTH / 2, y: targetMid.y + yOffset },
|
|
6596
|
+
{ x: targetMid.x, y: targetMid.y + yOffset },
|
|
6597
|
+
getDockingPoint(targetMid, targetBounds, Math.sign(yOffset) > 0 ? "b" : "t")
|
|
6566
6598
|
];
|
|
6567
6599
|
} else {
|
|
6568
6600
|
return [
|
|
@@ -6715,13 +6747,13 @@ function ensureExitBottom(source, waypoints, [row, col]) {
|
|
|
6715
6747
|
return;
|
|
6716
6748
|
}
|
|
6717
6749
|
if (waypoints.length === 2) {
|
|
6718
|
-
const
|
|
6750
|
+
const newStart = [
|
|
6719
6751
|
dockingPoint,
|
|
6720
6752
|
{ x: dockingPoint.x, y: (row + 1) * DEFAULT_CELL_HEIGHT },
|
|
6721
6753
|
{ x: (col + 1) * DEFAULT_CELL_WIDTH, y: (row + 1) * DEFAULT_CELL_HEIGHT },
|
|
6722
6754
|
{ x: (col + 1) * DEFAULT_CELL_WIDTH, y: (row + 0.5) * DEFAULT_CELL_HEIGHT }
|
|
6723
6755
|
];
|
|
6724
|
-
waypoints.splice(0, 1, ...
|
|
6756
|
+
waypoints.splice(0, 1, ...newStart);
|
|
6725
6757
|
return;
|
|
6726
6758
|
}
|
|
6727
6759
|
const newStart = [
|
|
@@ -6973,18 +7005,18 @@ var CDATA_CLOSE = "]]>";
|
|
|
6973
7005
|
function entityEscape(str) {
|
|
6974
7006
|
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
6975
7007
|
}
|
|
6976
|
-
function extractCdataContents(
|
|
7008
|
+
function extractCdataContents(xml) {
|
|
6977
7009
|
const contents = [];
|
|
6978
7010
|
let pos = 0;
|
|
6979
|
-
while (pos <
|
|
6980
|
-
const start =
|
|
7011
|
+
while (pos < xml.length) {
|
|
7012
|
+
const start = xml.indexOf(CDATA_OPEN, pos);
|
|
6981
7013
|
if (start === -1)
|
|
6982
7014
|
break;
|
|
6983
7015
|
const contentStart = start + CDATA_OPEN.length;
|
|
6984
|
-
const end =
|
|
7016
|
+
const end = xml.indexOf(CDATA_CLOSE, contentStart);
|
|
6985
7017
|
if (end === -1)
|
|
6986
7018
|
break;
|
|
6987
|
-
contents.push(
|
|
7019
|
+
contents.push(xml.slice(contentStart, end));
|
|
6988
7020
|
pos = end + CDATA_CLOSE.length;
|
|
6989
7021
|
}
|
|
6990
7022
|
return contents;
|
|
@@ -7008,17 +7040,17 @@ function restoreCdataSections(inputXml, outputXml) {
|
|
|
7008
7040
|
}
|
|
7009
7041
|
var ID_PREFIX = "_";
|
|
7010
7042
|
var ID_ATTR_RE = /(?<=\b(?:id|sourceRef|targetRef|bpmnElement|elementId)=")(\d)/g;
|
|
7011
|
-
function sanitizeIds(
|
|
7012
|
-
const hasInvalidIds = ID_ATTR_RE.test(
|
|
7043
|
+
function sanitizeIds(xml) {
|
|
7044
|
+
const hasInvalidIds = ID_ATTR_RE.test(xml);
|
|
7013
7045
|
if (!hasInvalidIds) {
|
|
7014
|
-
return { xml
|
|
7046
|
+
return { xml, hasInvalidIds: false };
|
|
7015
7047
|
}
|
|
7016
7048
|
ID_ATTR_RE.lastIndex = 0;
|
|
7017
|
-
const sanitized =
|
|
7049
|
+
const sanitized = xml.replace(ID_ATTR_RE, ID_PREFIX + "$1");
|
|
7018
7050
|
return { xml: sanitized, hasInvalidIds: true };
|
|
7019
7051
|
}
|
|
7020
|
-
function restoreIds(
|
|
7021
|
-
return
|
|
7052
|
+
function restoreIds(xml) {
|
|
7053
|
+
return xml.replace(/(?<=\b(?:id|sourceRef|targetRef|bpmnElement|elementId)=")_(\d)/g, "$1");
|
|
7022
7054
|
}
|
|
7023
7055
|
|
|
7024
7056
|
class Layouter {
|
|
@@ -7031,8 +7063,8 @@ class Layouter {
|
|
|
7031
7063
|
handle(operation, options) {
|
|
7032
7064
|
return this._handlers.filter((handler) => isFunction(handler[operation])).map((handler) => handler[operation](options));
|
|
7033
7065
|
}
|
|
7034
|
-
async layoutProcess(
|
|
7035
|
-
const { xml: sanitizedXml, hasInvalidIds } = sanitizeIds(
|
|
7066
|
+
async layoutProcess(xml, elementsToLayout = undefined) {
|
|
7067
|
+
const { xml: sanitizedXml, hasInvalidIds } = sanitizeIds(xml);
|
|
7036
7068
|
const { rootElement } = await this.moddle.fromXML(sanitizedXml);
|
|
7037
7069
|
this.diagram = rootElement;
|
|
7038
7070
|
this.elementsToLayout = elementsToLayout;
|
|
@@ -7053,7 +7085,7 @@ class Layouter {
|
|
|
7053
7085
|
if (hasInvalidIds) {
|
|
7054
7086
|
outputXml = restoreIds(outputXml);
|
|
7055
7087
|
}
|
|
7056
|
-
return restoreCdataSections(
|
|
7088
|
+
return restoreCdataSections(xml, outputXml);
|
|
7057
7089
|
}
|
|
7058
7090
|
handlePlane(planeElement, participantAndLaneElements = [], collaboration = undefined) {
|
|
7059
7091
|
const grid = this.createGridLayout(planeElement, participantAndLaneElements);
|
|
@@ -7097,9 +7129,9 @@ class Layouter {
|
|
|
7097
7129
|
if (isConnectionOrBoundaryEvent) {
|
|
7098
7130
|
return false;
|
|
7099
7131
|
}
|
|
7100
|
-
const incoming = (el.incoming || []).filter((
|
|
7132
|
+
const incoming = (el.incoming || []).filter((incoming) => !is(incoming, "bpmn:MessageFlow"));
|
|
7101
7133
|
if (this.elementsToLayout) {
|
|
7102
|
-
const filteredIncoming = incoming.filter((
|
|
7134
|
+
const filteredIncoming = incoming.filter((incoming) => this.elementsToLayout.has(incoming.sourceRef.id));
|
|
7103
7135
|
return filteredIncoming.length === 0;
|
|
7104
7136
|
}
|
|
7105
7137
|
return incoming.length === 0;
|
|
@@ -7259,11 +7291,11 @@ class Layouter {
|
|
|
7259
7291
|
this._elementsToLayout = elements && Array.isArray(elements) ? new Set(elements) : undefined;
|
|
7260
7292
|
}
|
|
7261
7293
|
}
|
|
7262
|
-
function layoutProcess(
|
|
7263
|
-
return new Layouter().layoutProcess(
|
|
7294
|
+
function layoutProcess(xml, elementsToLayout = undefined) {
|
|
7295
|
+
return new Layouter().layoutProcess(xml, elementsToLayout);
|
|
7264
7296
|
}
|
|
7265
7297
|
|
|
7266
|
-
// ../../node_modules/@uipath/flow-converter/dist/serialization-
|
|
7298
|
+
// ../../node_modules/@uipath/flow-converter/dist/serialization-Z3UYT6BW.js
|
|
7267
7299
|
init_esm_shims();
|
|
7268
7300
|
init_esm_shims();
|
|
7269
7301
|
function walkAncestorCollectionLoops(walk, startParentId) {
|
|
@@ -7358,6 +7390,8 @@ var BpmnServiceType = /* @__PURE__ */ ((BpmnServiceType2) => {
|
|
|
7358
7390
|
BpmnServiceType2["OrchestratorSetTransactionProgress"] = "Orchestrator.SetTransactionProgress";
|
|
7359
7391
|
BpmnServiceType2["OrchestratorPostponeTransactionItem"] = "Orchestrator.PostponeTransactionItem";
|
|
7360
7392
|
BpmnServiceType2["OrchestratorDeleteQueueItems"] = "Orchestrator.DeleteQueueItems";
|
|
7393
|
+
BpmnServiceType2["OrchestratorBulkAddQueueItems"] = "Orchestrator.BulkAddQueueItems";
|
|
7394
|
+
BpmnServiceType2["OrchestratorGetQueueItems"] = "Orchestrator.GetQueueItems";
|
|
7361
7395
|
BpmnServiceType2["OrchestratorQueueItemAdded"] = "Orchestrator.QueueItemAdded";
|
|
7362
7396
|
BpmnServiceType2["OrchestratorStartAgenticProcess"] = "Orchestrator.StartAgenticProcess";
|
|
7363
7397
|
BpmnServiceType2["OrchestratorStartAgenticProcessAsync"] = "Orchestrator.StartAgenticProcessAsync";
|
|
@@ -7375,6 +7409,7 @@ var BpmnServiceType = /* @__PURE__ */ ((BpmnServiceType2) => {
|
|
|
7375
7409
|
BpmnServiceType2["IxpExtraction"] = "IXP.Extraction";
|
|
7376
7410
|
BpmnServiceType2["IdpExtraction"] = "IDP.Extraction";
|
|
7377
7411
|
BpmnServiceType2["DuClassification"] = "DU.Classification";
|
|
7412
|
+
BpmnServiceType2["IxpExtractionValidation"] = "IXP.ExtractionValidation";
|
|
7378
7413
|
BpmnServiceType2["MaestroReceiveMessageEvent"] = "Maestro.ReceiveMessageEvent";
|
|
7379
7414
|
BpmnServiceType2["ConversationalServiceSendMessage"] = "ConversationalService.SendMessage";
|
|
7380
7415
|
BpmnServiceType2["ConversationalServiceGetConversationContext"] = "ConversationalService.GetConversationContext";
|
|
@@ -7496,15 +7531,16 @@ function convertDotNotationToNested(obj) {
|
|
|
7496
7531
|
}
|
|
7497
7532
|
return result;
|
|
7498
7533
|
}
|
|
7499
|
-
function deepTransformStringsInPlace(obj, fn2) {
|
|
7500
|
-
if (obj == null || typeof obj !== "object")
|
|
7534
|
+
function deepTransformStringsInPlace(obj, fn2, seen = /* @__PURE__ */ new WeakSet) {
|
|
7535
|
+
if (obj == null || typeof obj !== "object" || seen.has(obj))
|
|
7501
7536
|
return;
|
|
7537
|
+
seen.add(obj);
|
|
7502
7538
|
if (Array.isArray(obj)) {
|
|
7503
7539
|
for (let i2 = 0;i2 < obj.length; i2++) {
|
|
7504
7540
|
if (typeof obj[i2] === "string") {
|
|
7505
7541
|
obj[i2] = fn2(obj[i2]);
|
|
7506
7542
|
} else {
|
|
7507
|
-
deepTransformStringsInPlace(obj[i2], fn2);
|
|
7543
|
+
deepTransformStringsInPlace(obj[i2], fn2, seen);
|
|
7508
7544
|
}
|
|
7509
7545
|
}
|
|
7510
7546
|
return;
|
|
@@ -7514,7 +7550,7 @@ function deepTransformStringsInPlace(obj, fn2) {
|
|
|
7514
7550
|
if (typeof val === "string") {
|
|
7515
7551
|
obj[key] = fn2(val);
|
|
7516
7552
|
} else {
|
|
7517
|
-
deepTransformStringsInPlace(val, fn2);
|
|
7553
|
+
deepTransformStringsInPlace(val, fn2, seen);
|
|
7518
7554
|
}
|
|
7519
7555
|
}
|
|
7520
7556
|
}
|
|
@@ -7541,7 +7577,7 @@ function toEngineType(type) {
|
|
|
7541
7577
|
}
|
|
7542
7578
|
init_esm_shims();
|
|
7543
7579
|
init_esm_shims();
|
|
7544
|
-
var JS_EXPRESSION_PAREN_PREFIX = `${
|
|
7580
|
+
var JS_EXPRESSION_PAREN_PREFIX = `${JS_EXPRESSION_PREFIX2}(`;
|
|
7545
7581
|
function createSchemaFromVariables(variables) {
|
|
7546
7582
|
const properties = {};
|
|
7547
7583
|
const required2 = [];
|
|
@@ -7568,8 +7604,8 @@ function createSchemaFromVariables(variables) {
|
|
|
7568
7604
|
var getInputValue = (Input) => {
|
|
7569
7605
|
const { type, value, body } = Input;
|
|
7570
7606
|
if (typeof value === "string" && value.startsWith("=")) {
|
|
7571
|
-
if (value.startsWith(
|
|
7572
|
-
const literal2 = value.slice(
|
|
7607
|
+
if (value.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
7608
|
+
const literal2 = value.slice(JS_EXPRESSION_PREFIX2.length).trim();
|
|
7573
7609
|
if (literal2.startsWith("[") || literal2.startsWith("{")) {
|
|
7574
7610
|
try {
|
|
7575
7611
|
return JSON.parse(literal2);
|
|
@@ -7832,6 +7868,33 @@ var uipath_moddle_v1_default = {
|
|
|
7832
7868
|
}
|
|
7833
7869
|
]
|
|
7834
7870
|
},
|
|
7871
|
+
{
|
|
7872
|
+
name: "MaestroEngineVersion",
|
|
7873
|
+
superClass: ["Element"],
|
|
7874
|
+
properties: [
|
|
7875
|
+
{
|
|
7876
|
+
name: "version",
|
|
7877
|
+
isAttr: true,
|
|
7878
|
+
type: "String"
|
|
7879
|
+
}
|
|
7880
|
+
]
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
name: "Flow",
|
|
7884
|
+
superClass: ["Element"],
|
|
7885
|
+
properties: [
|
|
7886
|
+
{
|
|
7887
|
+
name: "version",
|
|
7888
|
+
isAttr: true,
|
|
7889
|
+
type: "String"
|
|
7890
|
+
},
|
|
7891
|
+
{
|
|
7892
|
+
name: "body",
|
|
7893
|
+
type: "String",
|
|
7894
|
+
isBody: true
|
|
7895
|
+
}
|
|
7896
|
+
]
|
|
7897
|
+
},
|
|
7835
7898
|
{
|
|
7836
7899
|
name: "Event",
|
|
7837
7900
|
superClass: ["Element"],
|
|
@@ -8220,7 +8283,7 @@ var uipath_moddle_v1_default = {
|
|
|
8220
8283
|
function buildBodyFromInputs(inputs) {
|
|
8221
8284
|
const out = /* @__PURE__ */ Object.create(null);
|
|
8222
8285
|
for (const v2 of inputs) {
|
|
8223
|
-
if (
|
|
8286
|
+
if (isUnsafeKey2(v2.name)) {
|
|
8224
8287
|
continue;
|
|
8225
8288
|
}
|
|
8226
8289
|
out[v2.name] = getInputValue(v2);
|
|
@@ -8272,11 +8335,25 @@ function createEntryPoint(entryPointId) {
|
|
|
8272
8335
|
function createSkipObservability(enabled = true) {
|
|
8273
8336
|
return getModdle().create("uipath:SkipObservability", { enabled });
|
|
8274
8337
|
}
|
|
8338
|
+
var MAESTRO_ENGINE_VERSION = "v2";
|
|
8339
|
+
function createMaestroEngineVersion(version2) {
|
|
8340
|
+
return getModdle().create("uipath:MaestroEngineVersion", { version: version2 });
|
|
8341
|
+
}
|
|
8342
|
+
var FLOW_ELEMENT_VERSION = "v1";
|
|
8343
|
+
function createFlowPlaceholder() {
|
|
8344
|
+
return `__UIPATH_FLOW_JSON_${crypto.randomUUID()}__`;
|
|
8345
|
+
}
|
|
8346
|
+
function createFlow(body, version2 = FLOW_ELEMENT_VERSION) {
|
|
8347
|
+
return getModdle().create("uipath:Flow", { version: version2, body });
|
|
8348
|
+
}
|
|
8275
8349
|
function createScriptVersion(scriptVersion) {
|
|
8276
8350
|
return getModdle().create("uipath:ScriptVersion", { value: scriptVersion });
|
|
8277
8351
|
}
|
|
8278
|
-
function createMessage(id2,
|
|
8279
|
-
return getModdle().create("bpmn:Message", { id: id2, name
|
|
8352
|
+
function createMessage(id2, name) {
|
|
8353
|
+
return getModdle().create("bpmn:Message", { id: id2, name });
|
|
8354
|
+
}
|
|
8355
|
+
function createError(id2, name, errorCode) {
|
|
8356
|
+
return getModdle().create("bpmn:Error", { id: id2, name, errorCode });
|
|
8280
8357
|
}
|
|
8281
8358
|
function createRetry(retry) {
|
|
8282
8359
|
return getModdle().create("uipath:Retry", {
|
|
@@ -8297,7 +8374,7 @@ function createBindings(bindings) {
|
|
|
8297
8374
|
type: toEngineType(b2.type),
|
|
8298
8375
|
elementId: b2.elementId,
|
|
8299
8376
|
default: b2.default,
|
|
8300
|
-
resource: b2.resource,
|
|
8377
|
+
resource: b2.resource ? canonicalizeResourceCasing2(b2.resource) : b2.resource,
|
|
8301
8378
|
resourceSubType: b2.resourceSubType,
|
|
8302
8379
|
resourceKey: b2.resourceKey,
|
|
8303
8380
|
propertyAttribute: b2.propertyAttribute === "FolderKey" ? "folderKey" : b2.propertyAttribute
|
|
@@ -8328,12 +8405,12 @@ function createVariables(variables) {
|
|
|
8328
8405
|
inputOutput: variables?.inputOutputs?.map((v2) => createVariable(v2))
|
|
8329
8406
|
});
|
|
8330
8407
|
}
|
|
8331
|
-
function createContext(bindings, inputs, inputSchema) {
|
|
8408
|
+
function createContext(bindings, inputs, inputSchema, scope) {
|
|
8332
8409
|
if ((!inputs || inputs.length === 0) && !inputSchema) {
|
|
8333
8410
|
return;
|
|
8334
8411
|
}
|
|
8335
8412
|
return getModdle().create("uipath:Context", {
|
|
8336
|
-
input: inputs?.map((i2) => createInput(i2, bindings)),
|
|
8413
|
+
input: inputs?.map((i2) => createInput(i2, bindings, scope)),
|
|
8337
8414
|
inputSchema: createInputSchema(inputSchema, "uipath:InputSchema")
|
|
8338
8415
|
});
|
|
8339
8416
|
}
|
|
@@ -8346,19 +8423,16 @@ function createInputSchema(schema, type) {
|
|
|
8346
8423
|
type: "jsonSchema"
|
|
8347
8424
|
});
|
|
8348
8425
|
}
|
|
8349
|
-
function createInput(input2, bindings = []) {
|
|
8426
|
+
function createInput(input2, bindings = [], scope) {
|
|
8350
8427
|
if (!input2) {
|
|
8351
8428
|
return;
|
|
8352
8429
|
}
|
|
8353
8430
|
let value = input2.value;
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
if (binding) {
|
|
8360
|
-
value = `${BINDINGS_PATH_PREFIX}${binding.id}`;
|
|
8361
|
-
}
|
|
8431
|
+
const placeholderName = parseBindingPlaceholder2(value);
|
|
8432
|
+
if (placeholderName) {
|
|
8433
|
+
const [binding] = matchContextBindings2(placeholderName, bindings, scope?.resourceKey, scope?.resource);
|
|
8434
|
+
if (binding) {
|
|
8435
|
+
value = `${BINDINGS_PATH_PREFIX2}${binding.id}`;
|
|
8362
8436
|
}
|
|
8363
8437
|
}
|
|
8364
8438
|
return getModdle().create("uipath:Input", {
|
|
@@ -8390,7 +8464,7 @@ function createOutput(nodeId, output2) {
|
|
|
8390
8464
|
options: output2.options ? JSON.stringify(output2.options) : undefined
|
|
8391
8465
|
});
|
|
8392
8466
|
}
|
|
8393
|
-
function createModdleExtensionTask(node, { serviceType, context, inputs, outputs, inputSchema, version: version2, scriptVersion, skipCondition }, uipathNodeType, bindings) {
|
|
8467
|
+
function createModdleExtensionTask(node, { serviceType, context, inputs, outputs, inputSchema, version: version2, scriptVersion, skipCondition }, uipathNodeType, bindings, scope) {
|
|
8394
8468
|
const filteredOutputs = outputs?.filter((o2) => !o2.custom || o2.name || o2.source);
|
|
8395
8469
|
return getModdle().create(uipathNodeType, {
|
|
8396
8470
|
version: "v1",
|
|
@@ -8399,14 +8473,14 @@ function createModdleExtensionTask(node, { serviceType, context, inputs, outputs
|
|
|
8399
8473
|
value: serviceType,
|
|
8400
8474
|
version: version2 ?? "v1"
|
|
8401
8475
|
}) : undefined,
|
|
8402
|
-
context: createContext(bindings, context, inputSchema),
|
|
8403
|
-
input: inputs?.map((i2) => createInput(i2, bindings)),
|
|
8476
|
+
context: createContext(bindings, context, inputSchema, scope),
|
|
8477
|
+
input: inputs?.map((i2) => createInput(i2, bindings, scope)),
|
|
8404
8478
|
output: filteredOutputs?.map((o2) => createOutput(node.id, o2)),
|
|
8405
8479
|
scriptVersion: scriptVersion ? createScriptVersion(scriptVersion) : undefined
|
|
8406
8480
|
});
|
|
8407
8481
|
}
|
|
8408
|
-
function createModdleExtensionVariableMapping(nodeId, { inputs, outputs, context, inputSchema, version: version2, scriptVersion, skipCondition }, bindings) {
|
|
8409
|
-
const input2 = inputs?.map((i2) => createInput(i2, bindings))?.filter((i2) => i2.name || i2.var);
|
|
8482
|
+
function createModdleExtensionVariableMapping(nodeId, { inputs, outputs, context, inputSchema, version: version2, scriptVersion, skipCondition, retry }, bindings, scope) {
|
|
8483
|
+
const input2 = inputs?.map((i2) => createInput(i2, bindings, scope))?.filter((i2) => i2.name || i2.var);
|
|
8410
8484
|
const output2 = outputs?.map((o2) => createOutput(nodeId, o2))?.filter((o2) => o2.name || o2.var);
|
|
8411
8485
|
const options = {
|
|
8412
8486
|
version: "v1",
|
|
@@ -8414,7 +8488,7 @@ function createModdleExtensionVariableMapping(nodeId, { inputs, outputs, context
|
|
|
8414
8488
|
value: "BPMN.Variables",
|
|
8415
8489
|
version: version2 ?? "v1"
|
|
8416
8490
|
}),
|
|
8417
|
-
context: createContext(bindings, context, inputSchema)
|
|
8491
|
+
context: createContext(bindings, context, inputSchema, scope)
|
|
8418
8492
|
};
|
|
8419
8493
|
if (input2 && input2.length > 0) {
|
|
8420
8494
|
options.input = input2;
|
|
@@ -8429,6 +8503,9 @@ function createModdleExtensionVariableMapping(nodeId, { inputs, outputs, context
|
|
|
8429
8503
|
if (scriptVersion) {
|
|
8430
8504
|
mappingOptions.push(createScriptVersion(scriptVersion));
|
|
8431
8505
|
}
|
|
8506
|
+
if (retry) {
|
|
8507
|
+
mappingOptions.push(createRetry(retry));
|
|
8508
|
+
}
|
|
8432
8509
|
if (skipCondition?.length) {
|
|
8433
8510
|
mappingOptions.push(getModdle().create("uipath:Activity", {
|
|
8434
8511
|
skipCondition
|
|
@@ -8470,10 +8547,10 @@ function createExtensionTask({
|
|
|
8470
8547
|
scriptVersion,
|
|
8471
8548
|
skipCondition,
|
|
8472
8549
|
retry
|
|
8473
|
-
}, node, bindings) {
|
|
8550
|
+
}, node, bindings, scope) {
|
|
8474
8551
|
const nodeType = node.type;
|
|
8475
8552
|
if ((nodeType === "bpmn:StartEvent" || nodeType === "bpmn:EndEvent" || nodeType === "bpmn:Task") && serviceType === "BPMN.Variables" || nodeType === "bpmn:ScriptTask" || nodeType === "bpmn:SubProcess") {
|
|
8476
|
-
return createModdleExtensionVariableMapping(node.id, { inputs, outputs, context, inputSchema, scriptVersion, skipCondition }, bindings);
|
|
8553
|
+
return createModdleExtensionVariableMapping(node.id, { inputs, outputs, context, inputSchema, scriptVersion, skipCondition, retry }, bindings, scope);
|
|
8477
8554
|
}
|
|
8478
8555
|
if (nodeType === "bpmn:MultiInstanceLoopCharacteristics") {
|
|
8479
8556
|
return createModdleExtensionLoopCharacteristics({ inputCollection, inputElement });
|
|
@@ -8481,7 +8558,7 @@ function createExtensionTask({
|
|
|
8481
8558
|
const uipath = { serviceType, context, inputs, outputs, inputSchema, version: version2, scriptVersion, skipCondition };
|
|
8482
8559
|
const uipathNodeType = IS_EVENT_SERVICE_TYPES.includes(serviceType) ? "uipath:Event" : "uipath:Activity";
|
|
8483
8560
|
const extensionTasks = [
|
|
8484
|
-
...extensionElementNodeHasContent(uipath) ? [createModdleExtensionTask(node, uipath, uipathNodeType, bindings)] : [],
|
|
8561
|
+
...extensionElementNodeHasContent(uipath) ? [createModdleExtensionTask(node, uipath, uipathNodeType, bindings, scope)] : [],
|
|
8485
8562
|
...retry ? [createRetry(retry)] : []
|
|
8486
8563
|
];
|
|
8487
8564
|
return extensionTasks.length === 1 ? extensionTasks[0] : extensionTasks;
|
|
@@ -8502,7 +8579,7 @@ function transformVariableUpdatesToOutputs(variableUpdates, nodeId, workflowVari
|
|
|
8502
8579
|
const expr = u2.expression;
|
|
8503
8580
|
if (typeof expr === "string")
|
|
8504
8581
|
return expr !== "";
|
|
8505
|
-
if (
|
|
8582
|
+
if (isExpressionValue2(expr))
|
|
8506
8583
|
return expr.expression !== "";
|
|
8507
8584
|
return Boolean(expr);
|
|
8508
8585
|
}).map((update) => {
|
|
@@ -8521,7 +8598,7 @@ function expressionToVariableUpdateSource(expression, variableId, nodeId) {
|
|
|
8521
8598
|
if (typeof expression === "string") {
|
|
8522
8599
|
return transformExpression(ensureJsPrefix(expression, variableId), nodeId);
|
|
8523
8600
|
}
|
|
8524
|
-
if (!
|
|
8601
|
+
if (!isExpressionValue2(expression)) {
|
|
8525
8602
|
return ensureJsPrefix("", variableId);
|
|
8526
8603
|
}
|
|
8527
8604
|
return serializeExpressionValueAsMappingSource(expression, nodeId);
|
|
@@ -8532,7 +8609,7 @@ function createCustomVariableMappingElement(nodeId, customOutputs, bindings) {
|
|
|
8532
8609
|
}
|
|
8533
8610
|
return createModdleExtensionVariableMapping(nodeId, { outputs: customOutputs }, bindings);
|
|
8534
8611
|
}
|
|
8535
|
-
function createExtensionElement(node, uipath, bindings, workflowVariables) {
|
|
8612
|
+
function createExtensionElement(node, uipath, bindings, workflowVariables, scope) {
|
|
8536
8613
|
const nodeType = node.type;
|
|
8537
8614
|
const allExtensionElements = [];
|
|
8538
8615
|
if (uipath.tags && Object.keys(uipath.tags).length > 0) {
|
|
@@ -8542,7 +8619,7 @@ function createExtensionElement(node, uipath, bindings, workflowVariables) {
|
|
|
8542
8619
|
const customOutputs = transformVariableUpdatesToOutputs(nodeVariableUpdates, node.id, workflowVariables);
|
|
8543
8620
|
const uipathForTask = { ...uipath };
|
|
8544
8621
|
const addExtensionTask = (taskUipath) => {
|
|
8545
|
-
const elements = createExtensionTask(taskUipath, node, bindings);
|
|
8622
|
+
const elements = createExtensionTask(taskUipath, node, bindings, scope);
|
|
8546
8623
|
allExtensionElements.push(...Array.isArray(elements) ? elements : [elements]);
|
|
8547
8624
|
};
|
|
8548
8625
|
const addCustomVariableMapping = () => {
|
|
@@ -8705,7 +8782,7 @@ var LOOP_BODY_SOURCE_HANDLES = /* @__PURE__ */ new Set(["output", "start"]);
|
|
|
8705
8782
|
var LOOP_CONTINUATION_TARGET_HANDLES = /* @__PURE__ */ new Set(["loopBack", "continue", "break"]);
|
|
8706
8783
|
function getIgnoredLoopEdges(nodes, edges) {
|
|
8707
8784
|
const ignoredEdges = /* @__PURE__ */ new Set;
|
|
8708
|
-
const isLoopNode = (node) =>
|
|
8785
|
+
const isLoopNode = (node) => isLoopNodeType2(node?.type);
|
|
8709
8786
|
for (const edge of edges) {
|
|
8710
8787
|
const sourceNode = nodes.find((n) => n.id === edge.source);
|
|
8711
8788
|
if (isLoopNode(sourceNode) && LOOP_BODY_SOURCE_HANDLES.has(edge.sourceHandle ?? "")) {
|
|
@@ -8738,7 +8815,7 @@ function getIncomingAndOutgoingFlows(nodes, edges) {
|
|
|
8738
8815
|
const flowId = edge.id;
|
|
8739
8816
|
const sourceNode = nodes.find((n) => n.id === edge.source);
|
|
8740
8817
|
const targetNode = nodes.find((n) => n.id === edge.target);
|
|
8741
|
-
if (sourceNode &&
|
|
8818
|
+
if (sourceNode && isAgentResourceNodeType2(sourceNode.type || "") || targetNode && isAgentResourceNodeType2(targetNode.type || "")) {
|
|
8742
8819
|
continue;
|
|
8743
8820
|
}
|
|
8744
8821
|
if (sourceNode && targetNode) {
|
|
@@ -8769,7 +8846,7 @@ function createParentElement({
|
|
|
8769
8846
|
type,
|
|
8770
8847
|
parent,
|
|
8771
8848
|
ref,
|
|
8772
|
-
name
|
|
8849
|
+
name,
|
|
8773
8850
|
incoming,
|
|
8774
8851
|
outgoing
|
|
8775
8852
|
}) {
|
|
@@ -8780,7 +8857,7 @@ function createParentElement({
|
|
|
8780
8857
|
$parent: parent,
|
|
8781
8858
|
incoming: incoming ? mapIncomingOrOutgoingElements(id2, incoming) : undefined,
|
|
8782
8859
|
outgoing: outgoing ? mapIncomingOrOutgoingElements(id2, outgoing) : undefined,
|
|
8783
|
-
name
|
|
8860
|
+
name,
|
|
8784
8861
|
ref,
|
|
8785
8862
|
flowElements: [],
|
|
8786
8863
|
artifacts: [],
|
|
@@ -8796,26 +8873,26 @@ function buildRootNode(root, type) {
|
|
|
8796
8873
|
name: root.data.label
|
|
8797
8874
|
});
|
|
8798
8875
|
setDocumentation(root.data, rootElement);
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
extensionValues.push(variables);
|
|
8806
|
-
}
|
|
8807
|
-
}
|
|
8808
|
-
const bindings = modelData?.bindings;
|
|
8809
|
-
if (bindings?.length) {
|
|
8810
|
-
extensionValues.push(createBindings(bindings));
|
|
8811
|
-
}
|
|
8812
|
-
if (extensionValues.length > 0) {
|
|
8813
|
-
rootElement.extensionElements = {
|
|
8814
|
-
...templateXmlService.get("bpmn:ExtensionElements"),
|
|
8815
|
-
values: extensionValues
|
|
8816
|
-
};
|
|
8876
|
+
const extensionValues = [];
|
|
8877
|
+
const modelData = root.data.model;
|
|
8878
|
+
if (modelData?.variables) {
|
|
8879
|
+
const variables = createVariables(modelData.variables);
|
|
8880
|
+
if (variables) {
|
|
8881
|
+
extensionValues.push(variables);
|
|
8817
8882
|
}
|
|
8818
8883
|
}
|
|
8884
|
+
const bindings = modelData?.bindings;
|
|
8885
|
+
if (bindings?.length) {
|
|
8886
|
+
extensionValues.push(createBindings(bindings));
|
|
8887
|
+
}
|
|
8888
|
+
extensionValues.push(createMaestroEngineVersion(MAESTRO_ENGINE_VERSION));
|
|
8889
|
+
if (typeof modelData?.flowPlaceholder === "string") {
|
|
8890
|
+
extensionValues.push(createFlow(modelData.flowPlaceholder));
|
|
8891
|
+
}
|
|
8892
|
+
rootElement.extensionElements = {
|
|
8893
|
+
...templateXmlService.get("bpmn:ExtensionElements"),
|
|
8894
|
+
values: extensionValues
|
|
8895
|
+
};
|
|
8819
8896
|
return rootElement;
|
|
8820
8897
|
}
|
|
8821
8898
|
function getFallbackParentType(nodes) {
|
|
@@ -9188,14 +9265,14 @@ var DEFAULT_PACKAGE_INTENT = "Debug";
|
|
|
9188
9265
|
var PUBLISH_ENTRY_POINT_PREFIX = "content/";
|
|
9189
9266
|
var AGENT_INPUT_ENCODING_FIELD = "__agentInputEncoding";
|
|
9190
9267
|
function stashAgentInputEncoding(model, encoding) {
|
|
9191
|
-
if (!encoding || encoding ===
|
|
9268
|
+
if (!encoding || encoding === DEFAULT_AGENT_INPUT_ENCODING2)
|
|
9192
9269
|
return;
|
|
9193
9270
|
model[AGENT_INPUT_ENCODING_FIELD] = encoding;
|
|
9194
9271
|
}
|
|
9195
9272
|
function consumeAgentInputEncoding(model) {
|
|
9196
9273
|
const value = model[AGENT_INPUT_ENCODING_FIELD];
|
|
9197
9274
|
delete model[AGENT_INPUT_ENCODING_FIELD];
|
|
9198
|
-
return value === "nested" ? "nested" :
|
|
9275
|
+
return value === "nested" ? "nested" : DEFAULT_AGENT_INPUT_ENCODING2;
|
|
9199
9276
|
}
|
|
9200
9277
|
var DETACH_MODE_FIELD = "__detachMode";
|
|
9201
9278
|
function stashDetachMode(model, detached) {
|
|
@@ -9224,14 +9301,27 @@ init_esm_shims();
|
|
|
9224
9301
|
var HITL_TASK_TYPE = {
|
|
9225
9302
|
Quick: "quick",
|
|
9226
9303
|
Custom: "custom",
|
|
9227
|
-
DocumentValidation: "documentValidation"
|
|
9228
|
-
|
|
9304
|
+
DocumentValidation: "documentValidation",
|
|
9305
|
+
DocumentClassification: "documentClassification"
|
|
9306
|
+
};
|
|
9307
|
+
function resolveHitlTaskType(nodeType, legacyInputType) {
|
|
9308
|
+
switch (nodeType) {
|
|
9309
|
+
case HITL_CODED_ACTION_NODE_TYPE2:
|
|
9310
|
+
return HITL_TASK_TYPE.Custom;
|
|
9311
|
+
case HITL_DOC_VALIDATION_NODE_TYPE2:
|
|
9312
|
+
return HITL_TASK_TYPE.DocumentValidation;
|
|
9313
|
+
case HITL_DOC_CLASSIFICATION_NODE_TYPE2:
|
|
9314
|
+
return HITL_TASK_TYPE.DocumentClassification;
|
|
9315
|
+
default:
|
|
9316
|
+
return typeof legacyInputType === "string" ? legacyInputType : HITL_TASK_TYPE.Quick;
|
|
9317
|
+
}
|
|
9318
|
+
}
|
|
9229
9319
|
init_esm_shims();
|
|
9230
9320
|
init_esm_shims();
|
|
9231
9321
|
var __defProp = Object.defineProperty;
|
|
9232
9322
|
var __export = (target, all) => {
|
|
9233
|
-
for (var
|
|
9234
|
-
__defProp(target,
|
|
9323
|
+
for (var name in all)
|
|
9324
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9235
9325
|
};
|
|
9236
9326
|
var external_exports = {};
|
|
9237
9327
|
__export(external_exports, {
|
|
@@ -9755,7 +9845,7 @@ var _a;
|
|
|
9755
9845
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
9756
9846
|
status: "aborted"
|
|
9757
9847
|
});
|
|
9758
|
-
function $constructor(
|
|
9848
|
+
function $constructor(name, initializer3, params) {
|
|
9759
9849
|
function init(inst, def) {
|
|
9760
9850
|
if (!inst._zod) {
|
|
9761
9851
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -9767,10 +9857,10 @@ function $constructor(name2, initializer3, params) {
|
|
|
9767
9857
|
enumerable: false
|
|
9768
9858
|
});
|
|
9769
9859
|
}
|
|
9770
|
-
if (inst._zod.traits.has(
|
|
9860
|
+
if (inst._zod.traits.has(name)) {
|
|
9771
9861
|
return;
|
|
9772
9862
|
}
|
|
9773
|
-
inst._zod.traits.add(
|
|
9863
|
+
inst._zod.traits.add(name);
|
|
9774
9864
|
initializer3(inst, def);
|
|
9775
9865
|
const proto = _2.prototype;
|
|
9776
9866
|
const keys = Object.keys(proto);
|
|
@@ -9785,7 +9875,7 @@ function $constructor(name2, initializer3, params) {
|
|
|
9785
9875
|
|
|
9786
9876
|
class Definition extends Parent {
|
|
9787
9877
|
}
|
|
9788
|
-
Object.defineProperty(Definition, "name", { value:
|
|
9878
|
+
Object.defineProperty(Definition, "name", { value: name });
|
|
9789
9879
|
function _2(def) {
|
|
9790
9880
|
var _a32;
|
|
9791
9881
|
const inst = params?.Parent ? new Definition : this;
|
|
@@ -9801,10 +9891,10 @@ function $constructor(name2, initializer3, params) {
|
|
|
9801
9891
|
value: (inst) => {
|
|
9802
9892
|
if (params?.Parent && inst instanceof params.Parent)
|
|
9803
9893
|
return true;
|
|
9804
|
-
return inst?._zod?.traits?.has(
|
|
9894
|
+
return inst?._zod?.traits?.has(name);
|
|
9805
9895
|
}
|
|
9806
9896
|
});
|
|
9807
|
-
Object.defineProperty(_2, "name", { value:
|
|
9897
|
+
Object.defineProperty(_2, "name", { value: name });
|
|
9808
9898
|
return _2;
|
|
9809
9899
|
}
|
|
9810
9900
|
var $brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
@@ -9814,8 +9904,8 @@ var $ZodAsyncError = class extends Error {
|
|
|
9814
9904
|
}
|
|
9815
9905
|
};
|
|
9816
9906
|
var $ZodEncodeError = class extends Error {
|
|
9817
|
-
constructor(
|
|
9818
|
-
super(`Encountered unidirectional transform during encode: ${
|
|
9907
|
+
constructor(name) {
|
|
9908
|
+
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
9819
9909
|
this.name = "ZodEncodeError";
|
|
9820
9910
|
}
|
|
9821
9911
|
};
|
|
@@ -9916,12 +10006,12 @@ function jsonStringifyReplacer(_2, value) {
|
|
|
9916
10006
|
return value.toString();
|
|
9917
10007
|
return value;
|
|
9918
10008
|
}
|
|
9919
|
-
function cached(
|
|
10009
|
+
function cached(getter) {
|
|
9920
10010
|
const set2 = false;
|
|
9921
10011
|
return {
|
|
9922
10012
|
get value() {
|
|
9923
10013
|
if (!set2) {
|
|
9924
|
-
const value =
|
|
10014
|
+
const value = getter();
|
|
9925
10015
|
Object.defineProperty(this, "value", { value });
|
|
9926
10016
|
return value;
|
|
9927
10017
|
}
|
|
@@ -9946,7 +10036,7 @@ function floatSafeRemainder(val, step) {
|
|
|
9946
10036
|
return ratio - roundedRatio;
|
|
9947
10037
|
}
|
|
9948
10038
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
9949
|
-
function defineLazy(object2, key,
|
|
10039
|
+
function defineLazy(object2, key, getter) {
|
|
9950
10040
|
let value = undefined;
|
|
9951
10041
|
Object.defineProperty(object2, key, {
|
|
9952
10042
|
get() {
|
|
@@ -9955,7 +10045,7 @@ function defineLazy(object2, key, getter2) {
|
|
|
9955
10045
|
}
|
|
9956
10046
|
if (value === undefined) {
|
|
9957
10047
|
value = EVALUATING;
|
|
9958
|
-
value =
|
|
10048
|
+
value = getter();
|
|
9959
10049
|
}
|
|
9960
10050
|
return value;
|
|
9961
10051
|
},
|
|
@@ -10152,35 +10242,35 @@ function normalizeParams(_params) {
|
|
|
10152
10242
|
return { ...params, error: () => params.error };
|
|
10153
10243
|
return params;
|
|
10154
10244
|
}
|
|
10155
|
-
function createTransparentProxy(
|
|
10245
|
+
function createTransparentProxy(getter) {
|
|
10156
10246
|
let target;
|
|
10157
10247
|
return new Proxy({}, {
|
|
10158
10248
|
get(_2, prop, receiver) {
|
|
10159
|
-
target ?? (target =
|
|
10249
|
+
target ?? (target = getter());
|
|
10160
10250
|
return Reflect.get(target, prop, receiver);
|
|
10161
10251
|
},
|
|
10162
10252
|
set(_2, prop, value, receiver) {
|
|
10163
|
-
target ?? (target =
|
|
10253
|
+
target ?? (target = getter());
|
|
10164
10254
|
return Reflect.set(target, prop, value, receiver);
|
|
10165
10255
|
},
|
|
10166
10256
|
has(_2, prop) {
|
|
10167
|
-
target ?? (target =
|
|
10257
|
+
target ?? (target = getter());
|
|
10168
10258
|
return Reflect.has(target, prop);
|
|
10169
10259
|
},
|
|
10170
10260
|
deleteProperty(_2, prop) {
|
|
10171
|
-
target ?? (target =
|
|
10261
|
+
target ?? (target = getter());
|
|
10172
10262
|
return Reflect.deleteProperty(target, prop);
|
|
10173
10263
|
},
|
|
10174
10264
|
ownKeys(_2) {
|
|
10175
|
-
target ?? (target =
|
|
10265
|
+
target ?? (target = getter());
|
|
10176
10266
|
return Reflect.ownKeys(target);
|
|
10177
10267
|
},
|
|
10178
10268
|
getOwnPropertyDescriptor(_2, prop) {
|
|
10179
|
-
target ?? (target =
|
|
10269
|
+
target ?? (target = getter());
|
|
10180
10270
|
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
10181
10271
|
},
|
|
10182
10272
|
defineProperty(_2, prop, descriptor) {
|
|
10183
|
-
target ?? (target =
|
|
10273
|
+
target ?? (target = getter());
|
|
10184
10274
|
return Reflect.defineProperty(target, prop, descriptor);
|
|
10185
10275
|
}
|
|
10186
10276
|
});
|
|
@@ -11792,11 +11882,11 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
11792
11882
|
try {
|
|
11793
11883
|
if (parts.length !== 2)
|
|
11794
11884
|
throw new Error;
|
|
11795
|
-
const [address,
|
|
11796
|
-
if (!
|
|
11885
|
+
const [address, prefix] = parts;
|
|
11886
|
+
if (!prefix)
|
|
11797
11887
|
throw new Error;
|
|
11798
|
-
const prefixNum = Number(
|
|
11799
|
-
if (`${prefixNum}` !==
|
|
11888
|
+
const prefixNum = Number(prefix);
|
|
11889
|
+
if (`${prefixNum}` !== prefix)
|
|
11800
11890
|
throw new Error;
|
|
11801
11891
|
if (prefixNum < 0 || prefixNum > 128)
|
|
11802
11892
|
throw new Error;
|
|
@@ -13576,7 +13666,7 @@ __export(locales_exports, {
|
|
|
13576
13666
|
da: () => da_default,
|
|
13577
13667
|
de: () => de_default,
|
|
13578
13668
|
el: () => el_default,
|
|
13579
|
-
en: () =>
|
|
13669
|
+
en: () => en_default,
|
|
13580
13670
|
eo: () => eo_default,
|
|
13581
13671
|
es: () => es_default,
|
|
13582
13672
|
fa: () => fa_default,
|
|
@@ -14752,7 +14842,7 @@ var error10 = () => {
|
|
|
14752
14842
|
}
|
|
14753
14843
|
};
|
|
14754
14844
|
};
|
|
14755
|
-
function
|
|
14845
|
+
function en_default() {
|
|
14756
14846
|
return {
|
|
14757
14847
|
localeError: error10()
|
|
14758
14848
|
};
|
|
@@ -20011,12 +20101,12 @@ function _includes(includes, params) {
|
|
|
20011
20101
|
includes
|
|
20012
20102
|
});
|
|
20013
20103
|
}
|
|
20014
|
-
function _startsWith(
|
|
20104
|
+
function _startsWith(prefix, params) {
|
|
20015
20105
|
return new $ZodCheckStartsWith({
|
|
20016
20106
|
check: "string_format",
|
|
20017
20107
|
format: "starts_with",
|
|
20018
20108
|
...normalizeParams(params),
|
|
20019
|
-
prefix
|
|
20109
|
+
prefix
|
|
20020
20110
|
});
|
|
20021
20111
|
}
|
|
20022
20112
|
function _endsWith(suffix, params) {
|
|
@@ -20035,10 +20125,10 @@ function _property(property, schema, params) {
|
|
|
20035
20125
|
...normalizeParams(params)
|
|
20036
20126
|
});
|
|
20037
20127
|
}
|
|
20038
|
-
function _mime(
|
|
20128
|
+
function _mime(types, params) {
|
|
20039
20129
|
return new $ZodCheckMimeType({
|
|
20040
20130
|
check: "mime_type",
|
|
20041
|
-
mime:
|
|
20131
|
+
mime: types,
|
|
20042
20132
|
...normalizeParams(params)
|
|
20043
20133
|
});
|
|
20044
20134
|
}
|
|
@@ -20229,10 +20319,10 @@ function _templateLiteral(Class2, parts, params) {
|
|
|
20229
20319
|
...normalizeParams(params)
|
|
20230
20320
|
});
|
|
20231
20321
|
}
|
|
20232
|
-
function _lazy(Class2,
|
|
20322
|
+
function _lazy(Class2, getter) {
|
|
20233
20323
|
return new Class2({
|
|
20234
20324
|
type: "lazy",
|
|
20235
|
-
getter
|
|
20325
|
+
getter
|
|
20236
20326
|
});
|
|
20237
20327
|
}
|
|
20238
20328
|
function _promise(Class2, innerType) {
|
|
@@ -20481,8 +20571,8 @@ function extractDefs(ctx, schema) {
|
|
|
20481
20571
|
if (entry[1] === root) {
|
|
20482
20572
|
return { ref: "#" };
|
|
20483
20573
|
}
|
|
20484
|
-
const
|
|
20485
|
-
const defUriPrefix = `${
|
|
20574
|
+
const uriPrefix = `#`;
|
|
20575
|
+
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
|
|
20486
20576
|
const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
|
|
20487
20577
|
return { defId, ref: defUriPrefix + defId };
|
|
20488
20578
|
};
|
|
@@ -22571,7 +22661,7 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
|
22571
22661
|
inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params);
|
|
22572
22662
|
inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize(size, params));
|
|
22573
22663
|
inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize(size, params));
|
|
22574
|
-
inst.mime = (
|
|
22664
|
+
inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime(Array.isArray(types) ? types : [types], params));
|
|
22575
22665
|
});
|
|
22576
22666
|
function file(params) {
|
|
22577
22667
|
return /* @__PURE__ */ _file(ZodFile, params);
|
|
@@ -22804,10 +22894,10 @@ var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
|
22804
22894
|
inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params);
|
|
22805
22895
|
inst.unwrap = () => inst._zod.def.getter();
|
|
22806
22896
|
});
|
|
22807
|
-
function lazy(
|
|
22897
|
+
function lazy(getter) {
|
|
22808
22898
|
return new ZodLazy({
|
|
22809
22899
|
type: "lazy",
|
|
22810
|
-
getter
|
|
22900
|
+
getter
|
|
22811
22901
|
});
|
|
22812
22902
|
}
|
|
22813
22903
|
var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
|
|
@@ -22910,9 +23000,9 @@ var ZodIssueCode = {
|
|
|
22910
23000
|
invalid_value: "invalid_value",
|
|
22911
23001
|
custom: "custom"
|
|
22912
23002
|
};
|
|
22913
|
-
function setErrorMap(
|
|
23003
|
+
function setErrorMap(map2) {
|
|
22914
23004
|
config({
|
|
22915
|
-
customError:
|
|
23005
|
+
customError: map2
|
|
22916
23006
|
});
|
|
22917
23007
|
}
|
|
22918
23008
|
function getErrorMap() {
|
|
@@ -23409,7 +23499,7 @@ function bigint3(params) {
|
|
|
23409
23499
|
function date4(params) {
|
|
23410
23500
|
return /* @__PURE__ */ _coercedDate(ZodDate, params);
|
|
23411
23501
|
}
|
|
23412
|
-
config(
|
|
23502
|
+
config(en_default());
|
|
23413
23503
|
var controlType = external_exports.enum([
|
|
23414
23504
|
"text",
|
|
23415
23505
|
"textarea",
|
|
@@ -23564,6 +23654,16 @@ var fieldDirection = external_exports.enum(["input", "output", "inOut"]);
|
|
|
23564
23654
|
var outcomeType = external_exports.enum(["Positive", "Negative", "Neutral"]);
|
|
23565
23655
|
var outcomeAction = external_exports.enum(["Continue", "End"]);
|
|
23566
23656
|
var bindingMode = external_exports.enum(["variable", "fixed", "expression", "prompt"]);
|
|
23657
|
+
var fieldValueSchema = external_exports.discriminatedUnion("kind", [
|
|
23658
|
+
external_exports.object({
|
|
23659
|
+
kind: external_exports.literal("literal"),
|
|
23660
|
+
value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.array(external_exports.unknown()), external_exports.record(external_exports.string(), external_exports.unknown())])
|
|
23661
|
+
}),
|
|
23662
|
+
external_exports.object({
|
|
23663
|
+
kind: external_exports.literal("expression"),
|
|
23664
|
+
code: external_exports.string()
|
|
23665
|
+
})
|
|
23666
|
+
]);
|
|
23567
23667
|
var bindingKind = external_exports.enum([
|
|
23568
23668
|
"variable",
|
|
23569
23669
|
"string",
|
|
@@ -23610,6 +23710,7 @@ var fieldSchemaFor = (mode) => external_exports.preprocess((raw) => {
|
|
|
23610
23710
|
required: external_exports.boolean().optional(),
|
|
23611
23711
|
variable: external_exports.string().optional(),
|
|
23612
23712
|
binding: external_exports.string().optional(),
|
|
23713
|
+
value: fieldValueSchema.optional(),
|
|
23613
23714
|
rules: external_exports.array(fieldRuleSchema).optional(),
|
|
23614
23715
|
requiredMessage: external_exports.string().optional(),
|
|
23615
23716
|
colSpan: external_exports.number().int().min(1).max(12).optional(),
|
|
@@ -24176,7 +24277,104 @@ var DATA_TYPE_ASSIGNMENT_RULES = [
|
|
|
24176
24277
|
];
|
|
24177
24278
|
var VARS_SCOPE = "vars";
|
|
24178
24279
|
var VARS_PREFIX = `${VARS_SCOPE}.`;
|
|
24280
|
+
function bareName(raw) {
|
|
24281
|
+
const withoutEq = raw.startsWith("=") ? raw.slice(1) : raw;
|
|
24282
|
+
const scoped = /^\$?vars\./.exec(withoutEq);
|
|
24283
|
+
return scoped ? withoutEq.slice(scoped[0].length) : withoutEq;
|
|
24284
|
+
}
|
|
24285
|
+
function stripToBareName(raw) {
|
|
24286
|
+
const trimmed = raw.trim();
|
|
24287
|
+
const withoutJs = trimmed.startsWith("=js:") ? trimmed.slice(4) : trimmed;
|
|
24288
|
+
return bareName(withoutJs);
|
|
24289
|
+
}
|
|
24179
24290
|
var labelStyle = external_exports.enum(["title", "sentence"]);
|
|
24291
|
+
var fieldValueKind = { literal: "literal", expression: "expression" };
|
|
24292
|
+
var WHOLE_VALUE_VAR_REF = /^\$?vars\.([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)$/;
|
|
24293
|
+
var literalValue = (value) => ({
|
|
24294
|
+
kind: fieldValueKind.literal,
|
|
24295
|
+
value
|
|
24296
|
+
});
|
|
24297
|
+
var expressionValue = (code) => ({
|
|
24298
|
+
kind: fieldValueKind.expression,
|
|
24299
|
+
code
|
|
24300
|
+
});
|
|
24301
|
+
var NUMERIC = /^-?\d+(?:\.\d+)?$/;
|
|
24302
|
+
var NUMERIC_TYPES = /* @__PURE__ */ new Set([
|
|
24303
|
+
fieldType.enum.number,
|
|
24304
|
+
fieldType.enum.integer,
|
|
24305
|
+
fieldType.enum.float,
|
|
24306
|
+
fieldType.enum.double
|
|
24307
|
+
]);
|
|
24308
|
+
var STRUCTURAL_TYPES = /* @__PURE__ */ new Set([
|
|
24309
|
+
fieldType.enum.array,
|
|
24310
|
+
fieldType.enum.object
|
|
24311
|
+
]);
|
|
24312
|
+
function coerceLiteral(text, type) {
|
|
24313
|
+
const normalized = normalizeFieldType(type);
|
|
24314
|
+
const trimmed = text.trim();
|
|
24315
|
+
if (NUMERIC_TYPES.has(normalized) && NUMERIC.test(trimmed))
|
|
24316
|
+
return Number(trimmed);
|
|
24317
|
+
if (normalized === fieldType.enum.boolean && (trimmed === "true" || trimmed === "false")) {
|
|
24318
|
+
return trimmed === "true";
|
|
24319
|
+
}
|
|
24320
|
+
if (STRUCTURAL_TYPES.has(normalized) && /^[[{]/.test(trimmed)) {
|
|
24321
|
+
try {
|
|
24322
|
+
return JSON.parse(trimmed);
|
|
24323
|
+
} catch {
|
|
24324
|
+
return text;
|
|
24325
|
+
}
|
|
24326
|
+
}
|
|
24327
|
+
return text;
|
|
24328
|
+
}
|
|
24329
|
+
var REFERENCES_VARS = /(?<![\w$])\$?vars\./;
|
|
24330
|
+
var JS_PREFIX = "=js:";
|
|
24331
|
+
function parseFlowBinding(binding, type) {
|
|
24332
|
+
const raw = binding?.trim();
|
|
24333
|
+
if (!raw)
|
|
24334
|
+
return;
|
|
24335
|
+
if (raw.startsWith(JS_PREFIX)) {
|
|
24336
|
+
const code = raw.slice(JS_PREFIX.length).trim();
|
|
24337
|
+
const whole = WHOLE_VALUE_VAR_REF.exec(code);
|
|
24338
|
+
return expressionValue(whole ? `$vars.${whole[1]}` : code);
|
|
24339
|
+
}
|
|
24340
|
+
if (raw.startsWith("=")) {
|
|
24341
|
+
const body = raw.slice(1).trim();
|
|
24342
|
+
const whole = WHOLE_VALUE_VAR_REF.exec(body);
|
|
24343
|
+
if (whole)
|
|
24344
|
+
return expressionValue(`$vars.${whole[1]}`);
|
|
24345
|
+
return parseUnmarked(body, type);
|
|
24346
|
+
}
|
|
24347
|
+
return parseUnmarked(raw, type);
|
|
24348
|
+
}
|
|
24349
|
+
function parseUnmarked(body, type) {
|
|
24350
|
+
const whole = WHOLE_VALUE_VAR_REF.exec(body);
|
|
24351
|
+
if (whole)
|
|
24352
|
+
return expressionValue(`$vars.${whole[1]}`);
|
|
24353
|
+
const quoted = body.match(/^"(?:[^"\\]|\\.)*"$/);
|
|
24354
|
+
if (quoted) {
|
|
24355
|
+
try {
|
|
24356
|
+
return literalValue(coerceLiteral(JSON.parse(body), type));
|
|
24357
|
+
} catch {
|
|
24358
|
+
return literalValue(coerceLiteral(body.slice(1, -1).replace(/\\(.)/g, "$1"), type));
|
|
24359
|
+
}
|
|
24360
|
+
}
|
|
24361
|
+
const singleQuoted = body.match(/^'((?:[^'\\]|\\.)*)'$/);
|
|
24362
|
+
if (singleQuoted)
|
|
24363
|
+
return literalValue(coerceLiteral(singleQuoted[1].replace(/\\(.)/g, "$1"), type));
|
|
24364
|
+
if (REFERENCES_VARS.test(body))
|
|
24365
|
+
return expressionValue(body);
|
|
24366
|
+
return isLiteralOfType(body, type) ? literalValue(coerceLiteral(body, type)) : expressionValue(body);
|
|
24367
|
+
}
|
|
24368
|
+
function isLiteralOfType(text, type) {
|
|
24369
|
+
const normalized = normalizeFieldType(type);
|
|
24370
|
+
if (NUMERIC_TYPES.has(normalized))
|
|
24371
|
+
return NUMERIC.test(text);
|
|
24372
|
+
if (normalized === fieldType.enum.boolean)
|
|
24373
|
+
return text === "true" || text === "false";
|
|
24374
|
+
if (STRUCTURAL_TYPES.has(normalized))
|
|
24375
|
+
return /^[[{]/.test(text);
|
|
24376
|
+
return true;
|
|
24377
|
+
}
|
|
24180
24378
|
var OUTCOME_HANDLE_PREFIX = "outcome-";
|
|
24181
24379
|
var isOutcomeHandle = (handleId) => handleId.startsWith(OUTCOME_HANDLE_PREFIX);
|
|
24182
24380
|
var outcomeIdFromHandle = (handleId) => handleId.slice(OUTCOME_HANDLE_PREFIX.length);
|
|
@@ -24210,15 +24408,44 @@ function collectOutcomeConditions(outcomes, outgoingEdges, edgeConditions) {
|
|
|
24210
24408
|
}
|
|
24211
24409
|
}
|
|
24212
24410
|
var draft07 = { $schema: "http://json-schema.org/draft-07/schema#" };
|
|
24213
|
-
var asNonEmptyString = (v2) => typeof v2 === "string" && v2.trim() ? v2.trim() : undefined;
|
|
24214
24411
|
function getJsonSchemaForField(field) {
|
|
24215
|
-
const t4 = normalizeFieldType(
|
|
24216
|
-
const title =
|
|
24412
|
+
const t4 = normalizeFieldType(asNonEmptyString2(field.type) ?? "text");
|
|
24413
|
+
const title = asNonEmptyString2(field.label);
|
|
24217
24414
|
const schema = { ...FIELD_TYPE_TO_JSON_SCHEMA[t4] };
|
|
24218
24415
|
if (title)
|
|
24219
24416
|
schema.title = title;
|
|
24220
24417
|
return schema;
|
|
24221
24418
|
}
|
|
24419
|
+
function resolveFieldValue(field) {
|
|
24420
|
+
if (!field.binding) {
|
|
24421
|
+
return field.variable ? parseFlowBinding(`$${VARS_IDENTIFIER}.${stripToBareName(field.variable)}`, field.type) : undefined;
|
|
24422
|
+
}
|
|
24423
|
+
const raw = field.binding.trim();
|
|
24424
|
+
const id2 = typeof field.id === "string" ? field.id : "";
|
|
24425
|
+
const selfNames = [id2, id2.replace(/_+/g, ""), stripToBareName(field.variable ?? "")].filter(Boolean);
|
|
24426
|
+
if (/^[A-Za-z_][A-Za-z0-9_]*$/.test(raw) && selfNames.includes(raw)) {
|
|
24427
|
+
return parseFlowBinding(`$${VARS_IDENTIFIER}.${raw}`, field.type);
|
|
24428
|
+
}
|
|
24429
|
+
return parseFlowBinding(raw, field.type);
|
|
24430
|
+
}
|
|
24431
|
+
function templateBody(text) {
|
|
24432
|
+
const body = templateInterpolationBody2(text);
|
|
24433
|
+
return body === undefined ? undefined : `\`${body}\``;
|
|
24434
|
+
}
|
|
24435
|
+
function engineExpression(value, nodeId) {
|
|
24436
|
+
if (value.kind === "expression") {
|
|
24437
|
+
return transformExpression(`=js:${templateBody(value.code) ?? value.code}`, nodeId);
|
|
24438
|
+
}
|
|
24439
|
+
const literal2 = value.value;
|
|
24440
|
+
if (typeof literal2 === "number" || typeof literal2 === "boolean")
|
|
24441
|
+
return `=${literal2}`;
|
|
24442
|
+
if (typeof literal2 === "object")
|
|
24443
|
+
return `=js:(${JSON.stringify(literal2)})`;
|
|
24444
|
+
const templated = templateBody(literal2);
|
|
24445
|
+
if (templated !== undefined)
|
|
24446
|
+
return transformExpression(`=js:${templated}`, nodeId);
|
|
24447
|
+
return `=${JSON.stringify(literal2)}`;
|
|
24448
|
+
}
|
|
24222
24449
|
function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
24223
24450
|
element.model = element.model || {};
|
|
24224
24451
|
element.model.context = element.model.context || [];
|
|
@@ -24247,16 +24474,17 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24247
24474
|
"memorySpaceFolderPath"
|
|
24248
24475
|
]);
|
|
24249
24476
|
element.model.context = element.model.context.filter((c2) => {
|
|
24250
|
-
const
|
|
24251
|
-
return !resetContextKeys.has(
|
|
24477
|
+
const name = String(c2?.name ?? "");
|
|
24478
|
+
return !resetContextKeys.has(name) && !name.endsWith("ConnectionKey");
|
|
24252
24479
|
});
|
|
24253
24480
|
if (Array.isArray(element.model.inputs)) {
|
|
24254
24481
|
element.model.inputs = element.model.inputs.filter((i2) => i2?.name !== "HitlTaskArguments");
|
|
24255
24482
|
}
|
|
24256
24483
|
const nodeType = element.type;
|
|
24257
|
-
const isLegacyCustom = nodeType ===
|
|
24258
|
-
const
|
|
24259
|
-
const
|
|
24484
|
+
const isLegacyCustom = nodeType === HITL_NODE_TYPE2 && inputs.type === HITL_TASK_TYPE.Custom;
|
|
24485
|
+
const isDocProcessingNode = nodeType === HITL_DOC_VALIDATION_NODE_TYPE2 || nodeType === HITL_DOC_CLASSIFICATION_NODE_TYPE2;
|
|
24486
|
+
const shouldEmitQuickSchema = !isLegacyCustom && !isHitlCodedActionNodeType2(nodeType) && !isDocProcessingNode;
|
|
24487
|
+
const hitlType = resolveHitlTaskType(nodeType, inputs.type);
|
|
24260
24488
|
element.model.context.push({ name: "hitlType", type: "string", value: hitlType });
|
|
24261
24489
|
const inputSchema = { ...draft07, type: "object", properties: {}, required: [] };
|
|
24262
24490
|
if (!shouldEmitQuickSchema) {
|
|
@@ -24274,15 +24502,19 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24274
24502
|
})();
|
|
24275
24503
|
if (app && typeof app === "object" && !Array.isArray(app)) {
|
|
24276
24504
|
const a2 = app;
|
|
24277
|
-
const
|
|
24278
|
-
const folderPath =
|
|
24279
|
-
|
|
24280
|
-
|
|
24505
|
+
const name = asNonEmptyString2(a2.name);
|
|
24506
|
+
const folderPath = asNonEmptyString2(a2.folderPath);
|
|
24507
|
+
const key = asNonEmptyString2(a2.key);
|
|
24508
|
+
if (name || folderPath) {
|
|
24509
|
+
element.model.bindings = { resource: "app", resourceKey: (folderPath ? key || name : name) || "" };
|
|
24281
24510
|
}
|
|
24282
|
-
if (
|
|
24511
|
+
if (name)
|
|
24283
24512
|
element.model.context.push({ name: "name", type: "string", value: "<bindings.name>" });
|
|
24284
|
-
|
|
24285
|
-
|
|
24513
|
+
element.model.context.push({
|
|
24514
|
+
name: "folderPath",
|
|
24515
|
+
type: "string",
|
|
24516
|
+
value: folderPath ? "<bindings.folderPath>" : ""
|
|
24517
|
+
});
|
|
24286
24518
|
const appInputSchema = a2.inputSchema;
|
|
24287
24519
|
if (appInputSchema && typeof appInputSchema === "object" && !Array.isArray(appInputSchema) && appInputSchema.type === "object" && typeof appInputSchema.properties === "object") {
|
|
24288
24520
|
Object.assign(inputSchema, { ...draft07, ...appInputSchema });
|
|
@@ -24384,21 +24616,16 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24384
24616
|
});
|
|
24385
24617
|
}
|
|
24386
24618
|
const hitlTaskArgs = {};
|
|
24619
|
+
const nodeId = element.id ?? "";
|
|
24387
24620
|
for (const field of fields) {
|
|
24388
|
-
if (isInputField(field))
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
|
|
24393
|
-
|
|
24394
|
-
|
|
24395
|
-
|
|
24396
|
-
const normalizedBody = body.startsWith("vars.") ? body : `vars.${body}`;
|
|
24397
|
-
hitlTaskArgs[field.id] = `=js:${normalizedBody}`;
|
|
24398
|
-
} else {
|
|
24399
|
-
hitlTaskArgs[field.id] = raw.startsWith("=js:") ? raw : `=js:${body}`;
|
|
24400
|
-
}
|
|
24401
|
-
}
|
|
24621
|
+
if (!isInputField(field))
|
|
24622
|
+
continue;
|
|
24623
|
+
if (typeof field.id !== "string" || !field.id)
|
|
24624
|
+
continue;
|
|
24625
|
+
const value = resolveFieldValue(field);
|
|
24626
|
+
if (!value)
|
|
24627
|
+
continue;
|
|
24628
|
+
hitlTaskArgs[field.id] = engineExpression(value, nodeId);
|
|
24402
24629
|
}
|
|
24403
24630
|
if (shouldEmitQuickSchema) {
|
|
24404
24631
|
element.model.inputs = element.model.inputs || [];
|
|
@@ -24493,17 +24720,17 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24493
24720
|
const v2 = typeof assignee?.value === "string" ? assignee.value : typeof r2.value === "string" ? r2.value : undefined;
|
|
24494
24721
|
return { assigneeType: t4, assigneeValue: v2 };
|
|
24495
24722
|
})();
|
|
24496
|
-
const
|
|
24497
|
-
const assignmentCriteriaValue = CRITERIA_MAP[
|
|
24723
|
+
const lower = String(assigneeType ?? "").toLowerCase();
|
|
24724
|
+
const assignmentCriteriaValue = CRITERIA_MAP[lower] ?? "SingleUser";
|
|
24498
24725
|
if (assigneeType) {
|
|
24499
24726
|
element.model.context.push({ name: "assignmentCriteria", type: "string", value: assignmentCriteriaValue });
|
|
24500
24727
|
}
|
|
24501
|
-
if (
|
|
24728
|
+
if (lower === "custom") {
|
|
24502
24729
|
element.model.context.push({ name: "recipient", type: "json", body: "{}" });
|
|
24503
24730
|
element.model.context.push({ name: "customAssignees", type: "string", value: assigneeValue ?? "" });
|
|
24504
24731
|
} else {
|
|
24505
24732
|
if (assigneeValue) {
|
|
24506
|
-
const typeInt = RECIPIENT_TYPE_MAP[
|
|
24733
|
+
const typeInt = RECIPIENT_TYPE_MAP[lower] ?? 3;
|
|
24507
24734
|
element.model.context.push({
|
|
24508
24735
|
name: "recipient",
|
|
24509
24736
|
type: "json",
|
|
@@ -24523,8 +24750,8 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24523
24750
|
if (connections && typeof connections === "object") {
|
|
24524
24751
|
for (const [channelId, conn] of Object.entries(connections)) {
|
|
24525
24752
|
if (conn?.key) {
|
|
24526
|
-
const
|
|
24527
|
-
element.model.context.push({ name: `${
|
|
24753
|
+
const prefix = channelId === "Email" ? "outlook" : `${channelId.charAt(0).toLowerCase()}${channelId.slice(1)}`;
|
|
24754
|
+
element.model.context.push({ name: `${prefix}ConnectionKey`, type: "string", value: conn.key });
|
|
24528
24755
|
}
|
|
24529
24756
|
}
|
|
24530
24757
|
}
|
|
@@ -24558,9 +24785,9 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24558
24785
|
})();
|
|
24559
24786
|
if (memorySpace && typeof memorySpace === "object" && !Array.isArray(memorySpace)) {
|
|
24560
24787
|
const m2 = memorySpace;
|
|
24561
|
-
const memorySpaceName =
|
|
24562
|
-
const memorySpaceKey =
|
|
24563
|
-
const memorySpaceFolderPath =
|
|
24788
|
+
const memorySpaceName = asNonEmptyString2(m2.name);
|
|
24789
|
+
const memorySpaceKey = asNonEmptyString2(m2.key);
|
|
24790
|
+
const memorySpaceFolderPath = asNonEmptyString2(m2.folderPath);
|
|
24564
24791
|
if (memorySpaceName)
|
|
24565
24792
|
element.model.context.push({ name: "memorySpaceName", type: "string", value: memorySpaceName });
|
|
24566
24793
|
if (memorySpaceKey)
|
|
@@ -24571,15 +24798,15 @@ function applyHitlExtension(element, outgoingEdges, edgeConditions) {
|
|
|
24571
24798
|
if (edgeConditions && outgoingEdges && Array.isArray(outgoingEdges)) {
|
|
24572
24799
|
collectOutcomeConditions(outcomes, outgoingEdges, edgeConditions);
|
|
24573
24800
|
}
|
|
24574
|
-
if (
|
|
24575
|
-
|
|
24576
|
-
const
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
|
|
24582
|
-
element.model.context.push({ name: "
|
|
24801
|
+
if (isDocProcessingNode) {
|
|
24802
|
+
element.model.inputs = (element.model.inputs || []).filter((i2) => i2?.name !== "processedDocument");
|
|
24803
|
+
const processedDocument = asNonEmptyString2(inputs.processedDocument);
|
|
24804
|
+
if (processedDocument) {
|
|
24805
|
+
element.model.inputs.push({ name: "processedDocument", type: "object", target: "bodyField", value: processedDocument });
|
|
24806
|
+
}
|
|
24807
|
+
}
|
|
24808
|
+
if (nodeType === HITL_DOC_VALIDATION_NODE_TYPE2) {
|
|
24809
|
+
element.model.context.push({ name: "folderPath", type: "string", value: "" });
|
|
24583
24810
|
}
|
|
24584
24811
|
}
|
|
24585
24812
|
init_esm_shims();
|
|
@@ -24587,13 +24814,13 @@ init_esm_shims();
|
|
|
24587
24814
|
function toEngineRefExpression(value) {
|
|
24588
24815
|
if (typeof value !== "string")
|
|
24589
24816
|
return null;
|
|
24590
|
-
if (value.startsWith(
|
|
24817
|
+
if (value.startsWith(JS_EXPRESSION_PREFIX2))
|
|
24591
24818
|
return null;
|
|
24592
24819
|
const authored = value.startsWith("=") ? value.slice(1) : value;
|
|
24593
24820
|
if (!isEngineRef(authored))
|
|
24594
24821
|
return null;
|
|
24595
24822
|
const bare = toEngineRefPath(authored);
|
|
24596
|
-
return engineRefNeedsJsEvaluator(bare) ? `${
|
|
24823
|
+
return engineRefNeedsJsEvaluator(bare) ? `${JS_EXPRESSION_PREFIX2}${bare}` : `=${bare}`;
|
|
24597
24824
|
}
|
|
24598
24825
|
function vdoSelfKey(nodeId) {
|
|
24599
24826
|
return `__vdoself_${toIdentifierPart(nodeId)}`;
|
|
@@ -24620,14 +24847,25 @@ var VDO_OPERATOR_MAP = /* @__PURE__ */ new Map([
|
|
|
24620
24847
|
["ends with", "endswith"],
|
|
24621
24848
|
[IN_FILTER_OPERATOR, IN_QUERY_OPERATOR],
|
|
24622
24849
|
[NOT_IN_FILTER_OPERATOR, NOT_IN_QUERY_OPERATOR],
|
|
24623
|
-
[LEGACY_IN_FILTER_OPERATOR, IN_QUERY_OPERATOR]
|
|
24850
|
+
[LEGACY_IN_FILTER_OPERATOR, IN_QUERY_OPERATOR],
|
|
24851
|
+
[IS_NULL_FILTER_OPERATOR, "="],
|
|
24852
|
+
[IS_NOT_NULL_FILTER_OPERATOR, "!="],
|
|
24853
|
+
[IS_TRUE_FILTER_OPERATOR, "="],
|
|
24854
|
+
[IS_FALSE_FILTER_OPERATOR, "="]
|
|
24624
24855
|
]);
|
|
24856
|
+
function valuelessFilterValue(operator) {
|
|
24857
|
+
if (operator === IS_TRUE_FILTER_OPERATOR)
|
|
24858
|
+
return "true";
|
|
24859
|
+
if (operator === IS_FALSE_FILTER_OPERATOR)
|
|
24860
|
+
return "false";
|
|
24861
|
+
return;
|
|
24862
|
+
}
|
|
24625
24863
|
function jsExpressionBody(value) {
|
|
24626
|
-
return
|
|
24864
|
+
return getJsExpressionBody2(value) ?? null;
|
|
24627
24865
|
}
|
|
24628
24866
|
function toRecordWindowValue(raw) {
|
|
24629
24867
|
const body = jsExpressionBody(raw);
|
|
24630
|
-
const ref = toEngineRefExpression(body ?? raw);
|
|
24868
|
+
const ref = toEngineRefExpression(body ?? expressionText(raw));
|
|
24631
24869
|
if (ref)
|
|
24632
24870
|
return ref;
|
|
24633
24871
|
return body !== null && body.trim() !== "" && typeof raw === "string" ? raw : null;
|
|
@@ -24635,12 +24873,16 @@ function toRecordWindowValue(raw) {
|
|
|
24635
24873
|
function filterRowCompiles(row, multiRecord) {
|
|
24636
24874
|
if (!filterRowYieldsPredicate(row, multiRecord))
|
|
24637
24875
|
return false;
|
|
24876
|
+
if (isValuelessFilterOperator(row.operator))
|
|
24877
|
+
return true;
|
|
24638
24878
|
const body = jsExpressionBody(row.value);
|
|
24639
24879
|
return body === null || body.trim() !== "";
|
|
24640
24880
|
}
|
|
24641
24881
|
function filterRowExpressionCleared(row, multiRecord) {
|
|
24642
24882
|
if (isValueListFilterOperator(row.operator) && !multiRecord)
|
|
24643
24883
|
return false;
|
|
24884
|
+
if (isValuelessFilterOperator(row.operator))
|
|
24885
|
+
return false;
|
|
24644
24886
|
const body = jsExpressionBody(row.value);
|
|
24645
24887
|
return Boolean(row.field) && body !== null && body.trim() === "";
|
|
24646
24888
|
}
|
|
@@ -24666,12 +24908,12 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24666
24908
|
if (!entityName)
|
|
24667
24909
|
return { qesExpr: null, entityName: null, hoistedVars: [] };
|
|
24668
24910
|
const selectedFields = entityConfig._selectedFieldNames;
|
|
24669
|
-
const rawFilters = entityConfig._filters;
|
|
24911
|
+
const rawFilters = multiRecord ? entityConfig._filters : normalizeSingleRecordFilters(entityConfig._filters);
|
|
24670
24912
|
const filterModel = Array.isArray(rawFilters) ? toFilterModel(rawFilters.filter((f2) => filterRowCompiles(f2, multiRecord))) : toFilterModel(rawFilters);
|
|
24671
24913
|
const filters = Array.isArray(rawFilters) ? rawFilters : filterModelRows(toFilterModel(rawFilters));
|
|
24672
24914
|
const hoistedVars = [];
|
|
24673
|
-
const relatedPaths =
|
|
24674
|
-
if (
|
|
24915
|
+
const relatedPaths = relatedPathsIn2(multiRecord ? entityConfig : { ...entityConfig, _filters: rawFilters });
|
|
24916
|
+
if (validateRelatedPaths2(entityFieldSnapshots(entityConfig), relatedPaths, relatedColumnMapIn2(entityConfig)).problem) {
|
|
24675
24917
|
return { qesExpr: null, entityName: null, hoistedVars: [] };
|
|
24676
24918
|
}
|
|
24677
24919
|
const qesQuery = {};
|
|
@@ -24684,8 +24926,8 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24684
24926
|
if (filters.some((f2) => filterRowExpressionCleared(f2, multiRecord))) {
|
|
24685
24927
|
return { qesExpr: null, entityName: null, hoistedVars: [] };
|
|
24686
24928
|
}
|
|
24687
|
-
const windowUncarryable = multiRecord && (
|
|
24688
|
-
if (validFilters.some((f2) =>
|
|
24929
|
+
const windowUncarryable = multiRecord && (isQesUncarryableValue2(entityConfig._recordLimit) || isQesUncarryableValue2(entityConfig._skip));
|
|
24930
|
+
if (validFilters.some((f2) => !isValuelessFilterOperator(f2.operator) && isQesUncarryableValue2(f2.value)) || windowUncarryable) {
|
|
24689
24931
|
return { qesExpr: null, entityName: null, hoistedVars: [] };
|
|
24690
24932
|
}
|
|
24691
24933
|
if (validFilters.length > 0) {
|
|
@@ -24696,7 +24938,7 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24696
24938
|
return refExpr;
|
|
24697
24939
|
if (body !== null)
|
|
24698
24940
|
return raw;
|
|
24699
|
-
if (
|
|
24941
|
+
if (QES_UNSAFE_CHAR2.test(raw)) {
|
|
24700
24942
|
const hoistedId = `__qesVal_${toIdentifierPart(nodeId)}_${hoistSuffix}`;
|
|
24701
24943
|
hoistedVars.push({
|
|
24702
24944
|
id: hoistedId,
|
|
@@ -24711,7 +24953,7 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24711
24953
|
return raw;
|
|
24712
24954
|
};
|
|
24713
24955
|
const toFilterOperator = (raw, filterIdx2) => {
|
|
24714
|
-
if (!
|
|
24956
|
+
if (!QES_UNSAFE_CHAR2.test(raw))
|
|
24715
24957
|
return raw;
|
|
24716
24958
|
const hoistedId = `__qesOp_${toIdentifierPart(nodeId)}_${filterIdx2}`;
|
|
24717
24959
|
hoistedVars.push({
|
|
@@ -24726,6 +24968,10 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24726
24968
|
};
|
|
24727
24969
|
const toQueryFilter = (f2, filterIdx2) => {
|
|
24728
24970
|
const operator = toFilterOperator(VDO_OPERATOR_MAP.get(f2.operator) ?? f2.operator, filterIdx2);
|
|
24971
|
+
if (isValuelessFilterOperator(f2.operator)) {
|
|
24972
|
+
const value = valuelessFilterValue(f2.operator);
|
|
24973
|
+
return value === undefined ? { fieldName: f2.field, operator } : { fieldName: f2.field, operator, value };
|
|
24974
|
+
}
|
|
24729
24975
|
if (isValueListFilterOperator(f2.operator)) {
|
|
24730
24976
|
const parts = jsExpressionBody(f2.value) === null ? splitInValues(f2.value) : [f2.value];
|
|
24731
24977
|
const valueList = parts.map((part, i2) => toFilterValue(part, `${filterIdx2}_${i2}`));
|
|
@@ -24764,9 +25010,9 @@ function buildQesFromEntityConfig(entityConfig, nodeId, bindings, logContext = "
|
|
|
24764
25010
|
qesQuery.limit = toRecordWindowValue(entityConfig._recordLimit) ?? clampRecordLimit(entityConfig._recordLimit);
|
|
24765
25011
|
}
|
|
24766
25012
|
const qesJson = JSON.stringify(qesQuery);
|
|
24767
|
-
const
|
|
25013
|
+
const prefix = multiRecord ? "qem" : "qes";
|
|
24768
25014
|
return {
|
|
24769
|
-
qesExpr: wrapDataFabricTarget(entityConfig, entityName, `"${
|
|
25015
|
+
qesExpr: wrapDataFabricTarget(entityConfig, entityName, `"${prefix}:${qesJson}"`, bindings, logContext),
|
|
24770
25016
|
entityName,
|
|
24771
25017
|
hoistedVars
|
|
24772
25018
|
};
|
|
@@ -24851,6 +25097,9 @@ function buildUpdateTargetFromEntityConfig(entityConfig, nodeId, allNodes, bindi
|
|
|
24851
25097
|
const usable = authored.filter((f2) => filterRowCompiles(f2, false));
|
|
24852
25098
|
if (usable.length === 0 || usable.length !== authored.length)
|
|
24853
25099
|
return none;
|
|
25100
|
+
const compiled = normalizeSingleRecordFilters(readCfg._filters).rows ?? [];
|
|
25101
|
+
if (compiled.length !== authored.length || authored.some((row, i2) => row !== compiled[i2]))
|
|
25102
|
+
return none;
|
|
24854
25103
|
const selected = readCfg._selectedFieldNames;
|
|
24855
25104
|
const readCfgWithId = selected?.length && !selected.includes("Id") ? { ...readCfg, _selectedFieldNames: [...selected, "Id"] } : readCfg;
|
|
24856
25105
|
const { qesExpr: qesExpr2, entityName: entityName2 } = buildQesFromEntityConfig(readCfgWithId, readNode.id, bindings, logContext && "Read Entity");
|
|
@@ -24868,7 +25117,7 @@ function buildUpdateTargetFromEntityConfig(entityConfig, nodeId, allNodes, bindi
|
|
|
24868
25117
|
_selectedFieldNames: undefined,
|
|
24869
25118
|
_filters: [{ field: "Id", operator: "=", value: recordId }]
|
|
24870
25119
|
};
|
|
24871
|
-
if (!isExpression && !
|
|
25120
|
+
if (!isExpression && !QES_UNSAFE_CHAR2.test(recordId)) {
|
|
24872
25121
|
const { qesExpr: qesExpr2 } = buildQesFromEntityConfig(idFilterOnly, nodeId, bindings, null);
|
|
24873
25122
|
return {
|
|
24874
25123
|
targetExpr: wrapDataFabricTarget(entityConfig, entityName, `"${recordId}"`, bindings, logContext),
|
|
@@ -24887,12 +25136,12 @@ function entityFieldTypes(outputSchema) {
|
|
|
24887
25136
|
const properties = outputSchema?.properties;
|
|
24888
25137
|
if (!properties || typeof properties !== "object")
|
|
24889
25138
|
return {};
|
|
24890
|
-
const
|
|
24891
|
-
for (const [
|
|
25139
|
+
const types = {};
|
|
25140
|
+
for (const [name, prop] of Object.entries(properties)) {
|
|
24892
25141
|
if (typeof prop?.type === "string")
|
|
24893
|
-
|
|
25142
|
+
types[name] = prop.type;
|
|
24894
25143
|
}
|
|
24895
|
-
return
|
|
25144
|
+
return types;
|
|
24896
25145
|
}
|
|
24897
25146
|
function buildWriteBodyFromFieldValues(fieldUpdates, outputSchema, emptyValue = "null") {
|
|
24898
25147
|
const fieldTypes = entityFieldTypes(outputSchema);
|
|
@@ -24905,19 +25154,19 @@ function buildWriteBodyFromFieldValues(fieldUpdates, outputSchema, emptyValue =
|
|
|
24905
25154
|
continue;
|
|
24906
25155
|
}
|
|
24907
25156
|
const trimmed = typeof row.value === "string" ? row.value.trim() : "";
|
|
24908
|
-
const
|
|
24909
|
-
if (!trimmed ||
|
|
25157
|
+
const expressionBody2 = jsExpressionBody(trimmed);
|
|
25158
|
+
if (!trimmed || expressionBody2 === "") {
|
|
24910
25159
|
if (emptyValue === "null")
|
|
24911
25160
|
body[row.field] = null;
|
|
24912
25161
|
continue;
|
|
24913
25162
|
}
|
|
24914
25163
|
const declaredType = fieldTypes[row.field];
|
|
24915
|
-
const refExpr = toEngineRefExpression(
|
|
25164
|
+
const refExpr = toEngineRefExpression(expressionBody2 ?? trimmed);
|
|
24916
25165
|
if (refExpr) {
|
|
24917
25166
|
body[row.field] = refExpr;
|
|
24918
25167
|
continue;
|
|
24919
25168
|
}
|
|
24920
|
-
if (
|
|
25169
|
+
if (expressionBody2 !== null) {
|
|
24921
25170
|
body[row.field] = trimmed;
|
|
24922
25171
|
continue;
|
|
24923
25172
|
}
|
|
@@ -24971,6 +25220,13 @@ function rewriteScriptBodyForVdo(body, configs) {
|
|
|
24971
25220
|
return { body: rewritten, refs };
|
|
24972
25221
|
}
|
|
24973
25222
|
function rewriteInlineQesInValue(value, configs) {
|
|
25223
|
+
return rewriteQesReferences(value, configs, bracketedReference);
|
|
25224
|
+
}
|
|
25225
|
+
function bracketedReference(qesBody, tail) {
|
|
25226
|
+
const bracketed = tailToBrackets(tail);
|
|
25227
|
+
return bracketed ? `(${qesBody})${bracketed}` : qesBody;
|
|
25228
|
+
}
|
|
25229
|
+
function rewriteQesReferences(value, configs, format) {
|
|
24974
25230
|
const replacements = [];
|
|
24975
25231
|
for (const { readNodeId, fullPattern } of buildPatterns(configs)) {
|
|
24976
25232
|
const cfg = configs.get(readNodeId);
|
|
@@ -24980,14 +25236,12 @@ function rewriteInlineQesInValue(value, configs) {
|
|
|
24980
25236
|
fullPattern.lastIndex = 0;
|
|
24981
25237
|
let match;
|
|
24982
25238
|
while ((match = fullPattern.exec(value)) !== null) {
|
|
24983
|
-
|
|
24984
|
-
replacements.push({
|
|
24985
|
-
start: match.index,
|
|
24986
|
-
end: match.index + match[0].length,
|
|
24987
|
-
text: bracketed ? `(${qesBody})${bracketed}` : qesBody
|
|
24988
|
-
});
|
|
25239
|
+
replacements.push({ start: match.index, end: match.index + match[0].length, text: format(qesBody, match[1]) });
|
|
24989
25240
|
}
|
|
24990
25241
|
}
|
|
25242
|
+
return spliceReplacements(value, replacements);
|
|
25243
|
+
}
|
|
25244
|
+
function spliceReplacements(value, replacements) {
|
|
24991
25245
|
if (replacements.length === 0)
|
|
24992
25246
|
return value;
|
|
24993
25247
|
replacements.sort((a2, b2) => a2.start - b2.start);
|
|
@@ -25001,12 +25255,43 @@ function rewriteInlineQesInValue(value, configs) {
|
|
|
25001
25255
|
}
|
|
25002
25256
|
return out + value.slice(cursor);
|
|
25003
25257
|
}
|
|
25258
|
+
function fileProjectionTail(tail, isMultiRecord) {
|
|
25259
|
+
if (!tail)
|
|
25260
|
+
return;
|
|
25261
|
+
if (!isMultiRecord)
|
|
25262
|
+
return tail;
|
|
25263
|
+
const indexed = /^\.results(\[\d+\])(.+)$/.exec(tail);
|
|
25264
|
+
return indexed ? indexed[1] + indexed[2] : undefined;
|
|
25265
|
+
}
|
|
25266
|
+
function rewriteFileInputQesInValue(value, configs) {
|
|
25267
|
+
return rewriteQesReferences(value, configs, (qesBody, tail) => {
|
|
25268
|
+
const fileTail = fileProjectionTail(tail, qesBody.includes('["qem:'));
|
|
25269
|
+
return fileTail ? `${qesBody}${fileTail}` : bracketedReference(qesBody, tail);
|
|
25270
|
+
});
|
|
25271
|
+
}
|
|
25272
|
+
function rewriteFileInputs(node, configs) {
|
|
25273
|
+
const rewritten = /* @__PURE__ */ new Set;
|
|
25274
|
+
const detail = node.data?.inputs?.detail;
|
|
25275
|
+
if (!Array.isArray(detail?.multipartParameters))
|
|
25276
|
+
return rewritten;
|
|
25277
|
+
for (const param of detail.multipartParameters) {
|
|
25278
|
+
if (param?.dataType !== "file" || typeof param.value !== "string" || !param.value.startsWith("="))
|
|
25279
|
+
continue;
|
|
25280
|
+
const next = rewriteFileInputQesInValue(param.value, configs);
|
|
25281
|
+
if (next === param.value)
|
|
25282
|
+
continue;
|
|
25283
|
+
param.value = next;
|
|
25284
|
+
rewritten.add(next);
|
|
25285
|
+
}
|
|
25286
|
+
return rewritten;
|
|
25287
|
+
}
|
|
25004
25288
|
function applyVdoRewriting(allNodes, allEdges, configs, isScriptTask2, skipInlineRewrite, rewriteBareExpressions) {
|
|
25005
25289
|
const scriptTaskRefs = /* @__PURE__ */ new Map;
|
|
25006
25290
|
if (configs.size === 0)
|
|
25007
25291
|
return { scriptTaskRefs };
|
|
25008
25292
|
const rewriteExpressions = (node) => {
|
|
25009
|
-
|
|
25293
|
+
const fileValues = rewriteFileInputs(node, configs);
|
|
25294
|
+
deepTransformStringsInPlace(node.data, (s2) => s2.startsWith("=") && !fileValues.has(s2) ? rewriteInlineQesInValue(s2, configs) : s2);
|
|
25010
25295
|
rewriteBareExpressions?.(node, (s2) => rewriteInlineQesInValue(s2, configs));
|
|
25011
25296
|
};
|
|
25012
25297
|
for (const node of allNodes) {
|
|
@@ -25068,8 +25353,8 @@ function withTriggerParameterStash(detail, nodeType) {
|
|
|
25068
25353
|
}
|
|
25069
25354
|
function buildDAPContext(detail, nodeType) {
|
|
25070
25355
|
const context = [];
|
|
25071
|
-
const push = (
|
|
25072
|
-
context.push({ name
|
|
25356
|
+
const push = (name, value) => {
|
|
25357
|
+
context.push({ name, type: "string", value });
|
|
25073
25358
|
};
|
|
25074
25359
|
push("connectorKey", detail.connector);
|
|
25075
25360
|
push("connection", `<bindings.${detail.connector} connection>`);
|
|
@@ -25150,16 +25435,16 @@ function convertActivityInputs(detail, isUnifiedHttp) {
|
|
|
25150
25435
|
];
|
|
25151
25436
|
}
|
|
25152
25437
|
function unwrapJsExpression(expression) {
|
|
25153
|
-
if (
|
|
25438
|
+
if (isExpressionValue2(expression))
|
|
25154
25439
|
return expression.expression;
|
|
25155
25440
|
if (typeof expression !== "string")
|
|
25156
25441
|
return "";
|
|
25157
|
-
if (!expression.startsWith(
|
|
25442
|
+
if (!expression.startsWith(JS_EXPRESSION_PREFIX2))
|
|
25158
25443
|
return expression;
|
|
25159
25444
|
if (expression.startsWith(JS_EXPRESSION_PAREN_PREFIX) && expression.endsWith(")")) {
|
|
25160
25445
|
return expression.slice(JS_EXPRESSION_PAREN_PREFIX.length, -1);
|
|
25161
25446
|
}
|
|
25162
|
-
return expression.slice(
|
|
25447
|
+
return expression.slice(JS_EXPRESSION_PREFIX2.length);
|
|
25163
25448
|
}
|
|
25164
25449
|
function wrapJsVariablesInTemplateLiteral(expression) {
|
|
25165
25450
|
if (!expression?.length)
|
|
@@ -25181,10 +25466,10 @@ function buildFiltersExpression(filterExpression, prebuiltFilterVariables) {
|
|
|
25181
25466
|
}
|
|
25182
25467
|
const filterExpr = filterExpression?.trim() ?? "";
|
|
25183
25468
|
let cleaned = filterExpr ? trimBackticks(unwrapJsExpression(filterExpr)) : "";
|
|
25184
|
-
if (filterExpr.startsWith(
|
|
25469
|
+
if (filterExpr.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
25185
25470
|
cleaned = wrapJsVariablesInTemplateLiteral(cleaned);
|
|
25186
25471
|
const escaped = cleaned.replaceAll("`", "\\`");
|
|
25187
|
-
return { expression: escaped ? `${
|
|
25472
|
+
return { expression: escaped ? `${JS_EXPRESSION_PREFIX2}\`${escaped}\`` : "", variables: {} };
|
|
25188
25473
|
}
|
|
25189
25474
|
return { expression: cleaned, variables: {} };
|
|
25190
25475
|
}
|
|
@@ -25227,6 +25512,10 @@ function handleDAPNode(element, nodeType, manifestOutputDefinition) {
|
|
|
25227
25512
|
element.model.bindings = element.model.bindings || {};
|
|
25228
25513
|
element.model.bindings.resourceKey = detail.connectionResourceId;
|
|
25229
25514
|
}
|
|
25515
|
+
const inlineActivityConfiguration = element.inputs?.inlineActivityConfiguration;
|
|
25516
|
+
if (inlineActivityConfiguration) {
|
|
25517
|
+
element.model.context.push({ name: "inlineActivityConfiguration", type: "json", body: inlineActivityConfiguration });
|
|
25518
|
+
}
|
|
25230
25519
|
}
|
|
25231
25520
|
const hasInternalOutputs = element.model.outputs?.some((o2) => o2.internal === true);
|
|
25232
25521
|
if (!hasInternalOutputs) {
|
|
@@ -25246,15 +25535,15 @@ function assembleObjectInputValue(value) {
|
|
|
25246
25535
|
if (typeof value !== "object" || Array.isArray(value))
|
|
25247
25536
|
return value;
|
|
25248
25537
|
const entries = Object.entries(value);
|
|
25249
|
-
const hasExpressions = entries.some(([, v2]) => typeof v2 === "string" && v2.startsWith(
|
|
25538
|
+
const hasExpressions = entries.some(([, v2]) => typeof v2 === "string" && v2.startsWith(JS_EXPRESSION_PREFIX2));
|
|
25250
25539
|
if (!hasExpressions) {
|
|
25251
25540
|
return JSON.stringify(value);
|
|
25252
25541
|
}
|
|
25253
25542
|
const JS_IDENT = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
25254
25543
|
const props = entries.map(([key, v2]) => {
|
|
25255
25544
|
const safeKey = JS_IDENT.test(key) ? key : `'${key.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
25256
|
-
if (typeof v2 === "string" && v2.startsWith(
|
|
25257
|
-
const exprBody = v2.slice(
|
|
25545
|
+
if (typeof v2 === "string" && v2.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
25546
|
+
const exprBody = v2.slice(JS_EXPRESSION_PREFIX2.length);
|
|
25258
25547
|
return `${safeKey}: ${exprBody || "undefined"}`;
|
|
25259
25548
|
}
|
|
25260
25549
|
if (typeof v2 === "object" && v2 != null) {
|
|
@@ -25320,7 +25609,7 @@ function singleBindingExpression(value) {
|
|
|
25320
25609
|
return expression || undefined;
|
|
25321
25610
|
}
|
|
25322
25611
|
function serializeVoiceCallContext(callContext, nodeId) {
|
|
25323
|
-
if (
|
|
25612
|
+
if (isExpressionValue2(callContext)) {
|
|
25324
25613
|
if (callContext.type !== "jsExpression" || callContext.expression.trim() === "")
|
|
25325
25614
|
return callContext;
|
|
25326
25615
|
return serializeExpressionValue(callContext, nodeId);
|
|
@@ -25330,15 +25619,15 @@ function serializeVoiceCallContext(callContext, nodeId) {
|
|
|
25330
25619
|
const trimmed = callContext.trim();
|
|
25331
25620
|
const bindingExpression = singleBindingExpression(trimmed);
|
|
25332
25621
|
if (bindingExpression) {
|
|
25333
|
-
return transformExpression(`${
|
|
25622
|
+
return transformExpression(`${JS_EXPRESSION_PREFIX2}${bindingExpression}`, nodeId);
|
|
25334
25623
|
}
|
|
25335
|
-
if (trimmed.startsWith(
|
|
25624
|
+
if (trimmed.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
25336
25625
|
return transformExpression(trimmed, nodeId);
|
|
25337
25626
|
}
|
|
25338
25627
|
return trimmed;
|
|
25339
25628
|
}
|
|
25340
25629
|
function deriveConversationIdFromCallContext(callContext) {
|
|
25341
|
-
if (
|
|
25630
|
+
if (isExpressionValue2(callContext))
|
|
25342
25631
|
return;
|
|
25343
25632
|
if (callContext != null && typeof callContext === "object" && !Array.isArray(callContext)) {
|
|
25344
25633
|
return callContext.conversationId;
|
|
@@ -25348,11 +25637,11 @@ function deriveConversationIdFromCallContext(callContext) {
|
|
|
25348
25637
|
const trimmed = callContext.trim();
|
|
25349
25638
|
if (!trimmed)
|
|
25350
25639
|
return;
|
|
25351
|
-
if (trimmed.startsWith(
|
|
25352
|
-
return `${
|
|
25640
|
+
if (trimmed.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
25641
|
+
return `${JS_EXPRESSION_PREFIX2}(${unwrapJsExpression(trimmed).trim()})?.conversationId`;
|
|
25353
25642
|
}
|
|
25354
25643
|
if (trimmed.startsWith("=") && trimmed.length > 1) {
|
|
25355
|
-
return `${
|
|
25644
|
+
return `${JS_EXPRESSION_PREFIX2}(${trimmed.slice(1).trim()})?.conversationId`;
|
|
25356
25645
|
}
|
|
25357
25646
|
return;
|
|
25358
25647
|
}
|
|
@@ -25424,9 +25713,9 @@ function handleUiPathOrchestratorActivity(element, _values, inputOutputs) {
|
|
|
25424
25713
|
}
|
|
25425
25714
|
function handleUiPathStartProcessActivity(element, values, inputOutputs) {
|
|
25426
25715
|
const inputs = element.inputs;
|
|
25427
|
-
const fireAndForget = inputs?.[
|
|
25428
|
-
if (inputs &&
|
|
25429
|
-
const { [
|
|
25716
|
+
const fireAndForget = inputs?.[FIRE_AND_FORGET_INPUT2] === true;
|
|
25717
|
+
if (inputs && FIRE_AND_FORGET_INPUT2 in inputs) {
|
|
25718
|
+
const { [FIRE_AND_FORGET_INPUT2]: _flag, ...serializableInputs } = inputs;
|
|
25430
25719
|
element.inputs = serializableInputs;
|
|
25431
25720
|
}
|
|
25432
25721
|
handleUiPathOrchestratorActivity(element, values, inputOutputs);
|
|
@@ -25504,8 +25793,8 @@ function handleUiPathOrchestratorAgentJob(element, _values, inputOutputs) {
|
|
|
25504
25793
|
}
|
|
25505
25794
|
function buildResourceEntryPoint(model, source) {
|
|
25506
25795
|
const intent = consumePackageIntent(model);
|
|
25507
|
-
const
|
|
25508
|
-
return source ? `${
|
|
25796
|
+
const prefix = intent === "Publish" ? PUBLISH_ENTRY_POINT_PREFIX : "";
|
|
25797
|
+
return source ? `${prefix}${source}/agent.json` : "";
|
|
25509
25798
|
}
|
|
25510
25799
|
function handleInlineAgentJob(element, _values, inputOutputs) {
|
|
25511
25800
|
element.model = element.model || {};
|
|
@@ -25513,12 +25802,12 @@ function handleInlineAgentJob(element, _values, inputOutputs) {
|
|
|
25513
25802
|
const label = element.label || element.display?.label || "Agent";
|
|
25514
25803
|
const projectId = element.inputs?.source || element.model.source || element.model.agentProjectId || "";
|
|
25515
25804
|
const entryPoint = buildResourceEntryPoint(element.model, projectId);
|
|
25516
|
-
const upsertCtx = (
|
|
25517
|
-
const existing = element.model.context.find((c2) => c2.name ===
|
|
25805
|
+
const upsertCtx = (name, value) => {
|
|
25806
|
+
const existing = element.model.context.find((c2) => c2.name === name);
|
|
25518
25807
|
if (existing) {
|
|
25519
25808
|
existing.value = value;
|
|
25520
25809
|
} else {
|
|
25521
|
-
element.model.context.push({ name
|
|
25810
|
+
element.model.context.push({ name, type: "string", value });
|
|
25522
25811
|
}
|
|
25523
25812
|
};
|
|
25524
25813
|
upsertCtx("_label", label);
|
|
@@ -25530,7 +25819,7 @@ function handleInlineAgentJob(element, _values, inputOutputs) {
|
|
|
25530
25819
|
const agentInputEncoding = consumeAgentInputEncoding(element.model);
|
|
25531
25820
|
const inputs = element.inputs ?? {};
|
|
25532
25821
|
const nodeId = element.id ?? "";
|
|
25533
|
-
const isVoiceAgent =
|
|
25822
|
+
const isVoiceAgent = isVoiceAgentNodeType2(element.type);
|
|
25534
25823
|
const voiceCallContext = isVoiceAgent ? serializeVoiceCallContext(inputs.callContext, nodeId) : undefined;
|
|
25535
25824
|
const derived = inputs.derivedInputDefinition;
|
|
25536
25825
|
if (Array.isArray(derived)) {
|
|
@@ -25546,7 +25835,7 @@ function handleInlineAgentJob(element, _values, inputOutputs) {
|
|
|
25546
25835
|
element.model.inputDefinition = [...element.model.inputDefinition ?? [], ...element.model.inputs];
|
|
25547
25836
|
}
|
|
25548
25837
|
delete element.model.inputs;
|
|
25549
|
-
if (
|
|
25838
|
+
if (isConversationalOrVoiceAgentNodeType2(element.type)) {
|
|
25550
25839
|
const conversationalInputs = transformConversationalInputsForBpmn(inputs, nodeId, voiceCallContext, isVoiceAgent);
|
|
25551
25840
|
if (conversationalInputs.fpsProperties) {
|
|
25552
25841
|
const existing = element.model.context.find((c2) => c2.name === "fpsProperties");
|
|
@@ -25586,7 +25875,7 @@ function handleInlineAgentJob(element, _values, inputOutputs) {
|
|
|
25586
25875
|
];
|
|
25587
25876
|
}
|
|
25588
25877
|
if (isVoiceAgent) {
|
|
25589
|
-
if (
|
|
25878
|
+
if (isCallContextEmpty2(inputs.callContext)) {
|
|
25590
25879
|
throw new Error(`Missing callContext for voice inline agent "${label}" (${projectId || "missing source"}). Bind callContext before debug/publish.`);
|
|
25591
25880
|
}
|
|
25592
25881
|
const voiceBodyInput = {
|
|
@@ -25763,6 +26052,105 @@ function handleUiPathQueueTriggerEvent(element, _values) {
|
|
|
25763
26052
|
}
|
|
25764
26053
|
];
|
|
25765
26054
|
}
|
|
26055
|
+
var DEFAULT_QUEUE_ITEM_PRIORITY = "Normal";
|
|
26056
|
+
function applyQueueItemPriorityDefaults(value) {
|
|
26057
|
+
const isExpression = typeof value === "string" && value.startsWith(JS_EXPRESSION_PREFIX2);
|
|
26058
|
+
const text = isExpression ? value.slice(JS_EXPRESSION_PREFIX2.length) : undefined;
|
|
26059
|
+
let items;
|
|
26060
|
+
if (Array.isArray(value)) {
|
|
26061
|
+
items = value;
|
|
26062
|
+
} else if (typeof text === "string") {
|
|
26063
|
+
try {
|
|
26064
|
+
const parsed = JSON.parse(text);
|
|
26065
|
+
if (!Array.isArray(parsed))
|
|
26066
|
+
return value;
|
|
26067
|
+
items = parsed;
|
|
26068
|
+
} catch {
|
|
26069
|
+
return value;
|
|
26070
|
+
}
|
|
26071
|
+
} else {
|
|
26072
|
+
return value;
|
|
26073
|
+
}
|
|
26074
|
+
if (!items.some((item) => isPlainObject2(item) && item.Priority == null))
|
|
26075
|
+
return value;
|
|
26076
|
+
const filled = items.map((item) => isPlainObject2(item) && item.Priority == null ? { ...item, Priority: DEFAULT_QUEUE_ITEM_PRIORITY } : item);
|
|
26077
|
+
return isExpression ? `${JS_EXPRESSION_PREFIX2}${JSON.stringify(filled)}` : filled;
|
|
26078
|
+
}
|
|
26079
|
+
function handleUiPathBulkAddQueueItems(element, _values) {
|
|
26080
|
+
if (!element.model) {
|
|
26081
|
+
return;
|
|
26082
|
+
}
|
|
26083
|
+
applyQueueBindings(element.model, element.inputs?.queue);
|
|
26084
|
+
element.model.inputSchema = {
|
|
26085
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
26086
|
+
type: "object",
|
|
26087
|
+
properties: {
|
|
26088
|
+
QueueItems: { type: "object", title: "Transaction items" },
|
|
26089
|
+
CommitStrategy: { type: "dropdown", title: "Commit type" }
|
|
26090
|
+
},
|
|
26091
|
+
required: ["QueueItems", "CommitStrategy"]
|
|
26092
|
+
};
|
|
26093
|
+
applyQueueBodyActivity(element, (inputs) => ({
|
|
26094
|
+
QueueItems: applyQueueItemPriorityDefaults(inputs.queueItems) ?? null,
|
|
26095
|
+
CommitStrategy: inputs.commitStrategy ?? "AllOrNothing"
|
|
26096
|
+
}), {
|
|
26097
|
+
name: "output",
|
|
26098
|
+
type: "jsonSchema",
|
|
26099
|
+
source: "=response",
|
|
26100
|
+
var: "output"
|
|
26101
|
+
});
|
|
26102
|
+
}
|
|
26103
|
+
function serializeQueueItemStatuses(value) {
|
|
26104
|
+
if (Array.isArray(value))
|
|
26105
|
+
return value.filter((s2) => typeof s2 === "string" && s2 !== "").join(",");
|
|
26106
|
+
return typeof value === "string" ? value : "";
|
|
26107
|
+
}
|
|
26108
|
+
function queueFilterContextValue(value) {
|
|
26109
|
+
if (value == null)
|
|
26110
|
+
return "";
|
|
26111
|
+
return typeof value === "string" ? value : String(value);
|
|
26112
|
+
}
|
|
26113
|
+
function handleUiPathGetQueueItems(element, _values) {
|
|
26114
|
+
if (!element.model) {
|
|
26115
|
+
return;
|
|
26116
|
+
}
|
|
26117
|
+
element.model.context = element.model.context || [];
|
|
26118
|
+
const inputs = element.inputs || {};
|
|
26119
|
+
applyQueueBindings(element.model, inputs.queue);
|
|
26120
|
+
const priority = queueFilterContextValue(inputs.priority);
|
|
26121
|
+
const filters = {
|
|
26122
|
+
statuses: serializeQueueItemStatuses(inputs.statuses),
|
|
26123
|
+
reference: queueFilterContextValue(inputs.reference),
|
|
26124
|
+
filterStrategy: queueFilterContextValue(inputs.filterStrategy) || "Equals",
|
|
26125
|
+
priority: priority === "Any" ? "" : priority,
|
|
26126
|
+
from: queueFilterContextValue(inputs.createdFrom),
|
|
26127
|
+
to: queueFilterContextValue(inputs.createdTo)
|
|
26128
|
+
};
|
|
26129
|
+
const context = element.model.context;
|
|
26130
|
+
for (const [name, value] of Object.entries(filters)) {
|
|
26131
|
+
const existing = context.find((c2) => c2.name === name);
|
|
26132
|
+
if (existing) {
|
|
26133
|
+
existing.value = value;
|
|
26134
|
+
} else {
|
|
26135
|
+
context.push({ name, type: "string", value });
|
|
26136
|
+
}
|
|
26137
|
+
}
|
|
26138
|
+
element.model.inputs = [];
|
|
26139
|
+
element.model.outputs = [
|
|
26140
|
+
{
|
|
26141
|
+
name: "output",
|
|
26142
|
+
type: "jsonSchema",
|
|
26143
|
+
source: "=this",
|
|
26144
|
+
var: "output"
|
|
26145
|
+
},
|
|
26146
|
+
{
|
|
26147
|
+
name: "Error",
|
|
26148
|
+
type: "jsonSchema",
|
|
26149
|
+
source: "=Error",
|
|
26150
|
+
var: "error"
|
|
26151
|
+
}
|
|
26152
|
+
];
|
|
26153
|
+
}
|
|
25766
26154
|
function handleEcsDeepRag(element, _values) {
|
|
25767
26155
|
if (!element.model) {
|
|
25768
26156
|
return;
|
|
@@ -25809,12 +26197,12 @@ function handleIdpExtraction(element, _values) {
|
|
|
25809
26197
|
const inputs = element.inputs || {};
|
|
25810
26198
|
element.model.context = element.model.context || [];
|
|
25811
26199
|
const label = element.label || element.display?.label || "Extract v2";
|
|
25812
|
-
const upsertCtx = (
|
|
25813
|
-
const existing = element.model.context.find((c2) => c2.name ===
|
|
26200
|
+
const upsertCtx = (name, value) => {
|
|
26201
|
+
const existing = element.model.context.find((c2) => c2.name === name);
|
|
25814
26202
|
if (existing) {
|
|
25815
26203
|
existing.value = value;
|
|
25816
26204
|
} else {
|
|
25817
|
-
element.model.context.push({ name
|
|
26205
|
+
element.model.context.push({ name, type: "string", value });
|
|
25818
26206
|
}
|
|
25819
26207
|
};
|
|
25820
26208
|
upsertCtx("_label", label);
|
|
@@ -25828,17 +26216,23 @@ function handleIdpExtraction(element, _values) {
|
|
|
25828
26216
|
resourceSubType: null,
|
|
25829
26217
|
resourceKey: processorKey,
|
|
25830
26218
|
name: label,
|
|
25831
|
-
values: [
|
|
26219
|
+
values: [
|
|
26220
|
+
{ name: IDP_PROCESSOR_BINDING_NAME, propertyAttribute: IDP_PROCESSOR_BINDING_NAME, default: processorKey },
|
|
26221
|
+
{ name: IDP_PROCESSOR_NAME_BINDING_NAME, propertyAttribute: IDP_PROCESSOR_NAME_BINDING_NAME, default: "" },
|
|
26222
|
+
{ name: IDP_PROCESSOR_FOLDER_PATH_BINDING_NAME, propertyAttribute: IDP_PROCESSOR_FOLDER_PATH_BINDING_NAME, default: "" }
|
|
26223
|
+
]
|
|
25832
26224
|
};
|
|
25833
26225
|
upsertCtx("processorKeyBinding", `<bindings.${IDP_PROCESSOR_BINDING_NAME}>`);
|
|
26226
|
+
upsertCtx("processorName", `<bindings.${IDP_PROCESSOR_NAME_BINDING_NAME}>`);
|
|
26227
|
+
upsertCtx("folderPath", `<bindings.${IDP_PROCESSOR_FOLDER_PATH_BINDING_NAME}>`);
|
|
25834
26228
|
}
|
|
25835
|
-
const
|
|
26229
|
+
const idpInputs = [
|
|
25836
26230
|
{ name: "input", type: "json", target: "bodyField", body: JSON.stringify({ downloadedFileOutput: inputs.fileRef || null }) }
|
|
25837
26231
|
];
|
|
25838
26232
|
if (inputs.pageRange) {
|
|
25839
|
-
|
|
26233
|
+
idpInputs.push({ name: "pageRange", type: "string", target: "header", value: String(inputs.pageRange) });
|
|
25840
26234
|
}
|
|
25841
|
-
element.model.inputs =
|
|
26235
|
+
element.model.inputs = idpInputs;
|
|
25842
26236
|
element.model.outputs = [
|
|
25843
26237
|
{ name: "output", type: "jsonSchema", source: "=this", var: "output" },
|
|
25844
26238
|
{ name: "error", type: "jsonSchema", source: "=Error", var: "error" }
|
|
@@ -25851,13 +26245,13 @@ function handleIxpExtraction(element, _values) {
|
|
|
25851
26245
|
const inputs = element.inputs || {};
|
|
25852
26246
|
element.model.version = "v2";
|
|
25853
26247
|
element.model.context = element.model.context || [];
|
|
25854
|
-
const setCtx = (
|
|
25855
|
-
const existing = element.model.context.find((c2) => c2?.name ===
|
|
26248
|
+
const setCtx = (name, value) => {
|
|
26249
|
+
const existing = element.model.context.find((c2) => c2?.name === name);
|
|
25856
26250
|
if (existing) {
|
|
25857
26251
|
existing.type = "string";
|
|
25858
26252
|
existing.value = value;
|
|
25859
26253
|
} else {
|
|
25860
|
-
element.model.context.push({ name
|
|
26254
|
+
element.model.context.push({ name, type: "string", value });
|
|
25861
26255
|
}
|
|
25862
26256
|
};
|
|
25863
26257
|
if (inputs.folderKey)
|
|
@@ -26121,6 +26515,7 @@ var UiPathExtensionHandlers = {
|
|
|
26121
26515
|
}
|
|
26122
26516
|
},
|
|
26123
26517
|
["Actions.HITL"]: (element, _resolvedValues, ctx) => applyHitlExtension(element, ctx?.outgoingEdges, ctx?.edgeConditions),
|
|
26518
|
+
["IXP.ExtractionValidation"]: (element, _resolvedValues, ctx) => applyHitlExtension(element, ctx?.outgoingEdges, ctx?.edgeConditions),
|
|
26124
26519
|
["Orchestrator.StartJob"]: handleUiPathOrchestratorActivity,
|
|
26125
26520
|
["Orchestrator.StartAgentJob"]: handleUiPathOrchestratorAgentJob,
|
|
26126
26521
|
["Orchestrator.StartInlineAgentJob"]: handleInlineAgentJob,
|
|
@@ -26141,6 +26536,8 @@ var UiPathExtensionHandlers = {
|
|
|
26141
26536
|
["Orchestrator.SetTransactionProgress"]: handleUiPathSetTransactionProgress,
|
|
26142
26537
|
["Orchestrator.PostponeTransactionItem"]: handleUiPathPostponeTransactionItem,
|
|
26143
26538
|
["Orchestrator.DeleteQueueItems"]: handleUiPathDeleteQueueItems,
|
|
26539
|
+
["Orchestrator.BulkAddQueueItems"]: handleUiPathBulkAddQueueItems,
|
|
26540
|
+
["Orchestrator.GetQueueItems"]: handleUiPathGetQueueItems,
|
|
26144
26541
|
["Orchestrator.QueueItemAdded"]: handleUiPathQueueTriggerEvent,
|
|
26145
26542
|
["Orchestrator.StartAgenticProcess"]: handleUiPathStartProcessActivity,
|
|
26146
26543
|
["Orchestrator.StartAgenticProcessAsync"]: handleUiPathStartProcessActivity,
|
|
@@ -26405,7 +26802,7 @@ function createImplicitBreakFlagTask(loopNodeId) {
|
|
|
26405
26802
|
function expandCoreLogicLoops(allNodes, allEdges, nodeDefinitions) {
|
|
26406
26803
|
const preservedEdgeIds = /* @__PURE__ */ new Set;
|
|
26407
26804
|
for (const node of allNodes) {
|
|
26408
|
-
if (!
|
|
26805
|
+
if (!isLoopNodeType2(node.type)) {
|
|
26409
26806
|
continue;
|
|
26410
26807
|
}
|
|
26411
26808
|
const definition = findNodeDefinition(node, nodeDefinitions);
|
|
@@ -26517,7 +26914,7 @@ function generateLoopOutputExpression(nodesInLoop, nodeDefinitions) {
|
|
|
26517
26914
|
const def = nodeDef.outputDefinition[outputName];
|
|
26518
26915
|
if (def.scope === "internal")
|
|
26519
26916
|
continue;
|
|
26520
|
-
if (outputName === "error" && !node.data?.inputs?.errorHandlingEnabled)
|
|
26917
|
+
if (outputName === "error" && !node.data?.inputs?.errorHandlingEnabled && !isTimeLimitEnabled2(node.data?.inputs))
|
|
26521
26918
|
continue;
|
|
26522
26919
|
outputs.push(`"${outputName}": vars.${node.id}.${outputName}`);
|
|
26523
26920
|
}
|
|
@@ -26537,7 +26934,7 @@ function inferLoopOutputSchema(nodesInLoop, nodeDefinitions, allNodes, visited =
|
|
|
26537
26934
|
if (node.id.startsWith(implicitNodePrefix))
|
|
26538
26935
|
continue;
|
|
26539
26936
|
const nodeType = node.data?.type || node.type;
|
|
26540
|
-
if (
|
|
26937
|
+
if (isCollectionLoopNodeType2(nodeType)) {
|
|
26541
26938
|
if (visited.has(node.id)) {
|
|
26542
26939
|
continue;
|
|
26543
26940
|
}
|
|
@@ -26562,7 +26959,7 @@ function inferLoopOutputSchema(nodesInLoop, nodeDefinitions, allNodes, visited =
|
|
|
26562
26959
|
for (const [outputName, outputDef] of Object.entries(nodeDef.outputDefinition)) {
|
|
26563
26960
|
if (outputDef.scope === "internal")
|
|
26564
26961
|
continue;
|
|
26565
|
-
if (outputName === "error" && !node.data?.inputs?.errorHandlingEnabled)
|
|
26962
|
+
if (outputName === "error" && !node.data?.inputs?.errorHandlingEnabled && !isTimeLimitEnabled2(node.data?.inputs))
|
|
26566
26963
|
continue;
|
|
26567
26964
|
properties[node.id].properties[outputName] = outputDef._jsonSchema || { type: outputDef.type || "any" };
|
|
26568
26965
|
}
|
|
@@ -26628,17 +27025,17 @@ function getLoopCollectionReferenceExpression(collection) {
|
|
|
26628
27025
|
return collectionExpr.startsWith("$") ? collectionExpr.slice(1) : collectionExpr;
|
|
26629
27026
|
}
|
|
26630
27027
|
function doWhileRangeExpression(limit) {
|
|
26631
|
-
const length = doWhileRuntimeLimitExpression(limit) ??
|
|
27028
|
+
const length = doWhileRuntimeLimitExpression(limit) ?? resolveDoWhileLimit2(limit);
|
|
26632
27029
|
return `=js:[...Array(${length}).keys()]`;
|
|
26633
27030
|
}
|
|
26634
27031
|
function doWhileRuntimeLimitExpression(limit) {
|
|
26635
|
-
if (
|
|
27032
|
+
if (parseDoWhileLimit2(limit) !== undefined)
|
|
26636
27033
|
return;
|
|
26637
27034
|
const body = stripExpressionPrefix(unwrapJsExpression(limit));
|
|
26638
27035
|
if (!body)
|
|
26639
27036
|
return;
|
|
26640
27037
|
const ref = `(${body})`;
|
|
26641
|
-
return `Number.isInteger(${ref}) && ${ref} >= ${
|
|
27038
|
+
return `Number.isInteger(${ref}) && ${ref} >= ${DOWHILE_MIN_LIMIT2} && ${ref} <= ${DOWHILE_MAX_LIMIT2} ? ${ref} : ${DOWHILE_MAX_LIMIT2}`;
|
|
26642
27039
|
}
|
|
26643
27040
|
function invertDoWhileCondition(condition) {
|
|
26644
27041
|
const body = stripExpressionPrefix(unwrapJsExpression(condition));
|
|
@@ -26670,13 +27067,13 @@ function isImplicitLoopStartOrEndEvent(node, allNodes) {
|
|
|
26670
27067
|
return false;
|
|
26671
27068
|
}
|
|
26672
27069
|
const parent = allNodes.find((n) => n.id === node.parentId);
|
|
26673
|
-
return parent?.type === "bpmn:SubProcess" &&
|
|
27070
|
+
return parent?.type === "bpmn:SubProcess" && isLoopNodeType2(parent.data?.type);
|
|
26674
27071
|
}
|
|
26675
27072
|
function collectAncestorLoops(node, allNodes) {
|
|
26676
27073
|
return walkAncestorCollectionLoops({
|
|
26677
27074
|
getNode: (id2) => allNodes.find((n) => n.id === id2),
|
|
26678
27075
|
getParentId: (n) => n.parentId ?? n.data?.parentId,
|
|
26679
|
-
isCollectionLoop: (n) =>
|
|
27076
|
+
isCollectionLoop: (n) => isCollectionLoopNodeType2(n.data?.type),
|
|
26680
27077
|
shouldTraverse: (n) => n.type === "bpmn:SubProcess"
|
|
26681
27078
|
}, node.parentId ?? node.data?.parentId);
|
|
26682
27079
|
}
|
|
@@ -26685,7 +27082,7 @@ function calculateIteratorIndex(loopNode, allNodes) {
|
|
|
26685
27082
|
}
|
|
26686
27083
|
function setupLoopCharacteristics(loopNode, iteratorIndex, hasBreakEdges = false) {
|
|
26687
27084
|
const loopConfig = loopNode.data.inputs;
|
|
26688
|
-
const isDoWhile =
|
|
27085
|
+
const isDoWhile = isDoWhileNodeType2(loopNode.data?.type);
|
|
26689
27086
|
const inputCollection = isDoWhile ? doWhileRangeExpression(loopConfig.limit) : normalizeLoopInputCollection(loopConfig.collection);
|
|
26690
27087
|
const rawCompletionCondition = isDoWhile ? invertDoWhileCondition(loopConfig.condition) : loopConfig.completionCondition;
|
|
26691
27088
|
const composedCompletionCondition = composeLoopCompletionCondition(loopNode.id, rawCompletionCondition, hasBreakEdges);
|
|
@@ -26741,7 +27138,7 @@ function transformLoopVariablesInString(str, ancestorLoops) {
|
|
|
26741
27138
|
for (const [index, loop] of ancestorLoops.entries()) {
|
|
26742
27139
|
const loopId = loop.id;
|
|
26743
27140
|
const iteratorVar = `iterator[${index}]`;
|
|
26744
|
-
for (const { member, field } of
|
|
27141
|
+
for (const { member, field } of ITERATOR_FIELDS2) {
|
|
26745
27142
|
result = result.replace(new RegExp(String.raw`\$?vars\.${loopId}\.${member}\b`, "g"), `${iteratorVar}.${field}`);
|
|
26746
27143
|
}
|
|
26747
27144
|
const loopConfig = loop.data?.inputs;
|
|
@@ -26757,7 +27154,7 @@ function setupCoreLogicLoopConfiguration(node, element, allNodes, nodeDefinition
|
|
|
26757
27154
|
const hasBreakEdges = allNodes.some((n) => n.id === breakFlagTaskId && n.parentId === node.id);
|
|
26758
27155
|
element.loopCharacteristics = setupLoopCharacteristics(node, iteratorIndex, hasBreakEdges);
|
|
26759
27156
|
const nodesInsideLoop = allNodes.filter((n) => n.parentId === node.id || n.data?.parentId === node.id);
|
|
26760
|
-
if (!
|
|
27157
|
+
if (!isDoWhileNodeType2(data.type)) {
|
|
26761
27158
|
const outputSchema = inferLoopOutputSchema(nodesInsideLoop, nodeDefinitions, allNodes);
|
|
26762
27159
|
const itemsSchema = outputSchema.items || { type: "object", properties: {} };
|
|
26763
27160
|
const loopOutputVar = createLoopOutputVariable(node, itemsSchema);
|
|
@@ -26799,6 +27196,95 @@ function setupCoreLogicLoopConfiguration(node, element, allNodes, nodeDefinition
|
|
|
26799
27196
|
}
|
|
26800
27197
|
}
|
|
26801
27198
|
init_esm_shims();
|
|
27199
|
+
function getImplicitErrorStartEventId(handlerNodeId) {
|
|
27200
|
+
return `${implicitNodePrefix}ErrorStartEvent_${handlerNodeId}`;
|
|
27201
|
+
}
|
|
27202
|
+
function getImplicitErrorEndEventId(handlerNodeId) {
|
|
27203
|
+
return `${implicitNodePrefix}ErrorEndEvent_${handlerNodeId}`;
|
|
27204
|
+
}
|
|
27205
|
+
function getErrorHandlerErrorVariable(handlerNodeId) {
|
|
27206
|
+
return `${handlerNodeId}.error`;
|
|
27207
|
+
}
|
|
27208
|
+
function createImplicitErrorStartEvent(handlerNodeId) {
|
|
27209
|
+
const id2 = getImplicitErrorStartEventId(handlerNodeId);
|
|
27210
|
+
const variable = getErrorHandlerErrorVariable(handlerNodeId);
|
|
27211
|
+
return {
|
|
27212
|
+
id: id2,
|
|
27213
|
+
type: "bpmn:StartEvent",
|
|
27214
|
+
position: { x: 0, y: 0 },
|
|
27215
|
+
parentId: handlerNodeId,
|
|
27216
|
+
data: {
|
|
27217
|
+
type: "bpmn:StartEvent",
|
|
27218
|
+
typeVersion: "1.0.0",
|
|
27219
|
+
label: "On error",
|
|
27220
|
+
parameters: {},
|
|
27221
|
+
eventDefinition: { type: "bpmn:ErrorEventDefinition", id: `${id2}_ErrorDefinition` },
|
|
27222
|
+
model: {
|
|
27223
|
+
outputs: [{ name: variable, type: "jsonSchema", source: "=Error", var: variable, internal: true }]
|
|
27224
|
+
}
|
|
27225
|
+
}
|
|
27226
|
+
};
|
|
27227
|
+
}
|
|
27228
|
+
function createImplicitEndEvent(handler) {
|
|
27229
|
+
const outputMappings = getOutputMappings2(ERROR_HANDLER_NODE_TYPE2, handler.data);
|
|
27230
|
+
return {
|
|
27231
|
+
id: getImplicitErrorEndEventId(handler.id),
|
|
27232
|
+
type: "bpmn:EndEvent",
|
|
27233
|
+
position: { x: 0, y: 0 },
|
|
27234
|
+
parentId: handler.id,
|
|
27235
|
+
data: {
|
|
27236
|
+
type: "bpmn:EndEvent",
|
|
27237
|
+
typeVersion: "1.0.0",
|
|
27238
|
+
label: "Error handler end",
|
|
27239
|
+
parameters: {},
|
|
27240
|
+
...outputMappings ? { outputs: structuredClone(outputMappings) } : {}
|
|
27241
|
+
}
|
|
27242
|
+
};
|
|
27243
|
+
}
|
|
27244
|
+
function expandErrorHandlers(allNodes, allEdges) {
|
|
27245
|
+
const handlers = allNodes.filter((node) => isErrorHandlerNodeType2(node.type));
|
|
27246
|
+
for (const handler of handlers) {
|
|
27247
|
+
handler.type = "bpmn:SubProcess";
|
|
27248
|
+
handler.data = { ...handler.data, triggeredByEvent: true };
|
|
27249
|
+
const children = allNodes.filter((node) => (node.data?.parentId ?? node.parentId) === handler.id);
|
|
27250
|
+
for (const child of children) {
|
|
27251
|
+
child.parentId = handler.id;
|
|
27252
|
+
}
|
|
27253
|
+
const startEvent = createImplicitErrorStartEvent(handler.id);
|
|
27254
|
+
allNodes.push(startEvent);
|
|
27255
|
+
const endEvent = createImplicitEndEvent(handler);
|
|
27256
|
+
const childIds = new Set(children.map((child) => child.id));
|
|
27257
|
+
let hasEntryEdge = false;
|
|
27258
|
+
let hasDoneEdge = false;
|
|
27259
|
+
for (let i2 = allEdges.length - 1;i2 >= 0; i2--) {
|
|
27260
|
+
const edge = allEdges[i2];
|
|
27261
|
+
const fromEntry = edge.source === handler.id && edge.sourceHandle === ERROR_HANDLER_ENTRY_HANDLE2 && childIds.has(edge.target);
|
|
27262
|
+
const toDone = edge.target === handler.id && edge.targetHandle === ERROR_HANDLER_DONE_HANDLE2 && childIds.has(edge.source);
|
|
27263
|
+
if (fromEntry) {
|
|
27264
|
+
allEdges[i2] = { ...edge, source: startEvent.id, sourceHandle: undefined, type: "bpmn:SequenceFlow" };
|
|
27265
|
+
hasEntryEdge = true;
|
|
27266
|
+
} else if (toDone) {
|
|
27267
|
+
allEdges[i2] = { ...edge, target: endEvent.id, targetHandle: undefined, type: "bpmn:SequenceFlow" };
|
|
27268
|
+
hasDoneEdge = true;
|
|
27269
|
+
} else if (edge.source === handler.id || edge.target === handler.id) {
|
|
27270
|
+
allEdges.splice(i2, 1);
|
|
27271
|
+
}
|
|
27272
|
+
}
|
|
27273
|
+
if (hasDoneEdge || !hasEntryEdge) {
|
|
27274
|
+
allNodes.push(endEvent);
|
|
27275
|
+
}
|
|
27276
|
+
if (!hasEntryEdge) {
|
|
27277
|
+
allEdges.push({
|
|
27278
|
+
id: generateImplicitEdgeId(startEvent.id, endEvent.id),
|
|
27279
|
+
source: startEvent.id,
|
|
27280
|
+
target: endEvent.id,
|
|
27281
|
+
type: "bpmn:SequenceFlow",
|
|
27282
|
+
data: {}
|
|
27283
|
+
});
|
|
27284
|
+
}
|
|
27285
|
+
}
|
|
27286
|
+
}
|
|
27287
|
+
init_esm_shims();
|
|
26802
27288
|
function subflowNodeToNode(wfNode, parentId) {
|
|
26803
27289
|
const wfParentId = wfNode.parentId;
|
|
26804
27290
|
return {
|
|
@@ -26833,30 +27319,6 @@ function subflowEdgeToEdge(wfEdge) {
|
|
|
26833
27319
|
}
|
|
26834
27320
|
init_esm_shims();
|
|
26835
27321
|
init_esm_shims();
|
|
26836
|
-
init_esm_shims();
|
|
26837
|
-
init_esm_shims();
|
|
26838
|
-
var globImport_locales_json = __glob({
|
|
26839
|
-
"../../locales/de.json": () => import("./de-VMMG2MN7-2ecwpg1b.js"),
|
|
26840
|
-
"../../locales/en.json": () => import("./en-E454CJNK-ytfw06kj.js"),
|
|
26841
|
-
"../../locales/es-MX.json": () => import("./es-MX-ZP2LJ3V7-k4brnfa9.js"),
|
|
26842
|
-
"../../locales/es.json": () => import("./es-WY6FZ3HO-zksnn6dp.js"),
|
|
26843
|
-
"../../locales/fr.json": () => import("./fr-PRMYCRDC-0bk078by.js"),
|
|
26844
|
-
"../../locales/ja.json": () => import("./ja-HFEQKCZF-hb2f25p8.js"),
|
|
26845
|
-
"../../locales/ko.json": () => import("./ko-B4SEC7QX-thq2wt6a.js"),
|
|
26846
|
-
"../../locales/pt-BR.json": () => import("./pt-BR-6VFBW5QT-hsck9gjj.js"),
|
|
26847
|
-
"../../locales/pt.json": () => import("./pt-WOTPKWPZ-1rxcy8hs.js"),
|
|
26848
|
-
"../../locales/ro.json": () => import("./ro-PB44YXML-zmhhwp5h.js"),
|
|
26849
|
-
"../../locales/ru.json": () => import("./ru-T73OPRTC-4knxw497.js"),
|
|
26850
|
-
"../../locales/tr.json": () => import("./tr-SEC6RGZ4-0ttavjya.js"),
|
|
26851
|
-
"../../locales/zh-CN.json": () => import("./zh-CN-MX7VIOF2-xznrtchf.js"),
|
|
26852
|
-
"../../locales/zh-TW.json": () => import("./zh-TW-5SJ3GZT2-bsg054mw.js")
|
|
26853
|
-
});
|
|
26854
|
-
var SERVICES_NAMESPACE = "services";
|
|
26855
|
-
var registerServicesI18n = createI18nRegistrar({
|
|
26856
|
-
namespace: SERVICES_NAMESPACE,
|
|
26857
|
-
englishBundle: en_default,
|
|
26858
|
-
loadCatalog: (lng) => globImport_locales_json(`../../locales/${lng}.json`)
|
|
26859
|
-
});
|
|
26860
27322
|
var t = instance.getFixedT(null, SERVICES_NAMESPACE);
|
|
26861
27323
|
var TRANSFORMATION_OPTIONS = [
|
|
26862
27324
|
{
|
|
@@ -26899,25 +27361,63 @@ function getTransformationsForType(type) {
|
|
|
26899
27361
|
return TRANSFORMATION_OPTIONS.map((o2) => o2.value);
|
|
26900
27362
|
}
|
|
26901
27363
|
var CONDITION_LABELS = {
|
|
26902
|
-
equals
|
|
26903
|
-
|
|
26904
|
-
|
|
26905
|
-
|
|
26906
|
-
|
|
26907
|
-
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
26920
|
-
|
|
27364
|
+
get equals() {
|
|
27365
|
+
return t("dataTransform_condition_equals_label", { defaultValue: "Equals" });
|
|
27366
|
+
},
|
|
27367
|
+
get not_equals() {
|
|
27368
|
+
return t("dataTransform_condition_notEquals_label", { defaultValue: "Not equals" });
|
|
27369
|
+
},
|
|
27370
|
+
get greater_than() {
|
|
27371
|
+
return t("dataTransform_condition_greaterThan_label", { defaultValue: "Greater than" });
|
|
27372
|
+
},
|
|
27373
|
+
get less_than() {
|
|
27374
|
+
return t("dataTransform_condition_lessThan_label", { defaultValue: "Less than" });
|
|
27375
|
+
},
|
|
27376
|
+
get greater_equal() {
|
|
27377
|
+
return t("dataTransform_condition_greaterEqual_label", { defaultValue: "Greater or equal" });
|
|
27378
|
+
},
|
|
27379
|
+
get less_equal() {
|
|
27380
|
+
return t("dataTransform_condition_lessEqual_label", { defaultValue: "Less or equal" });
|
|
27381
|
+
},
|
|
27382
|
+
get contains() {
|
|
27383
|
+
return t("dataTransform_condition_contains_label", { defaultValue: "Contains" });
|
|
27384
|
+
},
|
|
27385
|
+
get not_contains() {
|
|
27386
|
+
return t("dataTransform_condition_notContains_label", { defaultValue: "Does not contain" });
|
|
27387
|
+
},
|
|
27388
|
+
get starts_with() {
|
|
27389
|
+
return t("dataTransform_condition_startsWith_label", { defaultValue: "Starts with" });
|
|
27390
|
+
},
|
|
27391
|
+
get not_starts_with() {
|
|
27392
|
+
return t("dataTransform_condition_notStartsWith_label", { defaultValue: "Does not start with" });
|
|
27393
|
+
},
|
|
27394
|
+
get ends_with() {
|
|
27395
|
+
return t("dataTransform_condition_endsWith_label", { defaultValue: "Ends with" });
|
|
27396
|
+
},
|
|
27397
|
+
get not_ends_with() {
|
|
27398
|
+
return t("dataTransform_condition_notEndsWith_label", { defaultValue: "Does not end with" });
|
|
27399
|
+
},
|
|
27400
|
+
get matches_regex() {
|
|
27401
|
+
return t("dataTransform_condition_matchesRegex_label", { defaultValue: "Matches regex" });
|
|
27402
|
+
},
|
|
27403
|
+
get in() {
|
|
27404
|
+
return t("dataTransform_condition_in_label", { defaultValue: "In (comma-separated)" });
|
|
27405
|
+
},
|
|
27406
|
+
get not_in() {
|
|
27407
|
+
return t("dataTransform_condition_notIn_label", { defaultValue: "Not in (comma-separated)" });
|
|
27408
|
+
},
|
|
27409
|
+
get is_null() {
|
|
27410
|
+
return t("dataTransform_condition_isNull_label", { defaultValue: "Is null" });
|
|
27411
|
+
},
|
|
27412
|
+
get is_not_null() {
|
|
27413
|
+
return t("dataTransform_condition_isNotNull_label", { defaultValue: "Is not null" });
|
|
27414
|
+
},
|
|
27415
|
+
get is_empty() {
|
|
27416
|
+
return t("dataTransform_condition_isEmpty_label", { defaultValue: "Is empty" });
|
|
27417
|
+
},
|
|
27418
|
+
get is_not_empty() {
|
|
27419
|
+
return t("dataTransform_condition_isNotEmpty_label", { defaultValue: "Is not empty" });
|
|
27420
|
+
}
|
|
26921
27421
|
};
|
|
26922
27422
|
var CONDITIONS_BY_TYPE = {
|
|
26923
27423
|
string: [
|
|
@@ -26983,8 +27483,8 @@ function escapeStringForCode(str) {
|
|
|
26983
27483
|
}
|
|
26984
27484
|
function buildCollectionAccessor(collectionPath) {
|
|
26985
27485
|
const clean = stripVarsPrefix(collectionPath);
|
|
26986
|
-
const
|
|
26987
|
-
const chain =
|
|
27486
|
+
const parsed = splitPathSegments2(clean);
|
|
27487
|
+
const chain = parsed ? parsed.map((s2) => s2.index === undefined ? `?.["${escapeStringForCode(s2.key)}"]` : `?.[${s2.index}]`).join("") : clean.split(".").map((s2) => `?.["${escapeStringForCode(s2)}"]`).join("");
|
|
26988
27488
|
return `(${VARS_IDENTIFIER}${chain} ?? [])`;
|
|
26989
27489
|
}
|
|
26990
27490
|
function buildMapBody(mappingsJson, keepOriginalFields) {
|
|
@@ -27362,13 +27862,13 @@ function generateDataTransformScript(operations, collection) {
|
|
|
27362
27862
|
const collectionExpr = collectionPath ? buildCollectionAccessor(collectionPath) : "[]";
|
|
27363
27863
|
const scripts = (operations || []).map((op2) => getOperationScript(op2)).filter((s2) => !!s2 && s2.trim().length > 0);
|
|
27364
27864
|
if (scripts.length === 0) {
|
|
27365
|
-
return `return (($collection, $vars, $metadata) => $collection)(${collectionExpr}, ${VARS_IDENTIFIER}, ${
|
|
27865
|
+
return `return (($collection, $vars, $metadata) => $collection)(${collectionExpr}, ${VARS_IDENTIFIER}, ${METADATA_IDENTIFIER2})`;
|
|
27366
27866
|
}
|
|
27367
27867
|
if (scripts.length === 1) {
|
|
27368
27868
|
return `return (($collection, $vars, $metadata) => {
|
|
27369
27869
|
const operation = ${scripts[0]};
|
|
27370
27870
|
return operation($collection, $vars, $metadata);
|
|
27371
|
-
})(${collectionExpr}, ${VARS_IDENTIFIER}, ${
|
|
27871
|
+
})(${collectionExpr}, ${VARS_IDENTIFIER}, ${METADATA_IDENTIFIER2})`;
|
|
27372
27872
|
}
|
|
27373
27873
|
const operationCalls = scripts.map((script, index) => {
|
|
27374
27874
|
return ` const op${index} = ${script};
|
|
@@ -27378,7 +27878,7 @@ function generateDataTransformScript(operations, collection) {
|
|
|
27378
27878
|
return `return (($collection, $vars, $metadata) => {
|
|
27379
27879
|
${operationCalls}
|
|
27380
27880
|
return $collection;
|
|
27381
|
-
})(${collectionExpr}, ${VARS_IDENTIFIER}, ${
|
|
27881
|
+
})(${collectionExpr}, ${VARS_IDENTIFIER}, ${METADATA_IDENTIFIER2})`;
|
|
27382
27882
|
}
|
|
27383
27883
|
init_esm_shims();
|
|
27384
27884
|
var t2 = instance.getFixedT(null, SERVICES_NAMESPACE);
|
|
@@ -27546,6 +28046,196 @@ function safeEval(expr) {
|
|
|
27546
28046
|
}
|
|
27547
28047
|
}
|
|
27548
28048
|
init_esm_shims();
|
|
28049
|
+
var TIMEOUT_ERROR_ID = "Error_Timeout";
|
|
28050
|
+
var TIMEOUT_ERROR_END_FLAG = "timeoutErrorEnd";
|
|
28051
|
+
function timeoutBoundaryEventId(nodeId) {
|
|
28052
|
+
return `BoundaryEvent_${nodeId}_Timeout`;
|
|
28053
|
+
}
|
|
28054
|
+
function getNodeTimeLimit(node) {
|
|
28055
|
+
const duration3 = resolveTimeLimitDuration2(node.data?.inputs);
|
|
28056
|
+
return duration3 === undefined || typeof duration3 === "string" ? duration3 : `${JS_EXPRESSION_PREFIX2}${duration3.expression}`;
|
|
28057
|
+
}
|
|
28058
|
+
function synthesizeTimeLimitFallbacks(allNodes, allEdges) {
|
|
28059
|
+
const nodeIds = new Set(allNodes.map((n) => n.id));
|
|
28060
|
+
const timedNodes = new Map(allNodes.map((n) => [n.id, getNodeTimeLimit(n)]).filter(([, d2]) => d2 !== undefined));
|
|
28061
|
+
for (let i2 = allEdges.length - 1;i2 >= 0; i2--) {
|
|
28062
|
+
const edge = allEdges[i2];
|
|
28063
|
+
if (edge.sourceHandle !== TIMEOUT_HANDLE_ID)
|
|
28064
|
+
continue;
|
|
28065
|
+
if (!timedNodes.has(edge.source) || !nodeIds.has(edge.target))
|
|
28066
|
+
allEdges.splice(i2, 1);
|
|
28067
|
+
}
|
|
28068
|
+
const wired = new Set(allEdges.filter((e3) => e3.sourceHandle === TIMEOUT_HANDLE_ID).map((e3) => e3.source));
|
|
28069
|
+
let addedErrorEnd = false;
|
|
28070
|
+
const newNodes = [];
|
|
28071
|
+
const newEdges = [];
|
|
28072
|
+
for (const node of allNodes) {
|
|
28073
|
+
if (!timedNodes.has(node.id) || wired.has(node.id))
|
|
28074
|
+
continue;
|
|
28075
|
+
const errorEdge = allEdges.find((e3) => e3.source === node.id && e3.sourceHandle === ERROR_HANDLE_ID && nodeIds.has(e3.target));
|
|
28076
|
+
if (errorEdge) {
|
|
28077
|
+
newEdges.push({
|
|
28078
|
+
id: `${implicitNodePrefix}Edge_${node.id}_${TIMEOUT_HANDLE_ID}_${errorEdge.target}`,
|
|
28079
|
+
source: node.id,
|
|
28080
|
+
sourceHandle: TIMEOUT_HANDLE_ID,
|
|
28081
|
+
target: errorEdge.target,
|
|
28082
|
+
targetHandle: errorEdge.targetHandle,
|
|
28083
|
+
type: "bpmn:SequenceFlow",
|
|
28084
|
+
data: {}
|
|
28085
|
+
});
|
|
28086
|
+
continue;
|
|
28087
|
+
}
|
|
28088
|
+
const endId = `${implicitNodePrefix}TimeoutEnd_${node.id}`;
|
|
28089
|
+
newNodes.push({
|
|
28090
|
+
id: endId,
|
|
28091
|
+
type: "bpmn:EndEvent",
|
|
28092
|
+
position: { x: 0, y: 0 },
|
|
28093
|
+
parentId: node.parentId,
|
|
28094
|
+
data: { type: "bpmn:EndEvent", typeVersion: "1.0.0", label: "", parameters: {}, [TIMEOUT_ERROR_END_FLAG]: true }
|
|
28095
|
+
});
|
|
28096
|
+
newEdges.push({
|
|
28097
|
+
id: `${implicitNodePrefix}Edge_${node.id}_${TIMEOUT_HANDLE_ID}_${endId}`,
|
|
28098
|
+
source: node.id,
|
|
28099
|
+
sourceHandle: TIMEOUT_HANDLE_ID,
|
|
28100
|
+
target: endId,
|
|
28101
|
+
targetHandle: "input",
|
|
28102
|
+
type: "bpmn:SequenceFlow",
|
|
28103
|
+
data: {}
|
|
28104
|
+
});
|
|
28105
|
+
addedErrorEnd = true;
|
|
28106
|
+
}
|
|
28107
|
+
allNodes.push(...newNodes);
|
|
28108
|
+
allEdges.push(...newEdges);
|
|
28109
|
+
return addedErrorEnd;
|
|
28110
|
+
}
|
|
28111
|
+
function createTimeoutError() {
|
|
28112
|
+
return createError(TIMEOUT_ERROR_ID, "Timeout", TIMEOUT_ERROR_CODE);
|
|
28113
|
+
}
|
|
28114
|
+
function timeoutErrorPayloadSource(nodeLabel, duration3) {
|
|
28115
|
+
const payload = {
|
|
28116
|
+
code: TIMEOUT_ERROR_CODE,
|
|
28117
|
+
message: `${nodeLabel} did not finish within the time limit`,
|
|
28118
|
+
duration: duration3
|
|
28119
|
+
};
|
|
28120
|
+
return `${JS_EXPRESSION_PREFIX2}(${JSON.stringify(payload)})`;
|
|
28121
|
+
}
|
|
28122
|
+
init_esm_shims();
|
|
28123
|
+
function toBpmnDuration(duration3, fallback) {
|
|
28124
|
+
return duration3 !== undefined && isIsoDuration2(duration3) ? duration3 : fallback;
|
|
28125
|
+
}
|
|
28126
|
+
function getNodeRetry(node) {
|
|
28127
|
+
const retry = resolveRetry2(node.data?.inputs);
|
|
28128
|
+
if (!retry)
|
|
28129
|
+
return;
|
|
28130
|
+
return {
|
|
28131
|
+
maxRetryCount: String(retry.maxCount),
|
|
28132
|
+
retryBackoff: toBpmnDuration(retry.initialDelay, RETRY_DEFAULTS2.initialDelay),
|
|
28133
|
+
retryAllErrors: "true",
|
|
28134
|
+
retryBackoffType: retry.backoffType,
|
|
28135
|
+
...retryBackoffHasMaxDuration2(retry.backoffType) ? { maxDuration: toBpmnDuration(retry.maxDuration, RETRY_DEFAULTS2.maxDuration) } : {},
|
|
28136
|
+
...retry.exponentialBase !== undefined ? { exponentialBase: String(retry.exponentialBase) } : {}
|
|
28137
|
+
};
|
|
28138
|
+
}
|
|
28139
|
+
init_esm_shims();
|
|
28140
|
+
function expressionBody(value) {
|
|
28141
|
+
if (isExpressionValue2(value)) {
|
|
28142
|
+
if (value.type === "jsExpression")
|
|
28143
|
+
return normalizeJsExpressionBody(value.expression);
|
|
28144
|
+
value = value.expression;
|
|
28145
|
+
}
|
|
28146
|
+
if (typeof value !== "string")
|
|
28147
|
+
return;
|
|
28148
|
+
return soleInterpolation(value.trim());
|
|
28149
|
+
}
|
|
28150
|
+
function thresholdFraction(value, nodeId) {
|
|
28151
|
+
const expr = expressionBody(value);
|
|
28152
|
+
if (expr !== undefined) {
|
|
28153
|
+
const lowered = transformExpression(`=js:${expr}`, nodeId).slice("=js:".length);
|
|
28154
|
+
return `(Math.min(100, Math.max(0, Number(${lowered}))) / 100)`;
|
|
28155
|
+
}
|
|
28156
|
+
const raw = isExpressionValue2(value) ? value.expression : value;
|
|
28157
|
+
const text = typeof raw === "string" ? raw.trim() : "";
|
|
28158
|
+
const n = typeof raw === "number" ? raw : Number(text || Number.NaN);
|
|
28159
|
+
return String(clampPercent(n) / 100);
|
|
28160
|
+
}
|
|
28161
|
+
function clampPercent(n) {
|
|
28162
|
+
if (!Number.isFinite(n))
|
|
28163
|
+
return AGENTIC_SWITCH_DEFAULT_THRESHOLD;
|
|
28164
|
+
return Math.min(100, Math.max(0, n));
|
|
28165
|
+
}
|
|
28166
|
+
function literalText(value, field) {
|
|
28167
|
+
const raw = isExpressionValue2(value) ? value.expression : value;
|
|
28168
|
+
if (raw == null)
|
|
28169
|
+
return "";
|
|
28170
|
+
if (typeof raw === "string")
|
|
28171
|
+
return raw;
|
|
28172
|
+
if (typeof raw === "number" || typeof raw === "boolean")
|
|
28173
|
+
return String(raw);
|
|
28174
|
+
throw new Error(`[agentic-switch] ${field} must be text, got ${JSON.stringify(raw)}`);
|
|
28175
|
+
}
|
|
28176
|
+
function leaf(value, nodeId, field) {
|
|
28177
|
+
const text = literalText(value, `${nodeId}.${field}`);
|
|
28178
|
+
return isExpressionValue2(value) ? String(serializeExpressionValue(value, nodeId)) : transformExpression(text, nodeId);
|
|
28179
|
+
}
|
|
28180
|
+
function bearerHeader(value, nodeId) {
|
|
28181
|
+
const expr = expressionBody(value);
|
|
28182
|
+
if (expr !== undefined)
|
|
28183
|
+
return transformExpression(`=js:\`Bearer ${"${"}String(${expr} ?? '').trim()}\``, nodeId);
|
|
28184
|
+
const key = literalText(value, `${nodeId}.apiKey`).trim();
|
|
28185
|
+
return transformExpression(`Bearer ${key}`, nodeId);
|
|
28186
|
+
}
|
|
28187
|
+
function assetResolution(apiKey) {
|
|
28188
|
+
const expr = expressionBody(apiKey)?.trim();
|
|
28189
|
+
const assetRef = expr && assetsOnlyReference(expr);
|
|
28190
|
+
return assetRef ? `${assetRef} == null ? "[asset]" : "[asset]"` : "[asset]";
|
|
28191
|
+
}
|
|
28192
|
+
function criterionKeys(criteria, nodeId) {
|
|
28193
|
+
const ids = new Set(criteria.map((c2) => c2.id));
|
|
28194
|
+
if (ids.size !== criteria.length || [...ids].some((id2) => typeof id2 !== "string" || !id2)) {
|
|
28195
|
+
throw new Error(`[agentic-switch] ${nodeId}: every choice needs a unique, non-empty id`);
|
|
28196
|
+
}
|
|
28197
|
+
const taken = /* @__PURE__ */ new Set;
|
|
28198
|
+
const keys = /* @__PURE__ */ new Map;
|
|
28199
|
+
for (const c2 of criteria) {
|
|
28200
|
+
const label = literalText(c2.label, `${nodeId}.criteria.label`).trim();
|
|
28201
|
+
const usable = label && !taken.has(label) && !ids.has(label);
|
|
28202
|
+
const key = usable ? label : c2.id;
|
|
28203
|
+
taken.add(key);
|
|
28204
|
+
keys.set(c2.id, key);
|
|
28205
|
+
}
|
|
28206
|
+
return keys;
|
|
28207
|
+
}
|
|
28208
|
+
function prepareAgenticSwitchNode(node) {
|
|
28209
|
+
const inputs = node.data?.inputs;
|
|
28210
|
+
if (!inputs)
|
|
28211
|
+
return;
|
|
28212
|
+
const criteria = Array.isArray(inputs.criteria) ? inputs.criteria : [];
|
|
28213
|
+
const keys = criterionKeys(criteria, node.id);
|
|
28214
|
+
const threshold = thresholdFraction(inputs.confidenceThreshold, node.id);
|
|
28215
|
+
const answer = `vars.${node.id}?.output`;
|
|
28216
|
+
inputs._headers = {
|
|
28217
|
+
Authorization: bearerHeader(inputs.apiKey, node.id),
|
|
28218
|
+
"Content-Type": "application/json"
|
|
28219
|
+
};
|
|
28220
|
+
inputs._assetResolution = assetResolution(inputs.apiKey);
|
|
28221
|
+
inputs._requestBody = {
|
|
28222
|
+
state: leaf(inputs.state, node.id, "state"),
|
|
28223
|
+
model: AGENTIC_SWITCH_DEFAULT_MODEL,
|
|
28224
|
+
questions: {
|
|
28225
|
+
[AGENTIC_SWITCH_QUESTION_ID]: {
|
|
28226
|
+
type: "choice",
|
|
28227
|
+
instructions: leaf(inputs.instructions, node.id, "instructions"),
|
|
28228
|
+
criteria: Object.fromEntries(criteria.map((c2) => [keys.get(c2.id), leaf(c2.expression, node.id, "criteria.expression")]))
|
|
28229
|
+
}
|
|
28230
|
+
}
|
|
28231
|
+
};
|
|
28232
|
+
inputs.branches = criteria.map((c2) => ({
|
|
28233
|
+
id: c2.id,
|
|
28234
|
+
name: literalText(c2.label, `${node.id}.criteria.label`).trim() || c2.id,
|
|
28235
|
+
conditionExpression: `=js:${answer}?.choice === ${JSON.stringify(keys.get(c2.id))} && typeof ${answer}?.confidence === 'number' && ${answer}.confidence >= ${threshold}`
|
|
28236
|
+
}));
|
|
28237
|
+
}
|
|
28238
|
+
init_esm_shims();
|
|
27549
28239
|
var STRUCTURAL_MODEL_KEYS = /* @__PURE__ */ new Set([
|
|
27550
28240
|
"type",
|
|
27551
28241
|
"debug",
|
|
@@ -27574,28 +28264,26 @@ function normalizeConditionExpression(expr) {
|
|
|
27574
28264
|
return expr;
|
|
27575
28265
|
return expr.type === "jsExpression" ? `=js:${expr.expression}` : expr.expression;
|
|
27576
28266
|
}
|
|
28267
|
+
function assertSerializedGatewayConditions(nodeType, inputs) {
|
|
28268
|
+
for (const { expression } of getGatewayConditionSources2(nodeType, inputs)) {
|
|
28269
|
+
if (expression != null && typeof expression !== "string") {
|
|
28270
|
+
throw new Error(`[bpmn-to-xml] Expected serialized string but got ${typeof expression === "object" ? JSON.stringify(expression) : String(expression)} — an upstream pass (transformNodeExpressions / transformVariableUpdatesToOutputs) failed to convert an ExpressionValue to its BPMN form.`);
|
|
28271
|
+
}
|
|
28272
|
+
}
|
|
28273
|
+
}
|
|
27577
28274
|
function ensureLeadingEquals(s2) {
|
|
27578
28275
|
return s2.startsWith("=") ? s2 : `=${s2}`;
|
|
27579
28276
|
}
|
|
27580
|
-
|
|
27581
|
-
|
|
27582
|
-
return;
|
|
27583
|
-
if (typeof expr !== "string") {
|
|
27584
|
-
throw new Error(`[bpmn-to-xml] Expected serialized string but got ${typeof expr === "object" ? JSON.stringify(expr) : String(expr)} — an upstream pass (transformNodeExpressions / transformVariableUpdatesToOutputs) failed to convert an ExpressionValue to its BPMN form.`);
|
|
27585
|
-
}
|
|
27586
|
-
if (expr.startsWith("=js:")) {
|
|
27587
|
-
return expr.slice(4);
|
|
27588
|
-
}
|
|
27589
|
-
return expr;
|
|
27590
|
-
}
|
|
28277
|
+
var CONTEXT_BINDING_PLACEHOLDER_RE = /^<bindings\..+>$/;
|
|
28278
|
+
var TIMER_BOUNDARY_SIZE = 36;
|
|
27591
28279
|
var implicitNodePrefix2 = "_Implicit_";
|
|
27592
28280
|
function normalizeUrl(url2) {
|
|
27593
|
-
if (!url2 || url2.includes("$vars"))
|
|
28281
|
+
if (!url2 || url2.includes("$vars") || url2.includes("$assets"))
|
|
27594
28282
|
return url2;
|
|
27595
28283
|
if (/^https?:\/\//i.test(url2))
|
|
27596
28284
|
return url2;
|
|
27597
|
-
const
|
|
27598
|
-
return
|
|
28285
|
+
const prefix = /^localhost(:|\/|$)/i.test(url2) ? "http://" : "https://";
|
|
28286
|
+
return prefix + url2;
|
|
27599
28287
|
}
|
|
27600
28288
|
var isDataTransform = (type) => {
|
|
27601
28289
|
return type ? DATA_TRANSFORM_NODE_TYPES.includes(type) : false;
|
|
@@ -27634,18 +28322,19 @@ function serializeDefaultValue(value) {
|
|
|
27634
28322
|
return JSON.stringify(value);
|
|
27635
28323
|
return String(value);
|
|
27636
28324
|
}
|
|
27637
|
-
function buildNodeOutputMappings(node, workflowVariables) {
|
|
28325
|
+
function buildNodeOutputMappings(node, workflowVariables, rootScopedContainerIds) {
|
|
27638
28326
|
const data = node.data;
|
|
27639
28327
|
const outputs = data.outputs;
|
|
27640
28328
|
if (!outputs)
|
|
27641
28329
|
return [];
|
|
27642
28330
|
const outGlobals = workflowVariables?.globals;
|
|
27643
|
-
const
|
|
28331
|
+
const parentId = node.parentId ?? data.parentId;
|
|
28332
|
+
const isNested = !!parentId && !rootScopedContainerIds?.has(parentId);
|
|
27644
28333
|
const mappings = [];
|
|
27645
28334
|
for (const [varId, outputDef] of Object.entries(outputs)) {
|
|
27646
28335
|
const rawSource = outputDef?.source;
|
|
27647
|
-
const serialized =
|
|
27648
|
-
if (typeof serialized !== "string" || serialized === "" || serialized ===
|
|
28336
|
+
const serialized = isExpressionValue2(rawSource) ? serializeExpressionValue(rawSource, "") : typeof rawSource === "string" && rawSource.trim() ? transformExpression(rawSource, "") : undefined;
|
|
28337
|
+
if (typeof serialized !== "string" || serialized === "" || serialized === JS_EXPRESSION_PREFIX2)
|
|
27649
28338
|
continue;
|
|
27650
28339
|
const wfVar = (outGlobals ?? []).find((g2) => g2.id === varId && g2.direction === "out");
|
|
27651
28340
|
if (!isNested && outGlobals && outGlobals.length > 0 && !wfVar)
|
|
@@ -27677,7 +28366,7 @@ function getAncestorLoopInfoForCanvasNode(nodeId, allNodes) {
|
|
|
27677
28366
|
const parent = byId.get(parentId);
|
|
27678
28367
|
if (!parent)
|
|
27679
28368
|
break;
|
|
27680
|
-
if (
|
|
28369
|
+
if (isCollectionLoopNodeType2(parent.data?.type)) {
|
|
27681
28370
|
const inputs = parent.data?.inputs;
|
|
27682
28371
|
ancestors.unshift({ id: parent.id, collectionExpr: getLoopCollectionReferenceExpression(inputs?.collection) });
|
|
27683
28372
|
}
|
|
@@ -27729,9 +28418,9 @@ function collectVariablesFromNodes(nodes, definitions, workflowVariables) {
|
|
|
27729
28418
|
inputs: xyNode.data.inputs,
|
|
27730
28419
|
outputs: xyNode.data.outputs
|
|
27731
28420
|
};
|
|
27732
|
-
if (!
|
|
28421
|
+
if (!isStartEventNode2(node))
|
|
27733
28422
|
continue;
|
|
27734
|
-
const group =
|
|
28423
|
+
const group = getEffectiveTriggerInputs2(node, definitions, workflowVariables.globals ?? []);
|
|
27735
28424
|
if (group.length > 0)
|
|
27736
28425
|
triggerInputGroups.set(node.id, group);
|
|
27737
28426
|
}
|
|
@@ -27787,19 +28476,22 @@ function collectVariablesFromNodes(nodes, definitions, workflowVariables) {
|
|
|
27787
28476
|
const node = nodesById.get(nodeVariable.binding.nodeId);
|
|
27788
28477
|
const outputName = nodeVariable.binding.outputId;
|
|
27789
28478
|
const def = node?.type ? definitionsByType.get(node.type)?.outputDefinition?.[outputName] : undefined;
|
|
27790
|
-
if (def?.scope === "internal") {
|
|
28479
|
+
if (def?.scope === "internal" && !isErrorHandlerNodeType2(node?.type)) {
|
|
27791
28480
|
continue;
|
|
27792
28481
|
}
|
|
28482
|
+
const errorHandlerErrorSchema = isErrorHandlerNodeType2(node?.type) && outputName === "error" ? def?.schema : undefined;
|
|
28483
|
+
const jsonSchema = def?._jsonSchema ?? errorHandlerErrorSchema;
|
|
27793
28484
|
const variable = {
|
|
27794
28485
|
id: id2,
|
|
27795
28486
|
name: outputName,
|
|
27796
|
-
type:
|
|
28487
|
+
type: jsonSchema ? "jsonSchema" : def?.type ?? nodeVariable.type ?? "jsonSchema",
|
|
27797
28488
|
elementId: nodeVariable.binding.nodeId,
|
|
27798
28489
|
variableType: "inputOutput",
|
|
27799
28490
|
source: def?.source,
|
|
27800
|
-
body:
|
|
28491
|
+
body: jsonSchema ? JSON.stringify(jsonSchema) : undefined
|
|
27801
28492
|
};
|
|
27802
|
-
const
|
|
28493
|
+
const rawParentId = node?.data?.parentId;
|
|
28494
|
+
const nodeParentId = isErrorHandlerNodeType2(nodesById.get(rawParentId)?.type) ? undefined : rawParentId;
|
|
27803
28495
|
if (nodeParentId) {
|
|
27804
28496
|
if (!subprocessVariables.has(nodeParentId)) {
|
|
27805
28497
|
subprocessVariables.set(nodeParentId, []);
|
|
@@ -27832,7 +28524,7 @@ function synthesizeUnconnectedDecisionEnds(allNodes, allEdges) {
|
|
|
27832
28524
|
{ handle: "false", endSuffix: "DecisionFalseEnd" }
|
|
27833
28525
|
];
|
|
27834
28526
|
const nodeIds = new Set(allNodes.map((n) => n.id));
|
|
27835
|
-
const decisionIds = new Set(allNodes.filter((n) => n.type ===
|
|
28527
|
+
const decisionIds = new Set(allNodes.filter((n) => n.type === DECISION_NODE_TYPE2).map((n) => n.id));
|
|
27836
28528
|
for (let i2 = allEdges.length - 1;i2 >= 0; i2--) {
|
|
27837
28529
|
const edge = allEdges[i2];
|
|
27838
28530
|
if ((edge.sourceHandle === "true" || edge.sourceHandle === "false") && decisionIds.has(edge.source) && !nodeIds.has(edge.target)) {
|
|
@@ -27844,7 +28536,7 @@ function synthesizeUnconnectedDecisionEnds(allNodes, allEdges) {
|
|
|
27844
28536
|
for (const { handle, endSuffix } of branches) {
|
|
27845
28537
|
const decisionsWithEdge = new Set(allEdges.filter((e3) => e3.sourceHandle === handle && nodeIds.has(e3.target)).map((e3) => e3.source));
|
|
27846
28538
|
for (const node of allNodes) {
|
|
27847
|
-
if (node.type !==
|
|
28539
|
+
if (node.type !== DECISION_NODE_TYPE2 || decisionsWithEdge.has(node.id))
|
|
27848
28540
|
continue;
|
|
27849
28541
|
const endId = `${implicitNodePrefix2}${endSuffix}_${node.id}`;
|
|
27850
28542
|
newNodes.push({
|
|
@@ -27855,7 +28547,7 @@ function synthesizeUnconnectedDecisionEnds(allNodes, allEdges) {
|
|
|
27855
28547
|
data: { type: "bpmn:EndEvent", typeVersion: "1.0.0", label: "", parameters: {} }
|
|
27856
28548
|
});
|
|
27857
28549
|
newEdges.push({
|
|
27858
|
-
id:
|
|
28550
|
+
id: generateImplicitEdgeId(node.id, endId, handle),
|
|
27859
28551
|
source: node.id,
|
|
27860
28552
|
sourceHandle: handle,
|
|
27861
28553
|
target: endId,
|
|
@@ -27870,18 +28562,63 @@ function synthesizeUnconnectedDecisionEnds(allNodes, allEdges) {
|
|
|
27870
28562
|
}
|
|
27871
28563
|
async function toXml(nodes, edges, manifest, bindings, workflowVariables, subflows, opts) {
|
|
27872
28564
|
try {
|
|
27873
|
-
const
|
|
28565
|
+
const unresolved = [];
|
|
28566
|
+
const flowPlaceholder = opts?.flowJson !== undefined ? createFlowPlaceholder() : undefined;
|
|
28567
|
+
const definitions = buildBpmnDefinition(nodes, edges, manifest, bindings, workflowVariables, subflows, opts, unresolved, flowPlaceholder);
|
|
28568
|
+
if (unresolved.length > 0) {
|
|
28569
|
+
telemetryService.track("serialization.unresolved_bindings", {
|
|
28570
|
+
intent: opts?.intent ?? DEFAULT_PACKAGE_INTENT,
|
|
28571
|
+
placeholders: [...new Set(unresolved.map((u2) => u2.placeholder))].join(","),
|
|
28572
|
+
nodeTypes: [...new Set(unresolved.map((u2) => u2.nodeType ?? "unknown"))].join(",")
|
|
28573
|
+
}, { count: unresolved.length });
|
|
28574
|
+
opts?.onUnresolvedBindings?.(unresolved);
|
|
28575
|
+
if (opts?.intent === "Publish")
|
|
28576
|
+
throw new UnresolvedBindingsError2(unresolved);
|
|
28577
|
+
}
|
|
27874
28578
|
definitions.exporter = "UiPath Flow (https://uipath.com)";
|
|
27875
28579
|
definitions.exporterVersion = "development";
|
|
27876
28580
|
const output2 = await getModdle().toXML(definitions, { format: true });
|
|
27877
|
-
let
|
|
27878
|
-
|
|
27879
|
-
|
|
28581
|
+
let xml = await layoutProcess(output2.xml);
|
|
28582
|
+
xml = fixCData(xml);
|
|
28583
|
+
if (flowPlaceholder !== undefined && opts?.flowJson !== undefined) {
|
|
28584
|
+
const flowElement = `<uipath:flow version="${FLOW_ELEMENT_VERSION}">`;
|
|
28585
|
+
const flowCData = toCData(minifyJson(opts.flowJson));
|
|
28586
|
+
xml = xml.replace(`${flowElement}${flowPlaceholder}</uipath:flow>`, () => `${flowElement}${flowCData}</uipath:flow>`);
|
|
28587
|
+
}
|
|
28588
|
+
return xml;
|
|
27880
28589
|
} catch (error51) {
|
|
28590
|
+
if (error51 instanceof UnresolvedBindingsError2 || error51 instanceof AgentAssetInputError || error51 instanceof AgentInputNameCollisionError2)
|
|
28591
|
+
throw error51;
|
|
27881
28592
|
console.error("Error in toXml:", error51);
|
|
27882
28593
|
throw error51;
|
|
27883
28594
|
}
|
|
27884
28595
|
}
|
|
28596
|
+
function minifyJson(json2) {
|
|
28597
|
+
try {
|
|
28598
|
+
JSON.parse(json2);
|
|
28599
|
+
} catch {
|
|
28600
|
+
return json2;
|
|
28601
|
+
}
|
|
28602
|
+
let out = "";
|
|
28603
|
+
let inString = false;
|
|
28604
|
+
for (let i2 = 0;i2 < json2.length; i2++) {
|
|
28605
|
+
const ch = json2[i2];
|
|
28606
|
+
if (inString) {
|
|
28607
|
+
out += ch;
|
|
28608
|
+
if (ch === "\\")
|
|
28609
|
+
out += json2[++i2];
|
|
28610
|
+
else if (ch === '"')
|
|
28611
|
+
inString = false;
|
|
28612
|
+
} else if (ch === '"') {
|
|
28613
|
+
inString = true;
|
|
28614
|
+
out += ch;
|
|
28615
|
+
} else if (ch !== " " && ch !== "\t" && ch !== `
|
|
28616
|
+
` && ch !== "\r") {
|
|
28617
|
+
out += ch;
|
|
28618
|
+
}
|
|
28619
|
+
}
|
|
28620
|
+
return out;
|
|
28621
|
+
}
|
|
27885
28622
|
function buildBaseElements() {
|
|
27886
28623
|
const definitions = templateXmlService.get("bpmn:Definitions");
|
|
27887
28624
|
const diagram = {
|
|
@@ -27896,7 +28633,7 @@ function buildBaseElements() {
|
|
|
27896
28633
|
definitions.diagrams = [diagram];
|
|
27897
28634
|
return definitions;
|
|
27898
28635
|
}
|
|
27899
|
-
function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVariables, subflows, opts) {
|
|
28636
|
+
function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVariables, subflows, opts, unresolvedOut, flowPlaceholder) {
|
|
27900
28637
|
const definitions = buildBaseElements();
|
|
27901
28638
|
const { processVariables, subprocessVariables, triggerInputMappings } = collectVariablesFromNodes(nodes, nodeDefinitions, workflowVariables || { globals: [], nodes: [] });
|
|
27902
28639
|
const root = {
|
|
@@ -27906,28 +28643,32 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
27906
28643
|
label: "Flow Process",
|
|
27907
28644
|
model: {
|
|
27908
28645
|
bindings,
|
|
27909
|
-
variables: processVariables
|
|
28646
|
+
variables: processVariables,
|
|
28647
|
+
flowPlaceholder
|
|
27910
28648
|
}
|
|
27911
28649
|
}
|
|
27912
28650
|
};
|
|
27913
28651
|
const processedAgents = /* @__PURE__ */ new Set;
|
|
27914
28652
|
preDeriveAgentInputDefinitions(nodes, edges, {
|
|
27915
|
-
resolveSourceType:
|
|
28653
|
+
resolveSourceType: buildAgentInputTypeResolver2(workflowVariables, { bindings }),
|
|
27916
28654
|
pruneUnreferenced: true,
|
|
27917
28655
|
processedAgentIds: processedAgents,
|
|
27918
28656
|
getAncestorLoops: (agentId) => getAncestorLoopInfoForCanvasNode(agentId, nodes),
|
|
27919
|
-
encoding: opts?.encoding
|
|
28657
|
+
encoding: opts?.encoding,
|
|
28658
|
+
rejectEmbeddedAssets: true
|
|
27920
28659
|
});
|
|
27921
28660
|
const { allNodes, allEdges, processLevelVariables, variableUpdates, scopedVariables } = expandFlowElementsToBpmn(nodes, edges, nodeDefinitions, subflows, workflowVariables?.variableUpdates);
|
|
27922
28661
|
workflowVariables = { ...workflowVariables, variableUpdates };
|
|
27923
28662
|
preDeriveAgentInputDefinitions(allNodes, allEdges, {
|
|
27924
|
-
resolveSourceType:
|
|
28663
|
+
resolveSourceType: buildAgentInputTypeResolver2(workflowVariables, { scopedVariables, bindings }),
|
|
27925
28664
|
pruneUnreferenced: true,
|
|
27926
28665
|
processedAgentIds: processedAgents,
|
|
27927
28666
|
getAncestorLoops: (agentId) => getAncestorLoopInfoForCanvasNode(agentId, allNodes),
|
|
27928
|
-
encoding: opts?.encoding
|
|
28667
|
+
encoding: opts?.encoding,
|
|
28668
|
+
rejectEmbeddedAssets: true
|
|
27929
28669
|
});
|
|
27930
28670
|
synthesizeUnconnectedDecisionEnds(allNodes, allEdges);
|
|
28671
|
+
const timeoutError = synthesizeTimeLimitFallbacks(allNodes, allEdges) ? createTimeoutError() : undefined;
|
|
27931
28672
|
for (const node of allNodes) {
|
|
27932
28673
|
transformNodeExpressions(node);
|
|
27933
28674
|
}
|
|
@@ -27940,21 +28681,9 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
27940
28681
|
processVariables.inputOutputs = [];
|
|
27941
28682
|
processVariables.inputOutputs.push(...hoistedVars);
|
|
27942
28683
|
}
|
|
27943
|
-
const { scriptTaskRefs: nodeVdoRefs } = applyVdoRewriting(allNodes, allEdges, vdoConfigs, isScriptTask, (node) => isDataTransform(node.type) ||
|
|
27944
|
-
const
|
|
27945
|
-
|
|
27946
|
-
const inputs = node.data?.inputs;
|
|
27947
|
-
if (typeof inputs?.expression === "string" && !inputs.expression.startsWith("=")) {
|
|
27948
|
-
inputs.expression = rewrite(inputs.expression);
|
|
27949
|
-
}
|
|
27950
|
-
} else if (isType(SWITCH_NODE_TYPE)) {
|
|
27951
|
-
const inputs = node.data?.inputs;
|
|
27952
|
-
for (const switchCase of inputs?.cases ?? []) {
|
|
27953
|
-
if (typeof switchCase.expression === "string" && !switchCase.expression.startsWith("=")) {
|
|
27954
|
-
switchCase.expression = rewrite(switchCase.expression);
|
|
27955
|
-
}
|
|
27956
|
-
}
|
|
27957
|
-
}
|
|
28684
|
+
const { scriptTaskRefs: nodeVdoRefs } = applyVdoRewriting(allNodes, allEdges, vdoConfigs, isScriptTask, (node) => isDataTransform(node.type) || isLoopNodeType2(node.data?.type) || isTriggerNodeType2(node.data?.type), (node, rewrite) => {
|
|
28685
|
+
const gatewayType = isGatewayNodeType2(node.type) ? node.type : node.data?.type;
|
|
28686
|
+
rewriteGatewayExpressions2(rewrite, gatewayType, node.data?.inputs);
|
|
27958
28687
|
});
|
|
27959
28688
|
if (processLevelVariables.length > 0) {
|
|
27960
28689
|
if (!processVariables.inputOutputs) {
|
|
@@ -27969,11 +28698,12 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
27969
28698
|
const parentDiagram = definitions.diagrams[0];
|
|
27970
28699
|
const agentResourceNodeIds = /* @__PURE__ */ new Set;
|
|
27971
28700
|
for (const node of allNodes) {
|
|
27972
|
-
if (
|
|
28701
|
+
if (isAgentResourceNodeType2(node.type || "")) {
|
|
27973
28702
|
agentResourceNodeIds.add(node.id);
|
|
27974
28703
|
}
|
|
27975
28704
|
}
|
|
27976
28705
|
const edgeConditions = /* @__PURE__ */ new Map;
|
|
28706
|
+
const eventSubProcessIds = new Set(allNodes.filter((n) => n.data?.triggeredByEvent === true).map((n) => n.id));
|
|
27977
28707
|
for (const node of allNodes) {
|
|
27978
28708
|
if (node.id.startsWith("preview") || node.type === "stickyNote" || agentResourceNodeIds.has(node.id)) {
|
|
27979
28709
|
continue;
|
|
@@ -28012,55 +28742,45 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28012
28742
|
];
|
|
28013
28743
|
}
|
|
28014
28744
|
}
|
|
28015
|
-
|
|
28016
|
-
|
|
28745
|
+
if (nodeType === "bpmn:SubProcess" && data.triggeredByEvent) {
|
|
28746
|
+
element.triggeredByEvent = true;
|
|
28747
|
+
}
|
|
28748
|
+
if (nodeType === "bpmn:StartEvent" && node.parentId && data.eventDefinition) {
|
|
28749
|
+
element.eventDefinitions = [
|
|
28750
|
+
{
|
|
28751
|
+
...templateXmlService.get(data.eventDefinition.type),
|
|
28752
|
+
id: data.eventDefinition.id
|
|
28753
|
+
}
|
|
28754
|
+
];
|
|
28755
|
+
}
|
|
28756
|
+
const boundaryEdgeIds = new Set(allEdges.filter((e3) => e3.source === node.id && (e3.sourceHandle === "error" || e3.sourceHandle === "timeout")).map((e3) => e3.id));
|
|
28757
|
+
const filteredOutgoing = (outgoing[node.id] || []).filter((edgeId) => !boundaryEdgeIds.has(edgeId));
|
|
28017
28758
|
element.outgoing = filteredOutgoing.map((edgeId) => ({
|
|
28018
28759
|
...templateXmlService.get("bpmn:SequenceFlow"),
|
|
28019
28760
|
id: edgeId
|
|
28020
28761
|
}));
|
|
28021
28762
|
element.incoming = mapIncomingOrOutgoingElements(node.id, incoming) ?? [];
|
|
28022
|
-
if (node.type
|
|
28023
|
-
|
|
28024
|
-
const
|
|
28763
|
+
if (isGatewayNodeType2(node.type)) {
|
|
28764
|
+
assertSerializedGatewayConditions(node.type, node.data.inputs);
|
|
28765
|
+
const branches = getGatewayBranches2(node.type, node.data.inputs);
|
|
28025
28766
|
const outgoingEdges = allEdges.filter((e3) => (outgoing[node.id] || []).includes(e3.id));
|
|
28026
28767
|
outgoingEdges.forEach((edge) => {
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
|
|
28030
|
-
|
|
28031
|
-
|
|
28032
|
-
|
|
28033
|
-
} else if (edge.sourceHandle === "false") {
|
|
28034
|
-
edge.data = {
|
|
28035
|
-
...edge.data,
|
|
28036
|
-
conditionExpression: `=js:!(${rawExpr}
|
|
28037
|
-
)`,
|
|
28038
|
-
label: inputs?.falseLabel
|
|
28039
|
-
};
|
|
28040
|
-
}
|
|
28041
|
-
});
|
|
28042
|
-
}
|
|
28043
|
-
if (node.type === SWITCH_NODE_TYPE) {
|
|
28044
|
-
const inputs = node.data.inputs;
|
|
28045
|
-
const outgoingEdges = allEdges.filter((e3) => (outgoing[node.id] || []).includes(e3.id));
|
|
28046
|
-
outgoingEdges.forEach((edge) => {
|
|
28047
|
-
if (edge.sourceHandle?.startsWith("case-")) {
|
|
28048
|
-
const caseId = edge.sourceHandle.replace("case-", "");
|
|
28049
|
-
const matchingCase = inputs?.cases?.find((c2) => c2.id === caseId);
|
|
28050
|
-
if (matchingCase && matchingCase.expression) {
|
|
28051
|
-
edge.data = {
|
|
28052
|
-
...edge.data,
|
|
28053
|
-
conditionExpression: `=js:${stripJsPrefix(matchingCase.expression)}`,
|
|
28054
|
-
label: matchingCase.label
|
|
28055
|
-
};
|
|
28056
|
-
}
|
|
28768
|
+
const branch = branches.find((b2) => b2.handle === edge.sourceHandle);
|
|
28769
|
+
if (!branch)
|
|
28770
|
+
return;
|
|
28771
|
+
if (branch.condition !== undefined) {
|
|
28772
|
+
edge.data = { ...edge.data, conditionExpression: `=js:${branch.condition}`, label: branch.authoredLabel };
|
|
28773
|
+
return;
|
|
28057
28774
|
}
|
|
28058
|
-
if (
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
|
|
28062
|
-
};
|
|
28775
|
+
if (!branch.isFallback)
|
|
28776
|
+
return;
|
|
28777
|
+
if (branch.authoredLabel) {
|
|
28778
|
+
edge.data = { ...edge.data, label: branch.authoredLabel };
|
|
28063
28779
|
}
|
|
28780
|
+
element.default = {
|
|
28781
|
+
...templateXmlService.get("bpmn:SequenceFlow"),
|
|
28782
|
+
id: edge.id
|
|
28783
|
+
};
|
|
28064
28784
|
});
|
|
28065
28785
|
}
|
|
28066
28786
|
if (nodeType === "bpmn:ExclusiveGateway" && data.defaultFlowId) {
|
|
@@ -28069,24 +28789,20 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28069
28789
|
id: data.defaultFlowId
|
|
28070
28790
|
};
|
|
28071
28791
|
}
|
|
28072
|
-
|
|
28792
|
+
const isEntryPointStartEvent = nodeType === "bpmn:StartEvent" && !node.parentId;
|
|
28793
|
+
const triggerArgumentMappings = isEntryPointStartEvent ? triggerInputMappings.get(node.id) : undefined;
|
|
28794
|
+
let serviceType = nodeDefinition?.model?.serviceType ?? data.model?.serviceType;
|
|
28795
|
+
if (isEntryPointStartEvent) {
|
|
28073
28796
|
const entryPointId = data.inputs?.entryPointId || node.id;
|
|
28074
28797
|
element.extensionElements = {
|
|
28075
28798
|
...templateXmlService.get("bpmn:ExtensionElements"),
|
|
28076
28799
|
values: [createEntryPoint(entryPointId)]
|
|
28077
28800
|
};
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28081
|
-
const hasOwnServiceType = model.serviceType && model.serviceType !== "BPMN.Variables";
|
|
28082
|
-
data.model = {
|
|
28083
|
-
...model,
|
|
28084
|
-
...!hasOwnServiceType && { serviceType: "BPMN.Variables" },
|
|
28085
|
-
outputs: [...model.outputs || [], ...mappings]
|
|
28086
|
-
};
|
|
28801
|
+
if (triggerArgumentMappings?.length && (!serviceType || serviceType === "BPMN.Variables")) {
|
|
28802
|
+
serviceType = "BPMN.Variables";
|
|
28803
|
+
data.model = { ...data.model, serviceType };
|
|
28087
28804
|
}
|
|
28088
28805
|
}
|
|
28089
|
-
const serviceType = nodeDefinition?.model?.serviceType ?? data.model?.serviceType;
|
|
28090
28806
|
const isDataFabricNode = !!data.type && DATA_FABRIC_NODE_TYPES.has(data.type);
|
|
28091
28807
|
if (serviceType || isDataFabricNode) {
|
|
28092
28808
|
const manifestModel = nodeDefinition?.model ?? {};
|
|
@@ -28111,22 +28827,28 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28111
28827
|
allNodes
|
|
28112
28828
|
});
|
|
28113
28829
|
}
|
|
28114
|
-
if (nodeType === "bpmn:SubProcess" &&
|
|
28830
|
+
if (nodeType === "bpmn:SubProcess" && isLoopNodeType2(data.type)) {
|
|
28115
28831
|
setupCoreLogicLoopConfiguration(node, element, allNodes, nodeDefinitions, subprocessVariables);
|
|
28116
28832
|
}
|
|
28117
28833
|
const modelForContext = data.model;
|
|
28118
|
-
if (modelForContext?.context?.length
|
|
28119
|
-
modelForContext.context =
|
|
28834
|
+
if (modelForContext?.context?.length) {
|
|
28835
|
+
modelForContext.context = resolveContextBindingPlaceholders2(modelForContext.context, bindings ?? [], modelForContext.bindings?.resourceKey, modelForContext.bindings?.resource, (placeholder) => unresolvedOut?.push({ nodeId: node.id, label: data.display?.label, nodeType: data.type ?? node.type, placeholder }));
|
|
28120
28836
|
}
|
|
28121
28837
|
const extensionData = extractExtensionData(data.model);
|
|
28122
|
-
|
|
28123
|
-
|
|
28838
|
+
const nodeRetry = getNodeRetry(node);
|
|
28839
|
+
if (nodeRetry)
|
|
28840
|
+
extensionData.retry = nodeRetry;
|
|
28841
|
+
if (triggerArgumentMappings?.length) {
|
|
28842
|
+
extensionData.outputs = [...extensionData.outputs || [], ...triggerArgumentMappings];
|
|
28843
|
+
}
|
|
28844
|
+
if (node.type && (isEndNodeType2(node.type) || node.type === "bpmn:EndEvent" && data.outputs)) {
|
|
28845
|
+
const nodeMappings = buildNodeOutputMappings(node, workflowVariables, eventSubProcessIds);
|
|
28124
28846
|
if (nodeMappings.length > 0) {
|
|
28125
28847
|
extensionData.serviceType = "BPMN.Variables";
|
|
28126
28848
|
extensionData.outputs = [...extensionData.outputs || [], ...nodeMappings];
|
|
28127
28849
|
}
|
|
28128
28850
|
}
|
|
28129
|
-
if ((data.type ?? node.type) ===
|
|
28851
|
+
if ((data.type ?? node.type) === MOCK_NODE_TYPE2) {
|
|
28130
28852
|
const mockOutput = nodeDefinition?.outputDefinition?.output;
|
|
28131
28853
|
const outputVar = mockOutput?.var ?? "output";
|
|
28132
28854
|
extensionData.serviceType = "BPMN.Variables";
|
|
@@ -28136,10 +28858,11 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28136
28858
|
];
|
|
28137
28859
|
}
|
|
28138
28860
|
const hasExtensionData = Object.keys(extensionData).length > 0 && extensionElementHasContent(extensionData);
|
|
28139
|
-
const variableUpdatesSupported =
|
|
28861
|
+
const variableUpdatesSupported = supportsVariableUpdates2(node.data?.type ?? node.type);
|
|
28140
28862
|
const hasVariableUpdates = variableUpdatesSupported && workflowVariables?.variableUpdates?.[node.id]?.length;
|
|
28141
28863
|
if (hasExtensionData || hasVariableUpdates) {
|
|
28142
|
-
const
|
|
28864
|
+
const hitlBindingScope = isHitlNodeType2(data.type ?? node.type ?? "") ? modelForContext?.bindings : undefined;
|
|
28865
|
+
const extensionElements = createExtensionElement({ ...node, type: nodeType }, extensionData, bindings ?? [], variableUpdatesSupported ? workflowVariables : { ...workflowVariables, variableUpdates: undefined }, hitlBindingScope);
|
|
28143
28866
|
element.extensionElements = {
|
|
28144
28867
|
...templateXmlService.get("bpmn:ExtensionElements"),
|
|
28145
28868
|
values: element.extensionElements ? [...element.extensionElements.values, ...extensionElements] : extensionElements
|
|
@@ -28177,7 +28900,8 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28177
28900
|
source: value.source
|
|
28178
28901
|
};
|
|
28179
28902
|
}),
|
|
28180
|
-
scriptVersion: "v3"
|
|
28903
|
+
scriptVersion: "v3",
|
|
28904
|
+
retry: nodeRetry
|
|
28181
28905
|
}, bindings ?? [], workflowVariables)
|
|
28182
28906
|
};
|
|
28183
28907
|
} else if (nodeType === "bpmn:ScriptTask" && data.inputs?.script) {
|
|
@@ -28226,7 +28950,8 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28226
28950
|
values: createExtensionElement({ ...node, type: nodeType }, {
|
|
28227
28951
|
inputs: allInputs,
|
|
28228
28952
|
outputs: scriptOutputs,
|
|
28229
|
-
scriptVersion: "v3"
|
|
28953
|
+
scriptVersion: "v3",
|
|
28954
|
+
retry: nodeRetry
|
|
28230
28955
|
}, bindings ?? [], workflowVariables)
|
|
28231
28956
|
};
|
|
28232
28957
|
}
|
|
@@ -28239,6 +28964,15 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28239
28964
|
}
|
|
28240
28965
|
];
|
|
28241
28966
|
}
|
|
28967
|
+
if (data[TIMEOUT_ERROR_END_FLAG] && timeoutError) {
|
|
28968
|
+
element.eventDefinitions = [
|
|
28969
|
+
{
|
|
28970
|
+
...templateXmlService.get("bpmn:ErrorEventDefinition"),
|
|
28971
|
+
id: `${node.id}_ErrorDefinition`,
|
|
28972
|
+
errorRef: timeoutError
|
|
28973
|
+
}
|
|
28974
|
+
];
|
|
28975
|
+
}
|
|
28242
28976
|
const bpmnShape = buildShape(node, allNodes);
|
|
28243
28977
|
parentElement.flowElements.push(element);
|
|
28244
28978
|
parentDiagram.plane.planeElement.push(bpmnShape);
|
|
@@ -28292,6 +29026,57 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28292
29026
|
};
|
|
28293
29027
|
parentDiagram.plane.planeElement.push(boundaryShape);
|
|
28294
29028
|
}
|
|
29029
|
+
const timeLimit = getNodeTimeLimit(node);
|
|
29030
|
+
const timeoutEdges = timeLimit ? allEdges.filter((e3) => e3.source === node.id && e3.sourceHandle === "timeout") : [];
|
|
29031
|
+
if (timeLimit && timeoutEdges.length > 0) {
|
|
29032
|
+
const boundaryEventId = timeoutBoundaryEventId(node.id);
|
|
29033
|
+
const errorOutputDef = (nodeDefinition ?? nodeDefinitions.find((d2) => d2.nodeType === data.type))?.outputDefinition?.error ?? undefined;
|
|
29034
|
+
const timeoutExtensionValues = errorOutputDef ? createExtensionElement({ ...node, type: "bpmn:BoundaryEvent" }, {
|
|
29035
|
+
outputs: [
|
|
29036
|
+
{
|
|
29037
|
+
name: errorOutputDef.var ?? "error",
|
|
29038
|
+
type: errorOutputDef.type ?? "object",
|
|
29039
|
+
source: timeoutErrorPayloadSource(String(element.name ?? node.id), timeLimit),
|
|
29040
|
+
var: errorOutputDef.var ?? "error"
|
|
29041
|
+
}
|
|
29042
|
+
]
|
|
29043
|
+
}, bindings ?? []) : [];
|
|
29044
|
+
const timerDefinition = {
|
|
29045
|
+
...templateXmlService.get("bpmn:TimerEventDefinition"),
|
|
29046
|
+
id: `${boundaryEventId}_TimerDefinition`,
|
|
29047
|
+
timeDuration: { ...templateXmlService.get("bpmn:FormalExpression"), body: timeLimit }
|
|
29048
|
+
};
|
|
29049
|
+
const boundaryEvent = {
|
|
29050
|
+
...templateXmlService.get("bpmn:BoundaryEvent", boundaryEventId),
|
|
29051
|
+
id: boundaryEventId,
|
|
29052
|
+
attachedToRef: element,
|
|
29053
|
+
cancelActivity: true,
|
|
29054
|
+
eventDefinitions: [timerDefinition],
|
|
29055
|
+
outgoing: timeoutEdges.map((e3) => ({
|
|
29056
|
+
...templateXmlService.get("bpmn:SequenceFlow"),
|
|
29057
|
+
id: e3.id
|
|
29058
|
+
})),
|
|
29059
|
+
...timeoutExtensionValues.length > 0 ? { extensionElements: { ...templateXmlService.get("bpmn:ExtensionElements"), values: timeoutExtensionValues } } : {}
|
|
29060
|
+
};
|
|
29061
|
+
for (const timeoutEdge of timeoutEdges) {
|
|
29062
|
+
timeoutEdge.source = boundaryEventId;
|
|
29063
|
+
timeoutEdge.sourceHandle = undefined;
|
|
29064
|
+
}
|
|
29065
|
+
parentElement.flowElements.push(boundaryEvent);
|
|
29066
|
+
const clockCentreX = (node.position?.x ?? 0) + (node.width ?? 100) - TIMEOUT_HANDLE_OFFSETS.right - TIMEOUT_HANDLE_OFFSETS.width / 2;
|
|
29067
|
+
parentDiagram.plane.planeElement.push({
|
|
29068
|
+
...templateXmlService.get("bpmndi:BPMNShape"),
|
|
29069
|
+
id: `BPMNShape_${boundaryEventId}`,
|
|
29070
|
+
bpmnElement: boundaryEvent,
|
|
29071
|
+
bounds: {
|
|
29072
|
+
...templateXmlService.get("dc:Bounds"),
|
|
29073
|
+
x: clockCentreX - TIMER_BOUNDARY_SIZE / 2,
|
|
29074
|
+
y: (node.position?.y ?? 0) - TIMER_BOUNDARY_SIZE / 2,
|
|
29075
|
+
width: TIMER_BOUNDARY_SIZE,
|
|
29076
|
+
height: TIMER_BOUNDARY_SIZE
|
|
29077
|
+
}
|
|
29078
|
+
});
|
|
29079
|
+
}
|
|
28295
29080
|
}
|
|
28296
29081
|
if (edgeConditions.size > 0) {
|
|
28297
29082
|
for (const edge of allEdges) {
|
|
@@ -28379,12 +29164,14 @@ function buildBpmnDefinition(nodes, edges, nodeDefinitions, bindings, workflowVa
|
|
|
28379
29164
|
const data = node.data;
|
|
28380
29165
|
const resolved = toEventDefinition(data, nodeDefinition.model);
|
|
28381
29166
|
const id2 = resolved.messageRef?.id;
|
|
28382
|
-
const
|
|
28383
|
-
if (!id2 || !
|
|
29167
|
+
const name = resolved.messageRef?.name;
|
|
29168
|
+
if (!id2 || !name || seenMessageIds.has(id2))
|
|
28384
29169
|
continue;
|
|
28385
29170
|
seenMessageIds.add(id2);
|
|
28386
|
-
definitions.rootElements.push(createMessage(id2,
|
|
29171
|
+
definitions.rootElements.push(createMessage(id2, name));
|
|
28387
29172
|
}
|
|
29173
|
+
if (timeoutError)
|
|
29174
|
+
definitions.rootElements.push(timeoutError);
|
|
28388
29175
|
return definitions;
|
|
28389
29176
|
}
|
|
28390
29177
|
function buildSubflowScopedVarIdMap(subflowNodeId, globals = []) {
|
|
@@ -28423,7 +29210,7 @@ function computeSubflowEffectiveOutputKeys(subflowNodeId, subflows, nodeDefiniti
|
|
|
28423
29210
|
for (const n of terminalNodes) {
|
|
28424
29211
|
const def = nodeDefinitions.find((d2) => d2.nodeType === n.type);
|
|
28425
29212
|
let outputDef = def?.outputDefinition;
|
|
28426
|
-
if ((!outputDef || Object.keys(outputDef).length === 0) && n.type ===
|
|
29213
|
+
if ((!outputDef || Object.keys(outputDef).length === 0) && n.type === SUBFLOW_NODE_TYPE2) {
|
|
28427
29214
|
outputDef = computeSubflowEffectiveOutputKeys(n.id, subflows, nodeDefinitions, seen);
|
|
28428
29215
|
}
|
|
28429
29216
|
if (outputDef) {
|
|
@@ -28441,7 +29228,7 @@ function buildPassThroughOutputMappings(subflowNodeId, lastNodes, nodeDefinition
|
|
|
28441
29228
|
let outputDef;
|
|
28442
29229
|
if (manifestOutputDef && Object.keys(manifestOutputDef).length > 0) {
|
|
28443
29230
|
outputDef = manifestOutputDef;
|
|
28444
|
-
} else if ((n.type ===
|
|
29231
|
+
} else if ((n.type === SUBFLOW_NODE_TYPE2 || n.data?.type === SUBFLOW_NODE_TYPE2) && subflows) {
|
|
28445
29232
|
outputDef = computeSubflowEffectiveOutputKeys(n.id, subflows, nodeDefinitions);
|
|
28446
29233
|
}
|
|
28447
29234
|
if (!outputDef || Object.keys(outputDef).length === 0)
|
|
@@ -28493,7 +29280,7 @@ function expandSubflowNodes(allNodes, allEdges, subflows, nodeDefinitions, colle
|
|
|
28493
29280
|
const len = allNodes.length;
|
|
28494
29281
|
for (let i2 = 0;i2 < len; i2++) {
|
|
28495
29282
|
const node = allNodes[i2];
|
|
28496
|
-
if (node.type !==
|
|
29283
|
+
if (node.type !== SUBFLOW_NODE_TYPE2)
|
|
28497
29284
|
continue;
|
|
28498
29285
|
if (expandedNodeIds.has(node.id))
|
|
28499
29286
|
continue;
|
|
@@ -28516,7 +29303,7 @@ function expandSubflowNodes(allNodes, allEdges, subflows, nodeDefinitions, colle
|
|
|
28516
29303
|
const allGlobals = entry.variables?.globals ?? [];
|
|
28517
29304
|
const varIdMap = buildSubflowScopedVarIdMap(node.id, allGlobals);
|
|
28518
29305
|
const scopedGlobals = allGlobals.map((global) => ({ global, scopedId: varIdMap.get(global.id) ?? global.id }));
|
|
28519
|
-
for (const nodeVar of
|
|
29306
|
+
for (const nodeVar of generateNodeVariables2(entry.nodes, nodeDefinitions)) {
|
|
28520
29307
|
scopedVariables.push({ path: nodeVar.id, type: nodeVar.type || "string", schema: nodeVar.schema });
|
|
28521
29308
|
}
|
|
28522
29309
|
for (const nodeVar of entry.variables?.nodes ?? []) {
|
|
@@ -28539,7 +29326,7 @@ function expandSubflowNodes(allNodes, allEdges, subflows, nodeDefinitions, colle
|
|
|
28539
29326
|
const inputs = node.data.inputs;
|
|
28540
29327
|
const rawInput = inputs?.[g2.id];
|
|
28541
29328
|
let inputExpr;
|
|
28542
|
-
if (
|
|
29329
|
+
if (isExpressionValue2(rawInput)) {
|
|
28543
29330
|
inputExpr = serializeExpressionValueAsMappingSource(rawInput, "");
|
|
28544
29331
|
} else if (typeof rawInput === "string") {
|
|
28545
29332
|
inputExpr = transformExpression(rawInput, "");
|
|
@@ -28641,7 +29428,7 @@ function expandSubflowNodes(allNodes, allEdges, subflows, nodeDefinitions, colle
|
|
|
28641
29428
|
if (childNode.data?.inputs) {
|
|
28642
29429
|
childNode.data.inputs = scopeSubflowVarRefs(childNode.data.inputs, varIdMap);
|
|
28643
29430
|
}
|
|
28644
|
-
if (childNode.data?.variableUpdates &&
|
|
29431
|
+
if (childNode.data?.variableUpdates && supportsVariableUpdates2(childNode.data.type ?? childNode.type)) {
|
|
28645
29432
|
const rewritten = childNode.data.variableUpdates.map((update) => ({
|
|
28646
29433
|
variableId: varIdMap.get(update.variableId) ?? update.variableId,
|
|
28647
29434
|
expression: scopeSubflowVarRefs(update.expression, varIdMap)
|
|
@@ -28661,7 +29448,7 @@ function expandSubflowNodes(allNodes, allEdges, subflows, nodeDefinitions, colle
|
|
|
28661
29448
|
}
|
|
28662
29449
|
allNodes.push(...childNodes);
|
|
28663
29450
|
allEdges.push(...childEdges);
|
|
28664
|
-
const lastNodesNeedingImplicitEnd = lastNodes.filter((n) => !isSubflowBoundaryEndType(n.type ?? n.data.type, nodeDefinitions) && n.type !==
|
|
29451
|
+
const lastNodesNeedingImplicitEnd = lastNodes.filter((n) => !isSubflowBoundaryEndType(n.type ?? n.data.type, nodeDefinitions) && n.type !== DECISION_NODE_TYPE2);
|
|
28665
29452
|
if (lastNodesNeedingImplicitEnd.length > 0) {
|
|
28666
29453
|
const implicitEndId = `${implicitNodePrefix2}EndEvent_${node.id}`;
|
|
28667
29454
|
const implicitEndEvent = {
|
|
@@ -28690,7 +29477,7 @@ function normalizeLoopConditionInput(node, field, ancestorLoops) {
|
|
|
28690
29477
|
const raw = loopInputs?.[field];
|
|
28691
29478
|
if (!raw)
|
|
28692
29479
|
return;
|
|
28693
|
-
const serialized =
|
|
29480
|
+
const serialized = isExpressionValue2(raw) ? serializeExpressionValueAsMappingSource(raw, node.id) : raw;
|
|
28694
29481
|
const normalized = transformExpression(serialized, node.id);
|
|
28695
29482
|
loopInputs[field] = transformLoopVariablesInString(normalized, [...ancestorLoops, node]);
|
|
28696
29483
|
}
|
|
@@ -28706,11 +29493,15 @@ function expandFlowElementsToBpmn(nodes, edges, nodeDefinitions, subflows, workf
|
|
|
28706
29493
|
const variableUpdates = { ...workflowVariableUpdates, ...collectedVariableUpdates };
|
|
28707
29494
|
const ignoredEdges = getIgnoredLoopEdges(allNodes, allEdges);
|
|
28708
29495
|
const preservedEdgeIds = expandCoreLogicLoops(allNodes, allEdges, nodeDefinitions);
|
|
29496
|
+
expandErrorHandlers(allNodes, allEdges);
|
|
28709
29497
|
relocateLoopVariableUpdates(allNodes, variableUpdates);
|
|
28710
29498
|
for (const edgeId of preservedEdgeIds) {
|
|
28711
29499
|
ignoredEdges.delete(edgeId);
|
|
28712
29500
|
}
|
|
28713
29501
|
for (const node of allNodes) {
|
|
29502
|
+
if (node.data?.type === AGENTIC_SWITCH_NODE_TYPE) {
|
|
29503
|
+
prepareAgenticSwitchNode(node);
|
|
29504
|
+
}
|
|
28714
29505
|
let expansionModel = node.data?.model;
|
|
28715
29506
|
if (!expansionModel?.expansion) {
|
|
28716
29507
|
const nodeType = node.data?.type || node.type;
|
|
@@ -28741,8 +29532,8 @@ function expandFlowElementsToBpmn(nodes, edges, nodeDefinitions, subflows, workf
|
|
|
28741
29532
|
variableUpdates[node.id] = transformLoopVariablesInObject(updates, ancestorLoops);
|
|
28742
29533
|
}
|
|
28743
29534
|
}
|
|
28744
|
-
if (node.type === "bpmn:SubProcess" &&
|
|
28745
|
-
const conditionField =
|
|
29535
|
+
if (node.type === "bpmn:SubProcess" && isLoopNodeType2(node.data?.type)) {
|
|
29536
|
+
const conditionField = isDoWhileNodeType2(node.data?.type) ? "condition" : "completionCondition";
|
|
28746
29537
|
normalizeLoopConditionInput(node, conditionField, ancestorLoops);
|
|
28747
29538
|
}
|
|
28748
29539
|
if (ancestorLoops.length > 0 && !isImplicitLoopBoundaryNode(node)) {
|
|
@@ -28750,11 +29541,11 @@ function expandFlowElementsToBpmn(nodes, edges, nodeDefinitions, subflows, workf
|
|
|
28750
29541
|
node.data = {};
|
|
28751
29542
|
if (!node.data.model)
|
|
28752
29543
|
node.data.model = {};
|
|
28753
|
-
const isAgent =
|
|
29544
|
+
const isAgent = isAgentNodeType2(node.type ?? node.data.type);
|
|
28754
29545
|
const existingInputs = [
|
|
28755
29546
|
...node.data.model.inputs || [],
|
|
28756
|
-
...isAgent || !node.data.inputs ? [] : Object.entries(node.data.inputs).map(([
|
|
28757
|
-
name
|
|
29547
|
+
...isAgent || !node.data.inputs ? [] : Object.entries(node.data.inputs).map(([name, value]) => ({
|
|
29548
|
+
name,
|
|
28758
29549
|
value,
|
|
28759
29550
|
type: typeof value === "object" ? "json" : "string"
|
|
28760
29551
|
}))
|
|
@@ -28792,7 +29583,7 @@ function expandFlowElementsToBpmn(nodes, edges, nodeDefinitions, subflows, workf
|
|
|
28792
29583
|
}
|
|
28793
29584
|
function relocateLoopVariableUpdates(allNodes, variableUpdates) {
|
|
28794
29585
|
for (const node of allNodes) {
|
|
28795
|
-
if (node.type !== "bpmn:SubProcess" || !
|
|
29586
|
+
if (node.type !== "bpmn:SubProcess" || !isLoopNodeType2(node.data?.type))
|
|
28796
29587
|
continue;
|
|
28797
29588
|
const updates = variableUpdates[node.id];
|
|
28798
29589
|
if (!updates?.length)
|
|
@@ -28813,7 +29604,7 @@ function expandNodeWithTemplate(sourceNode, model, allEdges) {
|
|
|
28813
29604
|
const parts = path.split(".");
|
|
28814
29605
|
let current = obj;
|
|
28815
29606
|
for (const part of parts) {
|
|
28816
|
-
if (current && typeof current === "object" && part
|
|
29607
|
+
if (current && typeof current === "object" && Object.hasOwn(current, part)) {
|
|
28817
29608
|
current = current[part];
|
|
28818
29609
|
} else {
|
|
28819
29610
|
return;
|
|
@@ -28822,10 +29613,14 @@ function expandNodeWithTemplate(sourceNode, model, allEdges) {
|
|
|
28822
29613
|
return current;
|
|
28823
29614
|
};
|
|
28824
29615
|
const replacePlaceholders = (template, context = {}) => {
|
|
28825
|
-
return template.replace(/{nodeId}/g, nodeId).replace(/{node\.data\.label}/g, nodeData?.display?.label || "HTTP Request").replace(/{branchName}/g, context.branchNameSanitized || "").replace(/{branch\.id}/g, context.branch?.id || "").replace(/{branch\.name}/g, context.branch?.name || "").replace(/{branch\.conditionExpression}/g, serializeBranchCondition(context.branch?.conditionExpression));
|
|
29616
|
+
return template.replace(/{nodeId}/g, nodeId).replace(/{node\.data\.label}/g, nodeData?.display?.label || "HTTP Request").replace(/{branchName}/g, context.branchNameSanitized || "").replace(/{branch\.id}/g, context.branch?.id || "").replace(/{branch\.name}/g, context.branch?.name || "").replace(/{branch\.conditionExpression}/g, serializeBranchCondition(context.branch?.conditionExpression)).replace(/{defaultBranchLabel}/g, defaultBranchLabel());
|
|
28826
29617
|
};
|
|
29618
|
+
function defaultBranchLabel() {
|
|
29619
|
+
const label = inputs?.defaultBranch?.label;
|
|
29620
|
+
return typeof label === "string" && label.trim() ? label : "Default";
|
|
29621
|
+
}
|
|
28827
29622
|
function serializeBranchCondition(value) {
|
|
28828
|
-
if (
|
|
29623
|
+
if (isExpressionValue2(value)) {
|
|
28829
29624
|
const jsEv = value.type === "jsExpression" ? value : { ...value, type: "jsExpression" };
|
|
28830
29625
|
return String(serializeExpressionValue(jsEv, nodeId));
|
|
28831
29626
|
}
|
|
@@ -28884,6 +29679,95 @@ function expandNodeWithTemplate(sourceNode, model, allEdges) {
|
|
|
28884
29679
|
};
|
|
28885
29680
|
}).filter((ctx) => ctx !== null);
|
|
28886
29681
|
};
|
|
29682
|
+
const writeIntoBody = (body, path, value) => {
|
|
29683
|
+
const keys = path.split(".");
|
|
29684
|
+
if (keys.some(isUnsafeKey2))
|
|
29685
|
+
return;
|
|
29686
|
+
const leaf2 = keys.at(-1);
|
|
29687
|
+
if (!leaf2)
|
|
29688
|
+
return;
|
|
29689
|
+
let cursor = body;
|
|
29690
|
+
for (const key of keys.slice(0, -1)) {
|
|
29691
|
+
if (typeof cursor[key] !== "object" || cursor[key] === null)
|
|
29692
|
+
cursor[key] = {};
|
|
29693
|
+
cursor = cursor[key];
|
|
29694
|
+
}
|
|
29695
|
+
cursor[leaf2] = value;
|
|
29696
|
+
};
|
|
29697
|
+
const fillJsTemplate = (template) => template.replace(/\{(node\.data\.inputs\.[\w.]+)\}/g, (_match, from) => {
|
|
29698
|
+
const value = resolvePath({ node: sourceNode }, from);
|
|
29699
|
+
if (value === undefined || value === null)
|
|
29700
|
+
return "null";
|
|
29701
|
+
if (isExpressionValue2(value)) {
|
|
29702
|
+
const serialized = serializeExpressionValueAsMappingSource(value, nodeId);
|
|
29703
|
+
if (serialized.startsWith(JS_EXPRESSION_PREFIX2))
|
|
29704
|
+
return serialized.slice(JS_EXPRESSION_PREFIX2.length);
|
|
29705
|
+
if (serialized.startsWith("=")) {
|
|
29706
|
+
console.warn(`[bpmn-to-xml] Node "${nodeId}": ${from} resolves to "${serialized}", which cannot be composed into an expression; emitting null. Bind a value or an expression rather than a reference.`);
|
|
29707
|
+
return "null";
|
|
29708
|
+
}
|
|
29709
|
+
return JSON.stringify(serialized);
|
|
29710
|
+
}
|
|
29711
|
+
return JSON.stringify(value);
|
|
29712
|
+
});
|
|
29713
|
+
const processInputs = (inputsTemplate) => inputsTemplate.map((input2) => {
|
|
29714
|
+
const { source, sources, jsTemplate, ...resolved } = input2;
|
|
29715
|
+
if (source) {
|
|
29716
|
+
const value = resolvePath({ node: sourceNode }, source);
|
|
29717
|
+
if (resolved.type === "json" || resolved.target === "bodyField") {
|
|
29718
|
+
resolved.body = value;
|
|
29719
|
+
} else {
|
|
29720
|
+
resolved.value = value;
|
|
29721
|
+
}
|
|
29722
|
+
}
|
|
29723
|
+
if (sources || jsTemplate) {
|
|
29724
|
+
const body = typeof resolved.body === "object" && resolved.body !== null ? structuredClone(resolved.body) : {};
|
|
29725
|
+
for (const [path, from] of Object.entries(sources ?? {})) {
|
|
29726
|
+
const value = resolvePath({ node: sourceNode }, from);
|
|
29727
|
+
if (value === undefined)
|
|
29728
|
+
continue;
|
|
29729
|
+
writeIntoBody(body, path, value);
|
|
29730
|
+
}
|
|
29731
|
+
for (const [path, template] of Object.entries(jsTemplate ?? {})) {
|
|
29732
|
+
writeIntoBody(body, path, `${JS_EXPRESSION_PREFIX2}${fillJsTemplate(template)}`);
|
|
29733
|
+
}
|
|
29734
|
+
resolved.body = body;
|
|
29735
|
+
}
|
|
29736
|
+
return resolved;
|
|
29737
|
+
});
|
|
29738
|
+
const applyPropagate = (node, propagate) => {
|
|
29739
|
+
if (!node.data.model)
|
|
29740
|
+
node.data.model = {};
|
|
29741
|
+
if (propagate.detail && sourceNode.data?.inputs?.detail) {
|
|
29742
|
+
node.data.inputs = { detail: structuredClone(sourceNode.data.inputs.detail) };
|
|
29743
|
+
}
|
|
29744
|
+
if (propagate.bindingResourceKey) {
|
|
29745
|
+
const resourceKey = resolvePath({ node: sourceNode }, propagate.bindingResourceKey);
|
|
29746
|
+
if (resourceKey) {
|
|
29747
|
+
node.data.model.bindings = { ...node.data.model.bindings, resourceKey: String(resourceKey) };
|
|
29748
|
+
} else {
|
|
29749
|
+
const context = node.data.model.context;
|
|
29750
|
+
for (const entry of context ?? []) {
|
|
29751
|
+
if (typeof entry.value === "string" && CONTEXT_BINDING_PLACEHOLDER_RE.test(entry.value))
|
|
29752
|
+
entry.value = "";
|
|
29753
|
+
}
|
|
29754
|
+
console.warn(`[bpmn-to-xml] Node "${nodeId}": ${propagate.bindingResourceKey} is empty, so its binding placeholders were left unbound.`);
|
|
29755
|
+
}
|
|
29756
|
+
}
|
|
29757
|
+
const retryConfig = propagate.retry;
|
|
29758
|
+
if (!retryConfig)
|
|
29759
|
+
return;
|
|
29760
|
+
if (retryConfig.condition && !evaluateCondition(retryConfig.condition))
|
|
29761
|
+
return;
|
|
29762
|
+
const maxRetryCount = resolvePath({ node: sourceNode }, retryConfig.maxRetryCount);
|
|
29763
|
+
const retryBackoff = resolvePath({ node: sourceNode }, retryConfig.retryBackoff) || retryConfig.retryBackoffDefault || "PT1S";
|
|
29764
|
+
node.data.model.retry = {
|
|
29765
|
+
maxRetryCount: String(maxRetryCount),
|
|
29766
|
+
retryBackoff,
|
|
29767
|
+
retryAllErrors: retryConfig.retryAllErrors || "true",
|
|
29768
|
+
retryBackoffType: retryConfig.retryBackoffType || "Static"
|
|
29769
|
+
};
|
|
29770
|
+
};
|
|
28887
29771
|
const expansionTemplate = model.expansion;
|
|
28888
29772
|
const processNodeTemplate = (template, context = {}) => {
|
|
28889
29773
|
if (template.condition && !evaluateCondition(template.condition)) {
|
|
@@ -28916,33 +29800,21 @@ function expandNodeWithTemplate(sourceNode, model, allEdges) {
|
|
|
28916
29800
|
if (node.data.model?.context) {
|
|
28917
29801
|
node.data.model.context = processContext(node.data.model.context);
|
|
28918
29802
|
}
|
|
29803
|
+
if (node.data.model?.inputs) {
|
|
29804
|
+
node.data.model.inputs = processInputs(node.data.model.inputs);
|
|
29805
|
+
}
|
|
28919
29806
|
if (node.data.model?.outputs) {
|
|
28920
29807
|
node.data.model.outputs = JSON.parse(replacePlaceholders(JSON.stringify(node.data.model.outputs), context));
|
|
29808
|
+
for (const output2 of node.data.model.outputs) {
|
|
29809
|
+
if (typeof output2?.source === "string")
|
|
29810
|
+
output2.source = fillJsTemplate(output2.source);
|
|
29811
|
+
}
|
|
28921
29812
|
}
|
|
28922
29813
|
if (node.data.model?.subprocessVariables) {
|
|
28923
29814
|
node.data.model.subprocessVariables = JSON.parse(replacePlaceholders(JSON.stringify(node.data.model.subprocessVariables), context));
|
|
28924
29815
|
}
|
|
28925
|
-
if (template.propagate)
|
|
28926
|
-
|
|
28927
|
-
node.data.model = {};
|
|
28928
|
-
if (template.propagate.detail && sourceNode.data?.inputs?.detail) {
|
|
28929
|
-
node.data.inputs = { detail: structuredClone(sourceNode.data.inputs.detail) };
|
|
28930
|
-
}
|
|
28931
|
-
if (template.propagate.retry) {
|
|
28932
|
-
const retryConfig = template.propagate.retry;
|
|
28933
|
-
const shouldPropagate = retryConfig.condition ? evaluateCondition(retryConfig.condition) : true;
|
|
28934
|
-
if (shouldPropagate) {
|
|
28935
|
-
const maxRetryCount = resolvePath({ node: sourceNode }, retryConfig.maxRetryCount);
|
|
28936
|
-
const retryBackoff = resolvePath({ node: sourceNode }, retryConfig.retryBackoff) || retryConfig.retryBackoffDefault || "PT1S";
|
|
28937
|
-
node.data.model.retry = {
|
|
28938
|
-
maxRetryCount: String(maxRetryCount),
|
|
28939
|
-
retryBackoff,
|
|
28940
|
-
retryAllErrors: retryConfig.retryAllErrors || "true",
|
|
28941
|
-
retryBackoffType: retryConfig.retryBackoffType || "Static"
|
|
28942
|
-
};
|
|
28943
|
-
}
|
|
28944
|
-
}
|
|
28945
|
-
}
|
|
29816
|
+
if (template.propagate)
|
|
29817
|
+
applyPropagate(node, template.propagate);
|
|
28946
29818
|
if (node.data.defaultFlowId) {
|
|
28947
29819
|
node.data.defaultFlowId = replacePlaceholders(node.data.defaultFlowId, context);
|
|
28948
29820
|
}
|
|
@@ -29100,7 +29972,7 @@ function mapWebhookDebugEntryPoint(entryPoint, nodes) {
|
|
|
29100
29972
|
return entryPoint;
|
|
29101
29973
|
}
|
|
29102
29974
|
const node = nodes.find((candidate) => candidate.id === fragment);
|
|
29103
|
-
if (!node?.type?.startsWith(
|
|
29975
|
+
if (!node?.type?.startsWith(CONNECTOR_TRIGGER_PREFIX2)) {
|
|
29104
29976
|
return entryPoint;
|
|
29105
29977
|
}
|
|
29106
29978
|
const detail = node.inputs?.detail ?? node.model?.detail;
|
|
@@ -29161,7 +30033,7 @@ function rewriteWebhookTriggersForDebug(input2) {
|
|
|
29161
30033
|
};
|
|
29162
30034
|
}
|
|
29163
30035
|
function isDebuggableWebhookTriggerNode(node) {
|
|
29164
|
-
if (!node?.type?.startsWith(
|
|
30036
|
+
if (!node?.type?.startsWith(CONNECTOR_TRIGGER_PREFIX2)) {
|
|
29165
30037
|
return false;
|
|
29166
30038
|
}
|
|
29167
30039
|
return isWebhookEventMode(getEventMode(node));
|
|
@@ -29177,7 +30049,7 @@ function isWebhookEventMode(eventMode) {
|
|
|
29177
30049
|
return eventMode === "webhook" || eventMode === "webhooks";
|
|
29178
30050
|
}
|
|
29179
30051
|
function getConnectorEventNodeType(triggerNodeType) {
|
|
29180
|
-
return triggerNodeType?.replace(
|
|
30052
|
+
return triggerNodeType?.replace(CONNECTOR_TRIGGER_PREFIX2, CONNECTOR_EVENT_PREFIX2) ?? "";
|
|
29181
30053
|
}
|
|
29182
30054
|
function toWaitForEventModel(model) {
|
|
29183
30055
|
const { entryPointId: _entryPointId, eventDefinition: _eventDefinition, ...rest } = model ?? {};
|
|
@@ -35732,7 +36604,7 @@ function mp(e3, t4) {
|
|
|
35732
36604
|
`, t4 - 1));
|
|
35733
36605
|
}
|
|
35734
36606
|
function vp(e3, t4) {
|
|
35735
|
-
var n, r2,
|
|
36607
|
+
var n, r2, { tag: o2, anchor: i2 } = e3, a2 = [], s2 = false;
|
|
35736
36608
|
if (e3.firstTabInLine !== -1)
|
|
35737
36609
|
return false;
|
|
35738
36610
|
for (e3.anchor !== null && (e3.anchorMap[e3.anchor] = a2), r2 = e3.input.charCodeAt(e3.position);r2 !== 0 && (e3.firstTabInLine !== -1 && (e3.position = e3.firstTabInLine, ap(e3, "tab characters must not be used in indentation")), r2 === 45) && Zd(e3.input.charCodeAt(e3.position + 1)); )
|
|
@@ -35780,7 +36652,7 @@ function gp(e3, t4, n, r2, o2) {
|
|
|
35780
36652
|
for (;yp(e3) || wp(e3); )
|
|
35781
36653
|
fp(e3, true, -1) ? (m2 = true, s2 = i2, e3.lineIndent > t4 ? h2 = 1 : e3.lineIndent === t4 ? h2 = 0 : e3.lineIndent < t4 && (h2 = -1)) : s2 = false;
|
|
35782
36654
|
if (s2 && (s2 = m2 || o2), h2 !== 1 && Md !== n || (p2 = Rd === n || Nd === n ? t4 : t4 + 1, f2 = e3.position - e3.lineStart, h2 === 1 ? s2 && (vp(e3, f2) || function(e4, t5, n2) {
|
|
35783
|
-
var r3, o3, i3, a3, s3, l3, c3,
|
|
36655
|
+
var r3, o3, i3, a3, s3, l3, c3, { tag: u3, anchor: d3 } = e4, p3 = {}, f3 = /* @__PURE__ */ Object.create(null), h3 = null, m3 = null, v3 = null, y2 = false, w2 = false;
|
|
35784
36656
|
if (e4.firstTabInLine !== -1)
|
|
35785
36657
|
return false;
|
|
35786
36658
|
for (e4.anchor !== null && (e4.anchorMap[e4.anchor] = p3), c3 = e4.input.charCodeAt(e4.position);c3 !== 0; ) {
|
|
@@ -35811,7 +36683,7 @@ function gp(e3, t4, n, r2, o2) {
|
|
|
35811
36683
|
}
|
|
35812
36684
|
return y2 && dp(e4, p3, f3, h3, m3, null, a3, s3, l3), w2 && (e4.tag = u3, e4.anchor = d3, e4.kind = "mapping", e4.result = p3), w2;
|
|
35813
36685
|
}(e3, f2, p2)) || function(e4, t5) {
|
|
35814
|
-
var n2, r3, o3, i3, a3, s3, l3, c3, u3, d3, p3, f3, h3 = true,
|
|
36686
|
+
var n2, r3, o3, i3, a3, s3, l3, c3, u3, d3, p3, f3, h3 = true, { tag: m3, anchor: v3 } = e4, y2 = /* @__PURE__ */ Object.create(null);
|
|
35815
36687
|
if ((f3 = e4.input.charCodeAt(e4.position)) === 91)
|
|
35816
36688
|
a3 = 93, c3 = false, i3 = [];
|
|
35817
36689
|
else {
|
|
@@ -35916,7 +36788,7 @@ function gp(e3, t4, n, r2, o2) {
|
|
|
35916
36788
|
r3 = e4.input.charCodeAt(++e4.position);
|
|
35917
36789
|
return e4.position === t5 && ap(e4, "name of an alias node must contain at least one character"), n2 = e4.input.slice(t5, e4.position), Id.call(e4.anchorMap, n2) || ap(e4, 'unidentified alias "' + n2 + '"'), e4.result = e4.anchorMap[n2], fp(e4, true, -1), true;
|
|
35918
36790
|
}(e3) ? function(e4, t5, n2) {
|
|
35919
|
-
var r3, o3, i3, a3, s3, l3, c3, u3,
|
|
36791
|
+
var r3, o3, i3, a3, s3, l3, c3, u3, { kind: d3, result: p3 } = e4;
|
|
35920
36792
|
if (Zd(u3 = e4.input.charCodeAt(e4.position)) || Yd(u3) || u3 === 35 || u3 === 38 || u3 === 42 || u3 === 33 || u3 === 124 || u3 === 62 || u3 === 39 || u3 === 34 || u3 === 37 || u3 === 64 || u3 === 96)
|
|
35921
36793
|
return false;
|
|
35922
36794
|
if ((u3 === 63 || u3 === 45) && (Zd(r3 = e4.input.charCodeAt(e4.position + 1)) || n2 && Yd(r3)))
|
|
@@ -36647,33 +37519,33 @@ function rewriteNodeExpressions(node, scope) {
|
|
|
36647
37519
|
}
|
|
36648
37520
|
function rewriteExpression(expr, scope) {
|
|
36649
37521
|
const { nodeIds, variableIds, loopNodeIds, doWhileNodeIds, errorHandlingNodeIds } = scope;
|
|
36650
|
-
return expr.replaceAll(VARS_REF_PATTERN, (match,
|
|
36651
|
-
if (field === "error" && nodeIds.has(
|
|
36652
|
-
if (!errorHandlingNodeIds.has(
|
|
36653
|
-
throw new Error(`Node "${
|
|
37522
|
+
return expr.replaceAll(VARS_REF_PATTERN, (match, name, field) => {
|
|
37523
|
+
if (field === "error" && nodeIds.has(name)) {
|
|
37524
|
+
if (!errorHandlingNodeIds.has(name)) {
|
|
37525
|
+
throw new Error(`Node "${name}" publishes no error — wire its error handle to a branch to reference .error`);
|
|
36654
37526
|
}
|
|
36655
|
-
return `$context.outputs.${
|
|
37527
|
+
return `$context.outputs.${name}.error`;
|
|
36656
37528
|
}
|
|
36657
|
-
if (doWhileNodeIds.has(
|
|
36658
|
-
throw new Error(`Do while "${
|
|
37529
|
+
if (doWhileNodeIds.has(name)) {
|
|
37530
|
+
throw new Error(`Do while "${name}" exposes no outputs — "${field ?? "(none)"}" cannot be referenced. Write the value to a workflow variable inside the loop body instead.`);
|
|
36659
37531
|
}
|
|
36660
|
-
if (loopNodeIds.has(
|
|
37532
|
+
if (loopNodeIds.has(name)) {
|
|
36661
37533
|
if (!field) {
|
|
36662
|
-
throw new Error(`Loop "${
|
|
37534
|
+
throw new Error(`Loop "${name}" requires a field accessor (.currentItem or .currentIteration)`);
|
|
36663
37535
|
}
|
|
36664
37536
|
if (field !== "currentItem" && field !== "currentIteration") {
|
|
36665
|
-
throw new Error(`Loop "${
|
|
37537
|
+
throw new Error(`Loop "${name}" field "${field}" is not supported in serverless workflow translation (only currentItem and currentIteration)`);
|
|
36666
37538
|
}
|
|
36667
|
-
return field === "currentIteration" ? `($${
|
|
37539
|
+
return field === "currentIteration" ? `($${name}_currentIndex + 1)` : `$${name}_currentItem`;
|
|
36668
37540
|
}
|
|
36669
|
-
if (nodeIds.has(
|
|
37541
|
+
if (nodeIds.has(name)) {
|
|
36670
37542
|
if (field !== "output") {
|
|
36671
|
-
throw new Error(`Node "${
|
|
37543
|
+
throw new Error(`Node "${name}" requires the .output or .error field accessor`);
|
|
36672
37544
|
}
|
|
36673
|
-
return `$context.outputs.${
|
|
37545
|
+
return `$context.outputs.${name}`;
|
|
36674
37546
|
}
|
|
36675
|
-
if (variableIds.has(
|
|
36676
|
-
return field ? `$context.variables.${
|
|
37547
|
+
if (variableIds.has(name)) {
|
|
37548
|
+
return field ? `$context.variables.${name}.${field}` : `$context.variables.${name}`;
|
|
36677
37549
|
}
|
|
36678
37550
|
return match;
|
|
36679
37551
|
});
|
|
@@ -36722,7 +37594,7 @@ function getEnclosingSubflowId(nodeId, nodeMap) {
|
|
|
36722
37594
|
let container = nodeMap.get(nodeId);
|
|
36723
37595
|
while (container?.parentId) {
|
|
36724
37596
|
container = nodeMap.get(container.parentId);
|
|
36725
|
-
if (container?.data.type ===
|
|
37597
|
+
if (container?.data.type === SUBFLOW_NODE_TYPE2)
|
|
36726
37598
|
return container.id;
|
|
36727
37599
|
}
|
|
36728
37600
|
}
|
|
@@ -36759,7 +37631,7 @@ function flattenSubflows(nodes, edges, subflows, variableUpdates) {
|
|
|
36759
37631
|
function subflowIndexes(nodes, from) {
|
|
36760
37632
|
const indexes = [];
|
|
36761
37633
|
for (let i2 = from;i2 < nodes.length; i2++) {
|
|
36762
|
-
if (nodes[i2].data.type ===
|
|
37634
|
+
if (nodes[i2].data.type === SUBFLOW_NODE_TYPE2)
|
|
36763
37635
|
indexes.push(i2);
|
|
36764
37636
|
}
|
|
36765
37637
|
return indexes;
|
|
@@ -36779,8 +37651,8 @@ function buildScope(subflowId, globals) {
|
|
|
36779
37651
|
const rewrite = (s2) => s2.replace(/\$vars\.(\w+)\.output\.(\w+)/g, (match, trigId, varId) => {
|
|
36780
37652
|
const scoped = triggerScoped.get(`${trigId}.${varId}`);
|
|
36781
37653
|
return scoped ? `$vars.${scoped}` : match;
|
|
36782
|
-
}).replace(/\$vars\.(\w+)/g, (match,
|
|
36783
|
-
const scoped = locals.get(
|
|
37654
|
+
}).replace(/\$vars\.(\w+)/g, (match, name) => {
|
|
37655
|
+
const scoped = locals.get(name);
|
|
36784
37656
|
return scoped ? `$vars.${scoped}` : match;
|
|
36785
37657
|
});
|
|
36786
37658
|
return { locals, outArgIds, rewrite };
|
|
@@ -36788,7 +37660,7 @@ function buildScope(subflowId, globals) {
|
|
|
36788
37660
|
function scopeBodyNode(node, scope) {
|
|
36789
37661
|
let data = node.data;
|
|
36790
37662
|
const outputs = data.outputs;
|
|
36791
|
-
if (outputs &&
|
|
37663
|
+
if (outputs && isEndNodeType2(data.type ?? "")) {
|
|
36792
37664
|
const reKey = data.type === "core.control.end";
|
|
36793
37665
|
const rows = Object.entries(outputs).filter(([id2]) => scope.outArgIds.has(id2)).map(([id2, row]) => [reKey ? scope.locals.get(id2) : id2, row]);
|
|
36794
37666
|
data = { ...data, outputs: Object.fromEntries(rows) };
|
|
@@ -36981,7 +37853,7 @@ function rewriteJsExpressions(value) {
|
|
|
36981
37853
|
function rewriteJsExpression(value) {
|
|
36982
37854
|
if (typeof value !== "string")
|
|
36983
37855
|
return value;
|
|
36984
|
-
if (!value.startsWith(
|
|
37856
|
+
if (!value.startsWith(JS_EXPRESSION_PREFIX2))
|
|
36985
37857
|
return value;
|
|
36986
37858
|
return `\${${unwrapJsExpression(value)}}`;
|
|
36987
37859
|
}
|
|
@@ -37110,7 +37982,7 @@ var translateDoWhile = (node, nodeMap, edgeMap, ctx, translate) => {
|
|
|
37110
37982
|
if (!condition) {
|
|
37111
37983
|
return [null, [new Error(`Do while node ${node.id}: condition expression is required`)]];
|
|
37112
37984
|
}
|
|
37113
|
-
const limit =
|
|
37985
|
+
const limit = resolveDoWhileLimit2(inputs.limit);
|
|
37114
37986
|
const [bodyTasks, bodyErrors] = walkLoopBody(node.id, nodeMap, edgeMap, translate, "Do while");
|
|
37115
37987
|
if (!bodyTasks) {
|
|
37116
37988
|
return [null, bodyErrors];
|
|
@@ -37127,10 +37999,10 @@ function assignTaskId(nodeId, suffix = "") {
|
|
|
37127
37999
|
return `${nodeId}#Assign${suffix}`;
|
|
37128
38000
|
}
|
|
37129
38001
|
function appendVariableUpdates(node, items) {
|
|
37130
|
-
if (!
|
|
38002
|
+
if (!supportsVariableUpdates2(node.data.type))
|
|
37131
38003
|
return items;
|
|
37132
|
-
const
|
|
37133
|
-
if (!
|
|
38004
|
+
const set2 = toSetBody(node.data.variableUpdates);
|
|
38005
|
+
if (!set2)
|
|
37134
38006
|
return items;
|
|
37135
38007
|
const task = findOwnTask(node, items)?.task;
|
|
37136
38008
|
if (!task)
|
|
@@ -37140,53 +38012,53 @@ function appendVariableUpdates(node, items) {
|
|
|
37140
38012
|
for (const item of task.switch) {
|
|
37141
38013
|
for (const [caseName, branch] of Object.entries(item)) {
|
|
37142
38014
|
const id3 = assignTaskId(node.id, `_${caseName}`);
|
|
37143
|
-
assigns.push({ [id3]: buildAssignTask(
|
|
38015
|
+
assigns.push({ [id3]: buildAssignTask(set2, branch.then) });
|
|
37144
38016
|
branch.then = id3;
|
|
37145
38017
|
}
|
|
37146
38018
|
}
|
|
37147
38019
|
return [...items, ...assigns];
|
|
37148
38020
|
}
|
|
37149
38021
|
const id2 = assignTaskId(node.id);
|
|
37150
|
-
const
|
|
38022
|
+
const assign = { [id2]: buildAssignTask(set2, task.then) };
|
|
37151
38023
|
task.then = id2;
|
|
37152
|
-
return [...items,
|
|
38024
|
+
return [...items, assign];
|
|
37153
38025
|
}
|
|
37154
|
-
function buildAssignTask(
|
|
37155
|
-
return kw().set(
|
|
38026
|
+
function buildAssignTask(set2, then) {
|
|
38027
|
+
return kw().set(set2).export({ as: ASSIGN_EXPORT }).then(then ?? "end").metadata({ displayName: "Update variables" }).build({ validate: false });
|
|
37156
38028
|
}
|
|
37157
38029
|
function toSetBody(updates) {
|
|
37158
38030
|
if (!updates?.length)
|
|
37159
38031
|
return null;
|
|
37160
|
-
const
|
|
38032
|
+
const set2 = {};
|
|
37161
38033
|
for (const update of updates) {
|
|
37162
38034
|
if (!update.variableId)
|
|
37163
38035
|
continue;
|
|
37164
38036
|
const value = toSetValue(update.expression);
|
|
37165
38037
|
if (value === undefined)
|
|
37166
38038
|
continue;
|
|
37167
|
-
|
|
38039
|
+
set2[update.variableId] = value;
|
|
37168
38040
|
}
|
|
37169
|
-
return Object.keys(
|
|
38041
|
+
return Object.keys(set2).length > 0 ? set2 : null;
|
|
37170
38042
|
}
|
|
37171
38043
|
function toSetValue(expression) {
|
|
37172
|
-
if (
|
|
38044
|
+
if (isExpressionValue2(expression)) {
|
|
37173
38045
|
if (!expression.expression)
|
|
37174
38046
|
return;
|
|
37175
38047
|
if (expression.type === "jsExpression")
|
|
37176
|
-
return toRuntimeExpression(
|
|
37177
|
-
return expression.fieldType === "string" ? toLiteralString(expression.expression) :
|
|
38048
|
+
return toRuntimeExpression(stripJsPrefix(expression.expression));
|
|
38049
|
+
return expression.fieldType === "string" ? toLiteralString(expression.expression) : decodeLiteral2(expression);
|
|
37178
38050
|
}
|
|
37179
38051
|
if (typeof expression === "string") {
|
|
37180
38052
|
if (!expression)
|
|
37181
38053
|
return;
|
|
37182
|
-
return expression.startsWith(
|
|
38054
|
+
return expression.startsWith(JS_EXPRESSION_PREFIX2) ? toRuntimeExpression(stripJsPrefix(unwrapJsExpression(expression))) : toLiteralString(expression);
|
|
37183
38055
|
}
|
|
37184
38056
|
return expression ?? undefined;
|
|
37185
38057
|
}
|
|
37186
|
-
function
|
|
38058
|
+
function stripJsPrefix(body) {
|
|
37187
38059
|
let out = body;
|
|
37188
|
-
while (out.startsWith(
|
|
37189
|
-
out = out.slice(
|
|
38060
|
+
while (out.startsWith(JS_EXPRESSION_PREFIX2)) {
|
|
38061
|
+
out = out.slice(JS_EXPRESSION_PREFIX2.length);
|
|
37190
38062
|
}
|
|
37191
38063
|
return out;
|
|
37192
38064
|
}
|
|
@@ -37194,12 +38066,12 @@ function toRuntimeExpression(body) {
|
|
|
37194
38066
|
return `\${${body}}`;
|
|
37195
38067
|
}
|
|
37196
38068
|
function toLiteralString(text) {
|
|
37197
|
-
if (!
|
|
38069
|
+
if (!hasMustache2(text))
|
|
37198
38070
|
return text;
|
|
37199
|
-
const serialized =
|
|
38071
|
+
const serialized = serializeTemplateInterpolations2(text);
|
|
37200
38072
|
if (serialized === text)
|
|
37201
38073
|
return text;
|
|
37202
|
-
return toRuntimeExpression(serialized.slice(
|
|
38074
|
+
return toRuntimeExpression(serialized.slice(JS_EXPRESSION_PREFIX2.length));
|
|
37203
38075
|
}
|
|
37204
38076
|
var translateEnd = (node, nodeMap, _edgeMap, ctx) => {
|
|
37205
38077
|
const label = node.data.display?.label ?? "End";
|
|
@@ -37214,13 +38086,13 @@ var translateEnd = (node, nodeMap, _edgeMap, ctx) => {
|
|
|
37214
38086
|
return [null, [new Error(`End node ${node.id}: ending subflow ${subflowId} from inside a loop or do-while is not supported`)]];
|
|
37215
38087
|
}
|
|
37216
38088
|
const outputs = node.data.outputs ?? {};
|
|
37217
|
-
const
|
|
38089
|
+
const set2 = {};
|
|
37218
38090
|
for (const [scopedId, row] of Object.entries(outputs)) {
|
|
37219
38091
|
const value = row?.source === undefined ? undefined : toSetValue(row.source);
|
|
37220
38092
|
if (value !== undefined)
|
|
37221
|
-
|
|
38093
|
+
set2[scopedId] = value;
|
|
37222
38094
|
}
|
|
37223
|
-
const task = kw().set(
|
|
38095
|
+
const task = kw().set(set2).export({ as: ASSIGN_EXPORT }).then(ctx.bodyEndTaskId).metadata({ displayName: label }).build({ validate: false });
|
|
37224
38096
|
return [[{ [node.id]: task }], []];
|
|
37225
38097
|
};
|
|
37226
38098
|
init_esm_shims();
|
|
@@ -37281,12 +38153,12 @@ function toResponsePayload(outputs) {
|
|
|
37281
38153
|
return `\${{ ${fields.join(", ")} }}`;
|
|
37282
38154
|
}
|
|
37283
38155
|
function toValueExpression(source) {
|
|
37284
|
-
const body =
|
|
38156
|
+
const body = getJsExpressionBody2(source)?.trim();
|
|
37285
38157
|
if (body)
|
|
37286
38158
|
return body;
|
|
37287
|
-
if (!
|
|
38159
|
+
if (!isExpressionValue2(source))
|
|
37288
38160
|
return;
|
|
37289
|
-
const literal2 =
|
|
38161
|
+
const literal2 = decodeLiteral2(source);
|
|
37290
38162
|
return literal2 === undefined ? undefined : JSON.stringify(literal2);
|
|
37291
38163
|
}
|
|
37292
38164
|
init_esm_shims();
|
|
@@ -37304,7 +38176,7 @@ var translateSubflow = (node, nodeMap, edgeMap, ctx, translate) => {
|
|
|
37304
38176
|
return [null, [new Error(`Subflow node ${node.id}: no subflow definition found`)]];
|
|
37305
38177
|
}
|
|
37306
38178
|
const bodyNodes = [...nodeMap.values()].filter((n) => n.parentId === node.id);
|
|
37307
|
-
const triggers = bodyNodes.filter((n) =>
|
|
38179
|
+
const triggers = bodyNodes.filter((n) => isTriggerNodeType2(n.data.type));
|
|
37308
38180
|
if (triggers.length !== 1) {
|
|
37309
38181
|
return [null, [new Error(`Subflow node ${node.id}: expected exactly one trigger in the body, found ${triggers.length}`)]];
|
|
37310
38182
|
}
|
|
@@ -37329,13 +38201,13 @@ var translateSubflow = (node, nodeMap, edgeMap, ctx, translate) => {
|
|
|
37329
38201
|
};
|
|
37330
38202
|
function buildSeedTask(node, trigger, globals, nodeMap, edgeMap, bodyCtx) {
|
|
37331
38203
|
const bindings = node.data.inputs ?? {};
|
|
37332
|
-
const
|
|
38204
|
+
const set2 = {};
|
|
37333
38205
|
for (const g2 of globals) {
|
|
37334
38206
|
const bound = g2.direction === "out" ? undefined : toSetValue(bindings[g2.id]);
|
|
37335
|
-
|
|
38207
|
+
set2[scopedVariableId(node.id, g2.id)] = bound !== undefined ? bound : g2.defaultValue ?? null;
|
|
37336
38208
|
}
|
|
37337
38209
|
return {
|
|
37338
|
-
[trigger.id]: kw().set(
|
|
38210
|
+
[trigger.id]: kw().set(set2).export({ as: ASSIGN_EXPORT }).then(resolveThen(trigger.id, "output", nodeMap, edgeMap, bodyCtx) ?? bodyCtx.bodyEndTaskId).metadata({ displayName: trigger.data.display?.label ?? "Start" }).build({ validate: false })
|
|
37339
38211
|
};
|
|
37340
38212
|
}
|
|
37341
38213
|
function buildAggregationExport(subflowId, globals) {
|
|
@@ -37407,10 +38279,10 @@ var translateNode = (node, nodeMap, edgeMap, ctx, translate) => {
|
|
|
37407
38279
|
const [wrapped, wrapErrors] = wrapErrorHandling(node, appendVariableUpdates(node, items), nodeMap, edgeMap, ctx);
|
|
37408
38280
|
return [wrapped, [...errors, ...wrapErrors]];
|
|
37409
38281
|
};
|
|
37410
|
-
function toServerlessWorkflow(triggerNodeId, rootNodes, rootEdges,
|
|
38282
|
+
function toServerlessWorkflow(triggerNodeId, rootNodes, rootEdges, name, variables, subflows) {
|
|
37411
38283
|
const globals = variables?.globals ?? [];
|
|
37412
38284
|
const vars = globals.filter((v2) => v2.direction === "inout");
|
|
37413
|
-
const inArgs = globals.filter((v2) =>
|
|
38285
|
+
const inArgs = globals.filter((v2) => isTriggerScopedInput2(v2, triggerNodeId));
|
|
37414
38286
|
const outArgs = globals.filter((v2) => v2.direction === "out");
|
|
37415
38287
|
const { nodes, edges, variableUpdates, scopedVariableIds } = flattenSubflows(rootNodes, rootEdges, subflows, variables?.variableUpdates);
|
|
37416
38288
|
const edgeMap = buildEdgeMap(edges);
|
|
@@ -37418,8 +38290,8 @@ function toServerlessWorkflow(triggerNodeId, rootNodes, rootEdges, name2, variab
|
|
|
37418
38290
|
const scope = {
|
|
37419
38291
|
nodeIds: new Set(nodes.map((n) => n.id)),
|
|
37420
38292
|
variableIds: /* @__PURE__ */ new Set([...globals.map((v2) => v2.id), ...scopedVariableIds]),
|
|
37421
|
-
loopNodeIds: new Set(nodes.filter((n) => n.data.type ===
|
|
37422
|
-
doWhileNodeIds: new Set(nodes.filter((n) => n.data.type ===
|
|
38293
|
+
loopNodeIds: new Set(nodes.filter((n) => n.data.type === LOOP_NODE_TYPE2).map((n) => n.id)),
|
|
38294
|
+
doWhileNodeIds: new Set(nodes.filter((n) => n.data.type === DOWHILE_NODE_TYPE2).map((n) => n.id)),
|
|
37423
38295
|
errorHandlingNodeIds: new Set(nodes.filter((n) => hasErrorHandling(n, edgeMap)).map((n) => n.id))
|
|
37424
38296
|
};
|
|
37425
38297
|
const outArgIds = new Set(outArgs.map((v2) => v2.id));
|
|
@@ -37432,7 +38304,7 @@ function toServerlessWorkflow(triggerNodeId, rootNodes, rootEdges, name2, variab
|
|
|
37432
38304
|
expressionErrors.push(...errors2);
|
|
37433
38305
|
rewrittenNodes.set(node.id, node);
|
|
37434
38306
|
}
|
|
37435
|
-
const document = dm().dsl("1.0.0").name(
|
|
38307
|
+
const document = dm().dsl("1.0.0").name(name ?? "workflow").version("0.0.1").namespace("default").metadata({ variables: { schema: toVariablesSchema(vars) } }).build({ validate: false });
|
|
37436
38308
|
const rewrittenTriggerNode = rewrittenNodes.get(triggerNodeId);
|
|
37437
38309
|
if (!rewrittenTriggerNode)
|
|
37438
38310
|
throw new Error(`Trigger node ${triggerNodeId} not found`);
|
|
@@ -37447,7 +38319,7 @@ function toServerlessWorkflow(triggerNodeId, rootNodes, rootEdges, name2, variab
|
|
|
37447
38319
|
}
|
|
37448
38320
|
function pruneOrphanedOutputMappings(node, outArgIds, nodeMap) {
|
|
37449
38321
|
const outputs = node.data.outputs;
|
|
37450
|
-
if (!outputs || !
|
|
38322
|
+
if (!outputs || !isEndNodeType2(node.data.type))
|
|
37451
38323
|
return node;
|
|
37452
38324
|
if (getEnclosingSubflowId(node.id, nodeMap) !== undefined)
|
|
37453
38325
|
return node;
|
|
@@ -37457,13 +38329,13 @@ function pruneOrphanedOutputMappings(node, outArgIds, nodeMap) {
|
|
|
37457
38329
|
return { ...node, data: { ...node.data, outputs: Object.fromEntries(live) } };
|
|
37458
38330
|
}
|
|
37459
38331
|
function buildEdgeMap(edges) {
|
|
37460
|
-
const
|
|
38332
|
+
const map2 = /* @__PURE__ */ new Map;
|
|
37461
38333
|
for (const edge of edges) {
|
|
37462
|
-
const list =
|
|
38334
|
+
const list = map2.get(edge.source) ?? [];
|
|
37463
38335
|
list.push(edge);
|
|
37464
|
-
|
|
38336
|
+
map2.set(edge.source, list);
|
|
37465
38337
|
}
|
|
37466
|
-
return
|
|
38338
|
+
return map2;
|
|
37467
38339
|
}
|
|
37468
38340
|
var WORKFLOW_START_ITEM = {
|
|
37469
38341
|
WorkflowStart: kw().set("${Object.entries($workflow.definition?.document?.metadata?.variables?.schema?.document?.properties || {}).reduce((acc, [name, def]) => ({ ...acc, [name]: def?.default }), {})}").output({ as: "${$input}" }).export({ as: "{ ...$context, variables: $output }" }).build({ validate: false })
|
|
@@ -37517,74 +38389,79 @@ function createNodeOutputMappings(nodeId, outputs) {
|
|
|
37517
38389
|
*/
|
|
37518
38390
|
export {
|
|
37519
38391
|
AGGREGATION_OPTIONS,
|
|
37520
|
-
|
|
38392
|
+
AgentInputNameCollisionError2 as AgentInputNameCollisionError,
|
|
38393
|
+
AmbiguousAgentInputRootError2 as AmbiguousAgentInputRootError,
|
|
37521
38394
|
BpmnServiceType,
|
|
37522
38395
|
CONDITIONS_BY_TYPE,
|
|
37523
38396
|
CONDITION_LABELS,
|
|
37524
|
-
CONNECTOR_PARAM_BUCKET_KEYS,
|
|
38397
|
+
CONNECTOR_PARAM_BUCKET_KEYS2 as CONNECTOR_PARAM_BUCKET_KEYS,
|
|
37525
38398
|
DEBUG_WEBHOOK_START_EVENT_PREFIX,
|
|
37526
|
-
DEFAULT_AGENT_INPUT_ENCODING,
|
|
38399
|
+
DEFAULT_AGENT_INPUT_ENCODING2 as DEFAULT_AGENT_INPUT_ENCODING,
|
|
37527
38400
|
DEFAULT_PACKAGE_INTENT,
|
|
37528
|
-
FLAT_SEP,
|
|
38401
|
+
FLAT_SEP2 as FLAT_SEP,
|
|
37529
38402
|
FREE_TEXT_CONDITIONS,
|
|
37530
|
-
ITERATOR_FIELDS,
|
|
38403
|
+
ITERATOR_FIELDS2 as ITERATOR_FIELDS,
|
|
37531
38404
|
LIST_CONDITIONS,
|
|
37532
38405
|
PASSTHROUGH_SCRIPT,
|
|
37533
38406
|
PRIMITIVE_GROUP_KEY,
|
|
37534
38407
|
PUBLISH_ENTRY_POINT_PREFIX,
|
|
37535
|
-
SCHEMA_CONTAINER_MARKER,
|
|
38408
|
+
SCHEMA_CONTAINER_MARKER2 as SCHEMA_CONTAINER_MARKER,
|
|
37536
38409
|
TRANSFORMATIONS_BY_TYPE,
|
|
37537
38410
|
TRANSFORMATION_OPTIONS,
|
|
37538
|
-
UnresolvedAgentInputTypeError,
|
|
38411
|
+
UnresolvedAgentInputTypeError2 as UnresolvedAgentInputTypeError,
|
|
37539
38412
|
VALUE_FREE_CONDITIONS,
|
|
37540
|
-
buildAgentInputTypeResolver,
|
|
38413
|
+
buildAgentInputTypeResolver2 as buildAgentInputTypeResolver,
|
|
38414
|
+
buildBindingMap2 as buildBindingMap,
|
|
37541
38415
|
buildCollectionAccessor,
|
|
37542
38416
|
buildSubflowScopedVarIdMap,
|
|
37543
|
-
canPruneAgentInputs,
|
|
37544
|
-
collectArtifactDescendants,
|
|
37545
|
-
collectCompositeConnectorInputs,
|
|
37546
|
-
collectInlineAgentClusterInputs,
|
|
37547
|
-
collectInlineAgentInputsFromAgent,
|
|
37548
|
-
compositeConnectorInputKey,
|
|
38417
|
+
canPruneAgentInputs2 as canPruneAgentInputs,
|
|
38418
|
+
collectArtifactDescendants2 as collectArtifactDescendants,
|
|
38419
|
+
collectCompositeConnectorInputs2 as collectCompositeConnectorInputs,
|
|
38420
|
+
collectInlineAgentClusterInputs2 as collectInlineAgentClusterInputs,
|
|
38421
|
+
collectInlineAgentInputsFromAgent2 as collectInlineAgentInputsFromAgent,
|
|
38422
|
+
compositeConnectorInputKey2 as compositeConnectorInputKey,
|
|
37549
38423
|
convertDotNotationToNested,
|
|
37550
38424
|
createNodeOutputMappings,
|
|
37551
38425
|
createOutputMapping,
|
|
37552
38426
|
deepTransformStrings,
|
|
37553
|
-
deriveAgentInputVariables,
|
|
37554
|
-
deriveMergedAgentInputVariables,
|
|
37555
|
-
detectAmbiguousAgentInputRoot,
|
|
38427
|
+
deriveAgentInputVariables2 as deriveAgentInputVariables,
|
|
38428
|
+
deriveMergedAgentInputVariables2 as deriveMergedAgentInputVariables,
|
|
38429
|
+
detectAmbiguousAgentInputRoot2 as detectAmbiguousAgentInputRoot,
|
|
37556
38430
|
escapeStringForCode,
|
|
37557
|
-
extractAgentInputName,
|
|
38431
|
+
extractAgentInputName2 as extractAgentInputName,
|
|
37558
38432
|
extractInputMetadata,
|
|
37559
38433
|
extractTelemetryData,
|
|
38434
|
+
findEmbeddedConnectorAssets2 as findEmbeddedConnectorAssets,
|
|
37560
38435
|
generateDataTransformScript,
|
|
37561
38436
|
generateFilterScript,
|
|
37562
38437
|
generateGroupByScript,
|
|
37563
38438
|
generateMapScript,
|
|
37564
38439
|
getConditionsForType,
|
|
37565
|
-
getContainerChildProps,
|
|
38440
|
+
getContainerChildProps2 as getContainerChildProps,
|
|
37566
38441
|
getDebugWebhookStartEventId,
|
|
37567
38442
|
getOperationScript,
|
|
37568
38443
|
getTransformationsForType,
|
|
37569
38444
|
implicitNodePrefix2 as implicitNodePrefix,
|
|
37570
|
-
|
|
38445
|
+
inferType,
|
|
38446
|
+
isCompositeConnectorValue2 as isCompositeConnectorValue,
|
|
37571
38447
|
isDataTransform,
|
|
38448
|
+
isDebuggableWebhookTriggerNode,
|
|
37572
38449
|
mapWebhookDebugEntryPoint,
|
|
37573
|
-
mergeCompositeConnectorInputs,
|
|
38450
|
+
mergeCompositeConnectorInputs2 as mergeCompositeConnectorInputs,
|
|
37574
38451
|
protectJsonStrings,
|
|
37575
38452
|
restoreJsonStrings,
|
|
37576
|
-
rewriteInputTokensToSource,
|
|
37577
|
-
rewriteStringsDeep,
|
|
38453
|
+
rewriteInputTokensToSource2 as rewriteInputTokensToSource,
|
|
38454
|
+
rewriteStringsDeep2 as rewriteStringsDeep,
|
|
37578
38455
|
rewriteWebhookTriggerStartEventIdForDebug,
|
|
37579
38456
|
rewriteWebhookTriggersForDebug,
|
|
37580
38457
|
safeParse,
|
|
37581
|
-
scanSourceRefsDeep,
|
|
38458
|
+
scanSourceRefsDeep2 as scanSourceRefsDeep,
|
|
37582
38459
|
scopeSubflowVarRefs,
|
|
37583
|
-
serializeTemplateInterpolations,
|
|
38460
|
+
serializeTemplateInterpolations2 as serializeTemplateInterpolations,
|
|
37584
38461
|
stripDAPOptionalConfiguration,
|
|
37585
38462
|
toServerlessWorkflow,
|
|
37586
38463
|
toXml,
|
|
37587
38464
|
walkAncestorCollectionLoops
|
|
37588
38465
|
};
|
|
37589
38466
|
|
|
37590
|
-
//# debugId=
|
|
38467
|
+
//# debugId=519CC9168F17FC7664756E2164756E21
|