@uipath/skills 1.199.0 → 1.200.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CODEOWNERS +14 -8
- package/README.md +18 -3
- package/assets/skill-status.json +9 -1
- package/assets/uip-catalog-snapshot.json +227 -21
- package/package.json +11 -2
- package/scripts/npm-package-lifecycle.mjs +46 -0
- package/skills/uipath-admin/SKILL.md +5 -1
- package/skills/uipath-admin/references/audit-commands.md +1 -1
- package/skills/uipath-admin/references/audit-workflow-guide.md +9 -0
- package/skills/uipath-agents/SKILL.md +2 -2
- package/skills/uipath-agents/references/lowcode/capabilities/context/index.md +7 -0
- package/skills/uipath-agents/references/lowcode/capabilities/integration-service/integration-service.md +5 -6
- package/skills/uipath-agents/references/lowcode/critical-rules/critical-rules.md +1 -1
- package/skills/uipath-agents/references/lowcode/evaluations/evaluation-sets.md +5 -0
- package/skills/uipath-agents/references/lowcode/project-lifecycle.md +3 -3
- package/skills/uipath-agents/references/lowcode/prompting/autonomous-agent-prompting-guide.md +3 -2
- package/skills/uipath-api-workflow/SKILL.md +2 -1
- package/skills/uipath-api-workflow/references/cli-reference.md +3 -3
- package/skills/uipath-coded-apps/SKILL.md +3 -2
- package/skills/uipath-coded-apps/assets/fixtures/governance-dashboard-starter-kit.tar.gz +0 -0
- package/skills/uipath-coded-apps/assets/templates/web-app-template.md +1 -1
- package/skills/uipath-coded-apps/references/create-web-app.md +60 -48
- package/skills/uipath-coded-apps/references/dashboards/CAPABILITY.md +2 -2
- package/skills/uipath-coded-apps/references/dashboards/plugins/build/impl.md +2 -2
- package/skills/uipath-coded-apps/references/dashboards/primitives/tier-resolution.md +16 -16
- package/skills/uipath-coded-apps/references/oauth-scopes.md +28 -272
- package/skills/uipath-coded-apps/references/sdk/action-center.md +26 -243
- package/skills/uipath-coded-apps/references/sdk/agents.md +20 -130
- package/skills/uipath-coded-apps/references/sdk/conversational-agent.md +52 -706
- package/skills/uipath-coded-apps/references/sdk/data-fabric.md +20 -237
- package/skills/uipath-coded-apps/references/sdk/feedback.md +4 -139
- package/skills/uipath-coded-apps/references/sdk/governance-traces.md +7 -55
- package/skills/uipath-coded-apps/references/sdk/governance.md +4 -44
- package/skills/uipath-coded-apps/references/sdk/imports.md +77 -35
- package/skills/uipath-coded-apps/references/sdk/maestro.md +29 -406
- package/skills/uipath-coded-apps/references/sdk/orchestrator.md +30 -324
- package/skills/uipath-coded-apps/references/sdk/pagination.md +9 -67
- package/skills/uipath-coded-apps/references/sdk/traces.md +8 -43
- package/skills/uipath-functions/SKILL.md +23 -23
- package/skills/uipath-governance/SKILL.md +5 -4
- package/skills/uipath-governance/references/cli-cheatsheet.md +2 -1
- package/skills/uipath-governance/references/compliance-pack/coverage/impl.md +143 -58
- package/skills/uipath-governance/references/compliance-pack/restore/impl.md +61 -0
- package/skills/uipath-human-in-the-loop/SKILL.md +4 -2
- package/skills/uipath-insights/SKILL.md +17 -18
- package/skills/uipath-ixp/SKILL.md +12 -7
- package/skills/uipath-ixp/references/cli-reference.md +71 -9
- package/skills/uipath-ixp/references/improve-prompts-guide.md +23 -9
- package/skills/uipath-ixp/references/label-documents-guide.md +33 -5
- package/skills/uipath-maestro-bpmn/SKILL.md +15 -14
- package/skills/uipath-maestro-bpmn/references/cli-conventions.md +15 -6
- package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +18 -17
- package/skills/uipath-maestro-case/SKILL.md +46 -33
- package/skills/uipath-maestro-case/assets/templates/sdd-template.md +77 -37
- package/skills/uipath-maestro-case/assets/templates/sdd-viewer.html +0 -2
- package/skills/uipath-maestro-case/references/bindings-and-expressions.md +3 -1
- package/skills/uipath-maestro-case/references/bindings-v2-sync.md +2 -2
- package/skills/uipath-maestro-case/references/brownfield.md +15 -5
- package/skills/uipath-maestro-case/references/case-commands.md +19 -3
- package/skills/uipath-maestro-case/references/case-editing-operations.md +24 -21
- package/skills/uipath-maestro-case/references/case-schema.md +38 -16
- package/skills/uipath-maestro-case/references/connector-trigger-common.md +15 -8
- package/skills/uipath-maestro-case/references/evals/evals.json +35 -18
- package/skills/uipath-maestro-case/references/implementation.md +86 -71
- package/skills/uipath-maestro-case/references/phase-0-interview.md +92 -23
- package/skills/uipath-maestro-case/references/phased-execution.md +70 -55
- package/skills/uipath-maestro-case/references/placeholder-tasks.md +5 -5
- package/skills/uipath-maestro-case/references/planning.md +57 -9
- package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +7 -5
- package/skills/uipath-maestro-case/references/plugins/case/planning.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +5 -5
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +41 -5
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +27 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +6 -6
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +20 -7
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +37 -4
- package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +24 -13
- package/skills/uipath-maestro-case/references/plugins/sla/planning.md +9 -3
- package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +4 -0
- package/skills/uipath-maestro-case/references/plugins/stages/planning.md +4 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +3 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +3 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +3 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +3 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +3 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +4 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +4 -0
- package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +17 -14
- package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +13 -10
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +18 -16
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +2 -2
- package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +1 -1
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +11 -9
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +6 -2
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +19 -1
- package/skills/uipath-maestro-case/references/registry-discovery.md +3 -3
- package/skills/uipath-maestro-case/references/sdd-generation-rules.md +155 -51
- package/skills/uipath-maestro-case/references/sla-response-shapes.md +74 -0
- package/skills/uipath-maestro-flow/SKILL.md +4 -3
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +3 -0
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +10 -17
- package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +1 -1
- package/skills/uipath-maestro-flow/references/author/references/greenfield.md +8 -6
- package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +1 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +4 -9
- package/skills/uipath-maestro-flow/references/author/references/plugins/agentic-process/impl.md +3 -7
- package/skills/uipath-maestro-flow/references/author/references/plugins/api-workflow/impl.md +5 -8
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +11 -4
- package/skills/uipath-maestro-flow/references/author/references/plugins/flow/impl.md +3 -7
- package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md +14 -17
- package/skills/uipath-maestro-flow/references/author/references/plugins/ixp/impl.md +60 -13
- package/skills/uipath-maestro-flow/references/author/references/plugins/queue/impl.md +2 -14
- package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +4 -9
- package/skills/uipath-maestro-flow/references/author/references/plugins/script/impl.md +3 -0
- package/skills/uipath-maestro-flow/references/author/references/plugins/subflow/impl.md +5 -9
- package/skills/uipath-maestro-flow/references/author/references/plugins/transform/impl.md +13 -0
- package/skills/uipath-maestro-flow/references/shared/action-nodes.md +2 -2
- package/skills/uipath-maestro-flow/references/shared/file-format.md +16 -12
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +3 -3
- package/skills/uipath-planner/SKILL.md +1 -1
- package/skills/uipath-planner/references/non-pdd-lane-guide.md +1 -1
- package/skills/uipath-platform/SKILL.md +1 -1
- package/skills/uipath-platform/references/data-fabric/bulk-import.md +10 -27
- package/skills/uipath-platform/references/data-fabric/choice-sets.md +7 -64
- package/skills/uipath-platform/references/data-fabric/data-fabric.md +76 -267
- package/skills/uipath-platform/references/data-fabric/entity-schema.md +23 -99
- package/skills/uipath-platform/references/data-fabric/file-attachments.md +5 -28
- package/skills/uipath-platform/references/data-fabric/filter-platform-contract.md +2 -2
- package/skills/uipath-platform/references/data-fabric/records-query.md +11 -32
- package/skills/uipath-platform/references/integration-service/reference-resolution.md +6 -2
- package/skills/uipath-platform/references/licensing/consumables-report.md +18 -0
- package/skills/uipath-platform/references/licensing/licensing.md +1 -1
- package/skills/uipath-platform/references/orchestrator/run-jobs.md +9 -2
- package/skills/uipath-platform/references/orchestrator/setup-environment.md +9 -0
- package/skills/uipath-platform/references/traces/feedback.md +4 -1
- package/skills/uipath-process-mining/SKILL.md +97 -0
- package/skills/uipath-process-mining/references/app-types.md +66 -0
- package/skills/uipath-process-mining/references/data-model.md +130 -0
- package/skills/uipath-process-mining/references/lifecycle-and-rbac.md +67 -0
- package/skills/uipath-process-mining/references/model-editing.md +112 -0
- package/skills/uipath-process-mining/references/pre-flight.md +119 -0
- package/skills/uipath-process-mining/references/querying.md +66 -0
- package/skills/uipath-process-mining/references/transformations.md +80 -0
- package/skills/uipath-process-mining/references/uip-pm-cli.md +145 -0
- package/skills/uipath-review/SKILL.md +23 -18
- package/skills/uipath-review/references/agents/agent-grading-rubric.md +1 -1
- package/skills/uipath-review/references/agents/agent-review-checklist.md +0 -4
- package/skills/uipath-review/references/agents/agents-coded-rules.md +1 -10
- package/skills/uipath-review/references/agents/agents-lowcode-rules.md +3 -6
- package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +62 -14
- package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +60 -4
- package/skills/uipath-review/references/review-workflow-guide.md +3 -2
- package/skills/uipath-review/references/rule-catalog-workflow.md +4 -5
- package/skills/uipath-rpa/.maintenance/pattern-card-maintenance.md +20 -0
- package/skills/uipath-rpa/SKILL.md +57 -55
- package/skills/uipath-rpa/agents/uipath-project-discovery-agent.md +75 -19
- package/skills/uipath-rpa/assets/codedworkflow-template.md +245 -11
- package/skills/uipath-rpa/references/cli-reference.md +229 -6
- package/skills/uipath-rpa/references/coded/codedworkflow-reference.md +158 -2
- package/skills/uipath-rpa/references/coded/integration-service-guide.md +6 -5
- package/skills/uipath-rpa/references/coded/operations-guide.md +273 -5
- package/skills/uipath-rpa/references/coded-vs-xaml-guide.md +3 -3
- package/skills/uipath-rpa/references/common-pattern-card.md +303 -0
- package/skills/uipath-rpa/references/data-manipulation-guide.md +18 -3
- package/skills/uipath-rpa/references/debugging.md +0 -2
- package/skills/uipath-rpa/references/environment-setup.md +309 -1
- package/skills/uipath-rpa/references/error-handling-guide.md +1 -1
- package/skills/uipath-rpa/references/execution-maps-guide.md +110 -0
- package/skills/uipath-rpa/references/is-connector-xaml-guide.md +58 -4
- package/skills/uipath-rpa/references/legacy/activity-docs/Excel.md +1 -1
- package/skills/uipath-rpa/references/legacy/activity-docs/_DU-PROCESS.md +0 -2
- package/skills/uipath-rpa/references/legacy/activity-docs/_INDEX.md +2 -2
- package/skills/uipath-rpa/references/legacy/activity-docs/_PATTERNS.md +1 -1
- package/skills/uipath-rpa/references/legacy/activity-docs/_REFRAMEWORK.md +2 -7
- package/skills/uipath-rpa/references/legacy/cli-reference.md +599 -0
- package/skills/uipath-rpa/references/legacy/error-handling-guide.md +2 -2
- package/skills/uipath-rpa/references/legacy/legacy-mode-guide.md +16 -16
- package/skills/uipath-rpa/references/legacy/project-organization-guide.md +2 -2
- package/skills/uipath-rpa/references/legacy/selector-guide.md +163 -1
- package/skills/uipath-rpa/references/legacy/testing-guide.md +246 -3
- package/skills/uipath-rpa/references/legacy/xaml-basics-and-rules.md +267 -2
- package/skills/uipath-rpa/references/library-authoring-guide.md +4 -3
- package/skills/uipath-rpa/references/testing-guide.md +2 -28
- package/skills/uipath-rpa/references/trigger-pattern-guide.md +1 -1
- package/skills/uipath-rpa/references/xaml/canvas-layout-guide.md +140 -33
- package/skills/uipath-rpa/references/xaml/common-pitfalls.md +57 -240
- package/skills/uipath-rpa/references/xaml/csharp-activity-binding-guide.md +42 -2
- package/skills/uipath-rpa/references/xaml/long-running-workflow-guide.md +1 -1
- package/skills/uipath-rpa/references/xaml/xaml-basics-and-rules.md +194 -228
- package/skills/uipath-solution/references/activate-and-manage.md +22 -0
- package/skills/uipath-solution/references/develop-solution.md +26 -2
- package/skills/uipath-solution/references/pack-and-deploy.md +43 -9
- package/skills/uipath-test/SKILL.md +4 -4
- package/skills/uipath-test/references/playwright-first-mile-guide.md +5 -4
- package/skills/uipath-test/references/publish-and-link-guide.md +2 -2
- package/skills/uipath-troubleshoot/references/activity-packages/classic-activities/playbooks/click-silent-no-op.md +5 -5
- package/skills/uipath-troubleshoot/references/activity-packages/classic-activities/playbooks/queue-operation-failed.md +20 -4
- package/skills/uipath-troubleshoot/references/activity-packages/classic-activities/summary.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/csv-activities/playbooks/read-csv-file-not-found.md +12 -0
- package/skills/uipath-troubleshoot/references/activity-packages/mail-activities/playbooks/send-outlook-mail-failures.md +12 -1
- package/skills/uipath-troubleshoot/references/activity-packages/system-activities/playbooks/get-asset-activity-bug-silent-failure.md +2 -1
- package/skills/uipath-troubleshoot/references/activity-packages/terminal-activities/playbooks/terminal-session-connection-failed.md +5 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/click-silent-no-op.md +5 -5
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/dependency-version-conflict.md +27 -6
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/napplicationcard-view-generation-failed.md +10 -0
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/scope-container-wrong-page.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/summary.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/overview.md +4 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/http-request-auth-401-403.md +44 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/http-request-connection-failure.md +2 -1
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/http-request-content-type-rejected.md +37 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/http-request-proxy-blocked.md +39 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/package-version-mismatch.md +42 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/playbooks/securestring-misuse-analyzer.md +41 -0
- package/skills/uipath-troubleshoot/references/activity-packages/web-activities/summary.md +5 -0
- package/skills/uipath-troubleshoot/references/products/integration-service/playbooks/connector-null-reference.md +14 -1
- package/skills/uipath-troubleshoot/references/products/integration-service/playbooks/connector-runtime-exception.md +2 -0
- package/skills/uipath-troubleshoot/references/products/integration-service/playbooks/is-activities-prerelease-not-found.md +39 -0
- package/skills/uipath-troubleshoot/references/products/integration-service/playbooks/response-content-too-large.md +41 -0
- package/skills/uipath-troubleshoot/references/products/integration-service/summary.md +9 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/console-conflict-login-to-console.md +40 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/credential-store-unavailable.md +42 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/executor-start-transient-rerun.md +49 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/job-consecutive-system-exceptions.md +47 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/job-faulted-session-timeout.md +19 -19
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/job-output-too-large.md +47 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/job-stopped-generic-exit-code.md +55 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/known-issue-robot-defect.md +40 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/platform-incident-correlation.md +45 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/screen-capture-handle-invalid.md +43 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/serverless-license-quota.md +43 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/serverless-time-limit-exceeded.md +34 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/playbooks/workstation-in-use-machine-slots.md +40 -0
- package/skills/uipath-troubleshoot/references/products/orchestrator/summary.md +13 -1
- package/version-manifest.json +2 -2
- package/skills/uipath-maestro-bpmn/validator/README.md +0 -224
- package/skills/uipath-maestro-bpmn/validator/model.mjs +0 -419
- package/skills/uipath-maestro-bpmn/validator/package.json +0 -17
- package/skills/uipath-maestro-bpmn/validator/rules.mjs +0 -1403
- package/skills/uipath-maestro-bpmn/validator/samples/invalid-conditional-and-variable.bpmn +0 -25
- package/skills/uipath-maestro-bpmn/validator/samples/valid-baseline.bpmn +0 -52
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/A.2.0.bpmn +0 -157
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/A.2.1.bpmn +0 -333
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/B.1.0.bpmn +0 -598
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/B.2.0.bpmn +0 -1709
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.2.0.bpmn +0 -564
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.3.0.bpmn +0 -671
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.4.0.bpmn +0 -1045
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.5.0.bpmn +0 -1176
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.6.0.bpmn +0 -670
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/C.7.0.bpmn +0 -466
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Can_Parse_Complex_Process_With_Task_Gateway_BoundaryEvent_etc.bpmn +0 -74
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/ExclusiveGatewayDefaultFlow.bpmn +0 -32
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/ExternalAgentWorkflow.bpmn +0 -62
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Golden_Scenario.initial.bpmn +0 -361
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/InclusiveJoinRouteAwayBranch.bpmn +0 -62
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Parse_AsyncExecution_And_Create_CorrectModel.bpmn +0 -74
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Parse_IXP_ExtractionValidation_And_Create_CorrectModel.bpmn +0 -35
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Parse_IXP_Extraction_FileUpload_And_Create_CorrectModel.bpmn +0 -33
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Parse_IXP_Extraction_JobAttachment_And_Create_CorrectModel.bpmn +0 -35
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/Parse_SubProcess_With_Multiple_Element_Types.bpmn +0 -76
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/StartEventWithOutputs.bpmn +0 -36
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/StartGatewayEnd.bpmn +0 -44
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/all elements.bpmn +0 -516
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/all_sequence_flow_types.bpmn +0 -173
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/demo.bpmn +0 -181
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/subprocess-example-001-collapsed.bpmn +0 -126
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/subprocess-example-001-expanded.bpmn +0 -122
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/expected-findings/subprocess-example-003-collapsed_deeply-nested.bpmn +0 -438
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/A.1.0.bpmn +0 -87
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/A.3.0.bpmn +0 -165
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ApiWorkflow.bpmn +0 -39
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/BpmnNestedSubProcessTests.bpmn +0 -102
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/BpmnTimerBoundaryEvents.bpmn +0 -160
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/BpmnXmlWithCatchAllErrorEventSubProcess.bpmn +0 -45
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/BpmnXmlWithSpecificErrorEventSubProcess.bpmn +0 -46
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/CaseManagementWithConstantIdentifier.bpmn +0 -218
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ErrorBoundary.bpmn +0 -78
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ErrorPropagationInEventSubprocess.bpmn +0 -340
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/EventBasedGatewayFirstCatcherWins.bpmn +0 -56
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Example-EventBasedGateway.bpmn +0 -117
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ExclusiveGatewayConditional.bpmn +0 -45
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ExclusiveGatewaySharedEndEvent.bpmn +0 -45
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ExclusiveWithParallelGateway.bpmn +0 -68
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/FourScriptTasks.bpmn +0 -84
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/HitlTaskOnly.bpmn +0 -55
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/InclusiveGatewayForkJoin.bpmn +0 -69
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Parse_BPMN_Elements_And_Create_CorrectModel.bpmn +0 -20
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Parse_HttpRequest_ServiceTask_And_Create_Correct_Model.bpmn +0 -34
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Parse_MessageBoundaryEvent_And_Create_CorrectModel.bpmn +0 -87
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Parse_Script_Task_V2_And_Create_Correct_Model.bpmn +0 -31
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/Parse_Sets_Containers_Properly.bpmn +0 -129
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/ScriptWritesVariableThenGatewayBranches.bpmn +0 -59
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/boundaryevent.bpmn +0 -30
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/collapsed-subprocess.bpmn +0 -83
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/connectable-types.bpmn +0 -85
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/extensions-orchestrator-start-job.bpmn +0 -80
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/multiparticipantpool.bpmn +0 -77
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/nestedsubprocess.bpmn +0 -36
- package/skills/uipath-maestro-bpmn/validator/test/fixtures/known-good/simple.bpmn +0 -59
- package/skills/uipath-maestro-bpmn/validator/test/integration.test.mjs +0 -146
- package/skills/uipath-maestro-bpmn/validator/test/model-helpers.mjs +0 -42
- package/skills/uipath-maestro-bpmn/validator/test/ported-rule-tests.mjs +0 -983
- package/skills/uipath-maestro-bpmn/validator/test/run-tests.mjs +0 -530
- package/skills/uipath-maestro-bpmn/validator/uipath-moddle.v1.json +0 -715
- package/skills/uipath-maestro-bpmn/validator/validate-bpmn.mjs +0 -164
- package/skills/uipath-review/references/agents/agents-common-rules.md +0 -32
- package/skills/uipath-rpa/assets/before-after-hooks-template.md +0 -115
- package/skills/uipath-rpa/assets/helper-utility-template.md +0 -22
- package/skills/uipath-rpa/assets/testcase-template.md +0 -92
- package/skills/uipath-rpa/references/coded/coding-guidelines.md +0 -255
- package/skills/uipath-rpa/references/coded/inspect-package-guide.md +0 -80
- package/skills/uipath-rpa/references/coded/third-party-packages-guide.md +0 -67
- package/skills/uipath-rpa/references/connector-capabilities.md +0 -79
- package/skills/uipath-rpa/references/legacy/activity-docs/Testing.md +0 -95
- package/skills/uipath-rpa/references/legacy/activity-docs/UIAutomation.md +0 -159
- package/skills/uipath-rpa/references/legacy/common-pitfalls.md +0 -318
- package/skills/uipath-rpa/references/legacy/discovery-workflow.md +0 -147
- package/skills/uipath-rpa/references/legacy/environment-setup.md +0 -78
- package/skills/uipath-rpa/references/legacy/project-structure.md +0 -206
- package/skills/uipath-rpa/references/legacy/test-data-guide.md +0 -142
- package/skills/uipath-rpa/references/legacy/validation-and-fixing.md +0 -154
- package/skills/uipath-rpa/references/project-structure-guide.md +0 -168
- package/skills/uipath-rpa/references/project-structure.md +0 -135
- package/skills/uipath-rpa/references/publishing-guide.md +0 -80
- package/skills/uipath-rpa/references/validation-guide.md +0 -170
- package/skills/uipath-rpa/references/xaml/csharp-expression-pitfalls.md +0 -43
- package/skills/uipath-rpa/references/xaml/flowchart-guide.md +0 -113
- package/skills/uipath-rpa/references/xaml/workflow-guide.md +0 -258
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# Maestro BPMN Validator (bundled, offline)
|
|
2
|
-
|
|
3
|
-
A dependency-light, offline semantic validator for UiPath Maestro BPMN XML. It
|
|
4
|
-
parses the BPMN with `bpmn-moddle` using the UiPath extension descriptor (the
|
|
5
|
-
same `getModdle()` + `fromXML()` pattern as PO.Frontend), reconstructs the
|
|
6
|
-
PO.Frontend `Node[] / Edge[] / CanvasState` model from the parse tree, and runs
|
|
7
|
-
**all 19** PO.Frontend validation rules plus the variable-validation checks
|
|
8
|
-
(`VARIABLE_DOES_NOT_EXIST`, including element-local `result.X`, and the
|
|
9
|
-
flow-order `VARIABLE_NOT_SET` warning) and an optional connection-liveness ping.
|
|
10
|
-
|
|
11
|
-
> **Authoring scope:** everything under `test/fixtures/` is validator test data,
|
|
12
|
-
> not authoring material. **Do not read the fixtures to infer the BPMN pattern**
|
|
13
|
-
> — it is the top reason authoring runs out of time. Author from the complete
|
|
14
|
-
> minimal file in
|
|
15
|
-
> [../references/structural-bpmn.md](../references/structural-bpmn.md#a-complete-minimal-file-author-from-this-not-from-fixtures)
|
|
16
|
-
> instead. This README documents the validator and its test suite; run the
|
|
17
|
-
> validator (below) as your check, and leave the corpus to CI.
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install
|
|
23
|
-
node validate-bpmn.mjs <bpmn-file> [resources]
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
- Prints `VALID` and exits `0` when there are no ERROR-severity findings.
|
|
27
|
-
- Otherwise lists every finding (rule code + message) and exits `1`.
|
|
28
|
-
- WARNING-severity findings are printed but do not gate.
|
|
29
|
-
- A strict XML well-formedness gate (sax strict mode) runs **before** the
|
|
30
|
-
`bpmn-moddle` parse and exits `2` on malformed input — unescaped `&`/`<`, `--`
|
|
31
|
-
inside a comment, mismatched tags. `bpmn-moddle`'s SAX parser is lenient and
|
|
32
|
-
would accept these, but the Studio Web canvas import rejects them, so the
|
|
33
|
-
validator must too: a safety net that is more permissive than the real import
|
|
34
|
-
gives false confidence.
|
|
35
|
-
- `resources` (optional): a numeric folder id (or comma-separated release names)
|
|
36
|
-
for the connection-liveness ping via the `uip` CLI. Best-effort; a missing or
|
|
37
|
-
unauthenticated CLI is reported as a NOTE, never a hard failure.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm test # runs all three suites below; green = no drift from the frontend
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Test suites (`test/`)
|
|
44
|
-
|
|
45
|
-
`npm test` runs the layers below and asserts all 29 rule codes are exercised
|
|
46
|
-
(plus a CLI well-formedness-gate check):
|
|
47
|
-
|
|
48
|
-
1. **Crafted-invalid XML coverage** (`run-tests.mjs`): for each rule, a minimal
|
|
49
|
-
BPMN that should trip exactly that rule's code, plus a check that valid twins
|
|
50
|
-
don't. Proves the full parse → model → rules pipeline end-to-end.
|
|
51
|
-
2. **Ported PO.Frontend rule tests** (`test/ported-rule-tests.mjs`): a 1:1
|
|
52
|
-
translation of every `PO.Frontend/src/services/validation/bpmn/rules/*.test.ts`
|
|
53
|
-
case plus the variable-validation cases from `VariableUtil.test.ts`
|
|
54
|
-
(173 assertions). Each case carries a `// FE:` comment naming the
|
|
55
|
-
originating frontend test and runs the same synthetic Node/Edge/CanvasState
|
|
56
|
-
graph through **our** rule engine. This is the primary drift detector: if our
|
|
57
|
-
port disagrees with a frontend test's expectation, this suite fails.
|
|
58
|
-
3. **Integration over real `.bpmn` files** (`test/integration.test.mjs`): every
|
|
59
|
-
file in `test/fixtures/` is a real, externally-validated artifact (backend
|
|
60
|
-
BpmnParser/Worker/Athena/V2-E2E TestData, and PO.Frontend editor mocks),
|
|
61
|
-
bundled so the suite is self-contained in CI. These files exist to exercise
|
|
62
|
-
the rule engine — they are **not** authoring templates; see the authoring-scope
|
|
63
|
-
note at the top before reaching for one as an example. `fixtures/known-good/`
|
|
64
|
-
must produce **zero** ERROR-severity findings; `fixtures/expected-findings/` assert
|
|
65
|
-
the exact ERROR codes the frontend would also raise (each verified by reading
|
|
66
|
-
the file). Set `MAESTRO_BPMN_TESTDATA` / `MAESTRO_BPMN_FRONTEND_MOCKS` to also
|
|
67
|
-
sweep a live corpus during development.
|
|
68
|
-
|
|
69
|
-
## Parity status
|
|
70
|
-
|
|
71
|
-
**Full parity with the PO.Frontend rule engine is now reached for every rule
|
|
72
|
-
except two clearly-bounded residuals (below).** Each rule is a faithful port of
|
|
73
|
-
the frontend rule of the same name: same inputs → same outputs, verified by the
|
|
74
|
-
1:1 ported test suite (frontend test inputs) and the real-`.bpmn` integration
|
|
75
|
-
corpus (zero ERROR findings on 31 known-good files; exact ERROR-code match on 28
|
|
76
|
-
expected-findings files).
|
|
77
|
-
|
|
78
|
-
### Closed gaps (now at parity)
|
|
79
|
-
|
|
80
|
-
1. **`RequiredFields` flags ABSENT required fields, not only present-but-empty.**
|
|
81
|
-
Frontend `RequiredFieldsRule.ts:24-27` + `ValidateRequiredFieldsInData.ts:15-16`
|
|
82
|
-
fire on `field.required && isNilOrEmpty(field.value)`. On canvas every field a
|
|
83
|
-
serviceType declares is present in node data, so an *unbound* required field is
|
|
84
|
-
present-with-empty-value. In exported BPMN that field is simply absent. The
|
|
85
|
-
model (`model.mjs`) attaches the serviceType's full registry required-field name
|
|
86
|
-
set (`bpmn-spec.json`, 128 `required` entries) as `uipath.requiredFieldNames`,
|
|
87
|
-
and the rule now treats an absent required name exactly as the frontend treats
|
|
88
|
-
an unbound field. Present-but-empty still fires too, in the frontend's
|
|
89
|
-
context → inputs → outputs order, one finding per node.
|
|
90
|
-
2. **`VARIABLE_NOT_SET` (WARNING) is now implemented.** Port of the flow-order
|
|
91
|
-
reachability half of `VariableUtil.validateVariablesInExpression`
|
|
92
|
-
(`VariableUtil.ts:758-866`), built on the pure topology helpers
|
|
93
|
-
`getSourceEdgeMappings` (`:121-130`), `mapNodeOutputsToVariables` (`:539-579`),
|
|
94
|
-
`getVariablesForSubProcess` (`:495-525`), `getAvailableVariablesFromSourceNodes`
|
|
95
|
-
(`:303-389`, backward BFS over sequence-flow edges + boundary re-parenting +
|
|
96
|
-
subprocess scope), and `getAvailableVariablesForElement` (`:401-481`, parent
|
|
97
|
-
chain + event-subprocess shared scope + subprocess EndEvent exposure). A
|
|
98
|
-
*declared* variable referenced where no flow path reaches its producer fires
|
|
99
|
-
`VARIABLE_NOT_SET` (WARNING, non-gating). **Skipped entirely for Case
|
|
100
|
-
Management** (`VariableUtil.ts:826-828`). Root variables are globally available
|
|
101
|
-
and never warn.
|
|
102
|
-
3. **`result.X` existence is now validated element-locally.** Frontend puts an
|
|
103
|
-
unresolved `result.X` in the non-existing set (`VariableUtil.ts:263`) and a
|
|
104
|
-
`result.X` is valid only if `X` names one of the *referencing element's own*
|
|
105
|
-
outputs (`isResultVariableValidForElement`, `:166-178`). The port previously
|
|
106
|
-
skipped all `result.` refs unconditionally; it now resolves `result.X` against
|
|
107
|
-
the element's own output identifiers and fires `VARIABLE_DOES_NOT_EXIST` for an
|
|
108
|
-
invalid one (edge conditions have no own outputs, so every `result.X` on an
|
|
109
|
-
edge is invalid, matching the frontend).
|
|
110
|
-
4. **`ConnectionRule` unknown-type fallback now returns `false`.** Frontend
|
|
111
|
-
`canNodeTypesBeConnected` (`BPMNTypesUtils.ts:51-82`) returns **false** when no
|
|
112
|
-
rule matches the source type, yielding `INVALID_CONNECTION_TYPE` (WARNING). The
|
|
113
|
-
port previously returned `true` for unknown source types; it now matches the
|
|
114
|
-
frontend. The abstract-type inheritance the frontend additionally walks is
|
|
115
|
-
already folded into our concrete allow-map (every concrete activity/event type
|
|
116
|
-
has an explicit entry), so an unknown source type genuinely has no rule. The
|
|
117
|
-
ported `ConnectionRule` test was un-doctored to the frontend's actual input
|
|
118
|
-
(source `"output"` → target `"input"`, both unknown) per `ConnectionRule.test.ts:33-43`.
|
|
119
|
-
5. **Custom-output accessor gating aligned to the frontend.** Both the existence
|
|
120
|
-
check and `VARIABLE_NOT_SET` now collect a custom output's `source` only when
|
|
121
|
-
`getAccessorFromType(type) === "source"`, and `body` only when the accessor is
|
|
122
|
-
`body` (`VariableUtil.ts:952-968`).
|
|
123
|
-
|
|
124
|
-
### Earlier fixes (already at parity before this round)
|
|
125
|
-
|
|
126
|
-
6. **Empty `<conditionExpression/>` crash — FIXED.** An empty condition element
|
|
127
|
-
parses to a moddle object with no `.body`; the model now treats it as "no
|
|
128
|
-
condition" (frontend behavior) instead of crashing the string-based rules.
|
|
129
|
-
7. **`FakeJoinRule` over-firing — FIXED (match frontend behavior).** See the
|
|
130
|
-
residual note below.
|
|
131
|
-
8. **`validateRequiredFields(null)` crash — FIXED.** Matches the frontend's
|
|
132
|
-
`if (!nodes || !edges) return []` guard.
|
|
133
|
-
9. **`VARIABLE_DOES_NOT_EXIST` false positives on node-output variables — FIXED.**
|
|
134
|
-
A node's `<uipath:output var="x">` declares variable `x`
|
|
135
|
-
(`mapNodeOutputsToVariables`: `id: v.var`); these are now in the known-id set,
|
|
136
|
-
and script-task IO under `uipath:Mapping` is recognized.
|
|
137
|
-
|
|
138
|
-
## Genuine residuals (the only two)
|
|
139
|
-
|
|
140
|
-
These are the **only** places this port is not byte-for-byte identical to the
|
|
141
|
-
frontend, and both are bounded and justified — not drift.
|
|
142
|
-
|
|
143
|
-
- **Dynamic IS-connector required-ness needs `registry get` enrichment (shared
|
|
144
|
-
with the frontend).** For Integration-Service connector activity types whose
|
|
145
|
-
required fields are NOT in the static `bpmn-spec.json` registry — their
|
|
146
|
-
required-ness only materializes after a live `registry get` enrichment — the
|
|
147
|
-
model has no `requiredFieldNames`, so `RequiredFields` stays conservative
|
|
148
|
-
(only present-but-empty fires; absence cannot be judged). **The frontend has
|
|
149
|
-
the identical limitation:** it also needs that enrichment to learn the field is
|
|
150
|
-
required. For every serviceType present in the static registry, absent-required
|
|
151
|
-
detection is at full parity.
|
|
152
|
-
- **`FAKE_JOIN` is dormant on real/exported BPMN (faithful to the frontend).**
|
|
153
|
-
The frontend `FakeJoinRule` matches only the **literal** abstract types
|
|
154
|
-
`"bpmn:Activity"` / `"bpmn:Event"`, but the canvas assigns every node its
|
|
155
|
-
**concrete** `$type` (`bpmn:Task`, `bpmn:EndEvent`, …; `bpmn-from-xml.ts` sets
|
|
156
|
-
`type: $type`). The rule therefore never fires on exported BPMN — its own
|
|
157
|
-
source carries a `TODO` admitting it must be rewritten to walk the inherited-
|
|
158
|
-
type chain, which it does not yet do. The port applies the frontend's exact
|
|
159
|
-
predicate, so it is faithful (same inputs → same outputs); its logic is proven
|
|
160
|
-
in the ported suite (which feeds literal abstract types, like the frontend
|
|
161
|
-
test) and is intentionally not triggerable via real XML.
|
|
162
|
-
|
|
163
|
-
## Architecture (Phase 1 → Phase 2)
|
|
164
|
-
|
|
165
|
-
| File | Role |
|
|
166
|
-
| --- | --- |
|
|
167
|
-
| `rules.mjs` | **Self-contained rule engine** — the swap target. In Phase 2 this single module is replaced by the published npm package with no behavior change. |
|
|
168
|
-
| `model.mjs` | Integration glue: reconstructs the frontend model from the moddle tree; bundles registry metadata. |
|
|
169
|
-
| `validate-bpmn.mjs` | CLI entry: parse → build model → run rules → gate. |
|
|
170
|
-
| `bpmn-spec.json` | Bundled maestro-sdk registry, consumed offline for RequiredFields. |
|
|
171
|
-
| `uipath-moddle.v1.json` | Verbatim UiPath moddle descriptor from PO.Frontend. |
|
|
172
|
-
|
|
173
|
-
## Rule coverage
|
|
174
|
-
|
|
175
|
-
Each rule is a faithful port of the PO.Frontend rule of the same name. Source
|
|
176
|
-
column shows where the rule's truth comes from offline.
|
|
177
|
-
|
|
178
|
-
| # | Rule (PO.Frontend) | Source | Codes emitted |
|
|
179
|
-
| --- | --- | --- | --- |
|
|
180
|
-
| 1 | ConditionalFlow | XML graph | `MISSING_CONDITION_EXPRESSION` |
|
|
181
|
-
| 2 | Connection | XML graph | `INVALID_CONNECTION`, `INVALID_CONNECTION_TYPE` |
|
|
182
|
-
| 3 | DuplicateErrorEventSubprocess | XML graph + `bpmn:Error` objects | `MULTIPLE_CATCH_ALL_ERROR_EVENT_SUBPROCESS`, `DUPLICATE_ERROR_EVENT_SUBPROCESS` |
|
|
183
|
-
| 4 | EmptyStartEventDefinitionInSubProcess | XML graph | `START_EVENT_WITH_DEFINITION_IN_SUBPROCESS`, `START_EVENT_WITHOUT_DEFINITION_IN_EVENT_SUBPROCESS`, `INVALID_EVENT_DEFINITION_IN_EVENT_SUBPROCESS` |
|
|
184
|
-
| 5 | ErrorBoundaryEvent | XML graph + `bpmn:Error` objects | `ERROR_BOUNDARY_EVENT_EMPTY_ERROR_REF`, `ERROR_BOUNDARY_EVENT_REQUIRES_ERROR_CODE`, `MULTIPLE_CATCH_ALL_BOUNDARY_EVENTS_ON_TASK`, `DUPLICATE_ERROR_BOUNDARY_EVENT_ON_TASK` |
|
|
185
|
-
| 6 | ErrorEndEvent | XML graph | `ERROR_END_EVENT_MISSING_EXCEPTION` |
|
|
186
|
-
| 7 | FakeJoin | XML graph | `FAKE_JOIN` |
|
|
187
|
-
| 8 | MessageFlowObjectsPool | XML graph (pools) | `SAME_POOL_MESSAGE_FLOW` |
|
|
188
|
-
| 9 | MissingResource | XML extension (`serviceType` + bindings) | `MISSING_RESOURCE` (WARNING) |
|
|
189
|
-
| 10 | MissingRootVariable | XML extension (variables + outputs) | `MISSING_ROOT_VARIABLE` (WARNING) |
|
|
190
|
-
| 11 | NoAssignments | Pure check on expressions | `ASSIGNMENT_NOT_ALLOWED` (WARNING) |
|
|
191
|
-
| 12 | RequiredFields | **Registry metadata** (`bpmn-spec.json`) | `EMPTY_REQUIRED_FIELD` |
|
|
192
|
-
| 13 | SequenceFlowPoolCrossing | XML graph (pools) | `CROSSING_POOL_BOUNDARY` |
|
|
193
|
-
| 14 | SequenceFlowSubProcessCrossing | XML graph | `CROSSING_SUBPROCESS_BOUNDARY` |
|
|
194
|
-
| 15 | SingleBlankStartEvent | XML graph | `MULTIPLE_BLANK_START_EVENTS` |
|
|
195
|
-
| 16 | SingleStartEventInEventSubProcess | XML graph | `MULTIPLE_START_EVENTS_IN_EVENT_SUBPROCESS` |
|
|
196
|
-
| 17 | SuperfluousGateway | XML graph | `SUPERFLUOUS_GATEWAY` |
|
|
197
|
-
| 18 | TaskTimer | Pure check (range) | `TASK_TIMER_OUT_OF_RANGE` (WARNING) |
|
|
198
|
-
| 19 | TimerDuration | Pure check (ISO 8601) | `TIMER_DURATION_INVALID`, `TIMER_DURATION_WEEK_UNSUPPORTED` (WARNING) |
|
|
199
|
-
| + | Variable existence (incl. element-local `result.X`) | XML extension + declared variables | `VARIABLE_DOES_NOT_EXIST` |
|
|
200
|
-
| + | Variable-not-set (flow-order reachability) | XML topology + declared variables | `VARIABLE_NOT_SET` (WARNING) |
|
|
201
|
-
|
|
202
|
-
## RequiredFields parity note
|
|
203
|
-
|
|
204
|
-
The PO.Frontend `RequiredFields` rule fires when `field.required && isNilOrEmpty(field.value)`
|
|
205
|
-
(`ValidateRequiredFieldsInData.ts:15-16`). On the canvas every field a serviceType
|
|
206
|
-
declares is present in node data with its `required` flag, so an *unbound*
|
|
207
|
-
required field is present-with-empty-value and is flagged.
|
|
208
|
-
|
|
209
|
-
Offline, `field.required` is recovered from the bundled registry
|
|
210
|
-
(`bpmn-spec.json`, 128 `required` entries keyed by serviceType; names are the
|
|
211
|
-
serialized names) and the model attaches the full required-name set as
|
|
212
|
-
`uipath.requiredFieldNames`. The rule fires for a required field that is either
|
|
213
|
-
**present-but-empty** OR entirely **absent** from the serialized data (an absent
|
|
214
|
-
required field is the exported-BPMN form of the canvas's unbound field), in the
|
|
215
|
-
frontend's context → inputs → outputs order, one finding per node. This reaches
|
|
216
|
-
full parity for every serviceType present in the static registry.
|
|
217
|
-
|
|
218
|
-
The single bounded exception is dynamic Integration-Service connector activity
|
|
219
|
-
types whose required-ness is **not** in the static registry (it only
|
|
220
|
-
materializes after a live `registry get` enrichment): for those,
|
|
221
|
-
`requiredFieldNames` is undefined and absence cannot be judged, so the rule stays
|
|
222
|
-
conservative (only present-but-empty fires). The frontend shares this exact
|
|
223
|
-
limitation — it also needs the enrichment to know the field is required. See
|
|
224
|
-
"Genuine residuals" above.
|
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
// Reconstruct the PO.Frontend Node[]/Edge[]/CanvasState model from a parsed
|
|
2
|
-
// bpmn-moddle tree. This is the integration layer (Phase 1). It mirrors
|
|
3
|
-
// PO.Frontend/src/services/serialization/bpmn-from-xml.ts closely enough that
|
|
4
|
-
// the ported rule engine in rules.mjs sees the same fields it sees on canvas.
|
|
5
|
-
//
|
|
6
|
-
// PHASE 2 NOTE: this file and validate-bpmn.mjs are the only integration glue.
|
|
7
|
-
// rules.mjs (the rule logic) is the swap target for the future npm package.
|
|
8
|
-
|
|
9
|
-
import { readFileSync } from "fs";
|
|
10
|
-
import { fileURLToPath } from "url";
|
|
11
|
-
import { dirname, join } from "path";
|
|
12
|
-
|
|
13
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
|
|
15
|
-
// ---------------------------------------------------------------------------
|
|
16
|
-
// Registry: required-field metadata (bpmn-spec.json). Bundled so RequiredFields
|
|
17
|
-
// runs fully offline. Maps serviceType -> Set<requiredFieldName>.
|
|
18
|
-
// ---------------------------------------------------------------------------
|
|
19
|
-
let _requiredFieldIndex;
|
|
20
|
-
function loadRequiredFieldIndex() {
|
|
21
|
-
if (_requiredFieldIndex) return _requiredFieldIndex;
|
|
22
|
-
const index = new Map();
|
|
23
|
-
try {
|
|
24
|
-
const spec = JSON.parse(readFileSync(join(__dirname, "bpmn-spec.json"), "utf8"));
|
|
25
|
-
for (const [serviceType, def] of Object.entries(spec.extensionTypes ?? {})) {
|
|
26
|
-
const names = new Set();
|
|
27
|
-
for (const f of def.contextFields ?? []) {
|
|
28
|
-
// Only fields the user can actually populate. Hidden fields with a
|
|
29
|
-
// default are auto-filled by the designer and never empty in practice,
|
|
30
|
-
// so requiring them offline would false-positive; skip hidden+defaulted.
|
|
31
|
-
if (f.required && !(f.hidden && f.defaultValue !== null && f.defaultValue !== undefined)) {
|
|
32
|
-
names.add(f.name);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
for (const f of def.inputFields ?? []) {
|
|
36
|
-
if (f.required) names.add(f.name);
|
|
37
|
-
}
|
|
38
|
-
if (names.size) index.set(serviceType, names);
|
|
39
|
-
}
|
|
40
|
-
} catch {
|
|
41
|
-
// Registry not bundled: RequiredFields degrades to a no-op (documented).
|
|
42
|
-
}
|
|
43
|
-
_requiredFieldIndex = index;
|
|
44
|
-
return index;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// ---------------------------------------------------------------------------
|
|
48
|
-
// moddle helpers
|
|
49
|
-
// ---------------------------------------------------------------------------
|
|
50
|
-
const ext = (el) => el?.extensionElements?.values ?? [];
|
|
51
|
-
const findExt = (el, type) => ext(el).find((e) => e.$type === type);
|
|
52
|
-
|
|
53
|
-
function eventDefinitionOf(el) {
|
|
54
|
-
const defs = el?.eventDefinitions;
|
|
55
|
-
if (!defs || !defs.length) return undefined;
|
|
56
|
-
const d = defs[0];
|
|
57
|
-
const out = { type: d.$type, id: d.id };
|
|
58
|
-
if (d.errorRef) out.errorRef = d.errorRef.id ?? d.errorRef;
|
|
59
|
-
if (d.messageRef) out.messageRef = d.messageRef.id ?? d.messageRef;
|
|
60
|
-
if (d.signalRef) out.signalRef = d.signalRef.id ?? d.signalRef;
|
|
61
|
-
if (d.escalationRef) out.escalationRef = d.escalationRef.id ?? d.escalationRef;
|
|
62
|
-
if (d.$type === "bpmn:TimerEventDefinition") {
|
|
63
|
-
if (d.timeDuration) {
|
|
64
|
-
out.timerType = "timeDuration";
|
|
65
|
-
out.timeDuration = d.timeDuration.body ?? d.timeDuration;
|
|
66
|
-
} else if (d.timeCycle) {
|
|
67
|
-
out.timerType = "timeCycle";
|
|
68
|
-
out.timeCycle = d.timeCycle.body ?? d.timeCycle;
|
|
69
|
-
} else if (d.timeDate) {
|
|
70
|
-
out.timerType = "timeDate";
|
|
71
|
-
out.timeDate = d.timeDate.body ?? d.timeDate;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return out;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Map a uipath:Activity / uipath:Event extension element into the frontend
|
|
78
|
-
// `node.data.uipath` shape consumed by the rules.
|
|
79
|
-
function mapUiPathActivity(actEl) {
|
|
80
|
-
const uipath = {};
|
|
81
|
-
uipath.serviceType = actEl.type?.value ?? actEl.type ?? undefined;
|
|
82
|
-
uipath.version = actEl.type?.version ?? actEl.version ?? "v1";
|
|
83
|
-
|
|
84
|
-
const mapInput = (i) => ({ name: i.name, type: i.type, subType: i.subType, value: i.value, target: i.target, body: i.body });
|
|
85
|
-
const mapOutput = (o) => ({
|
|
86
|
-
name: o.name,
|
|
87
|
-
type: o.type,
|
|
88
|
-
subType: o.subType,
|
|
89
|
-
source: o.source,
|
|
90
|
-
var: o.var,
|
|
91
|
-
body: o.body,
|
|
92
|
-
custom: o.custom === "true" || o.custom === true,
|
|
93
|
-
target: o.target,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
uipath.context = (actEl.context?.input ?? []).map(mapInput);
|
|
97
|
-
uipath.inputs = (actEl.input ?? []).map(mapInput);
|
|
98
|
-
uipath.outputs = (actEl.output ?? []).map(mapOutput);
|
|
99
|
-
return uipath;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function mapErrorMapping(emEl) {
|
|
103
|
-
return (emEl?.error ?? []).map((e) => ({
|
|
104
|
-
id: e.id,
|
|
105
|
-
errorRef: e.errorRef,
|
|
106
|
-
priority: e.priority,
|
|
107
|
-
condition: e.condition,
|
|
108
|
-
detail: e.detail,
|
|
109
|
-
retryable: e.retryable === "true" || e.retryable === true,
|
|
110
|
-
}));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function mapVariables(varsEl) {
|
|
114
|
-
if (!varsEl) return undefined;
|
|
115
|
-
const map = (v) => ({
|
|
116
|
-
id: v.id,
|
|
117
|
-
name: v.name,
|
|
118
|
-
type: v.type,
|
|
119
|
-
subType: v.subType,
|
|
120
|
-
canonicalId: v.canonicalId,
|
|
121
|
-
elementId: v.elementId,
|
|
122
|
-
default: v.default,
|
|
123
|
-
});
|
|
124
|
-
return {
|
|
125
|
-
inputs: (varsEl.input ?? []).map(map),
|
|
126
|
-
inputOutputs: (varsEl.inputOutput ?? []).map(map),
|
|
127
|
-
outputs: (varsEl.output ?? []).map(map),
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Populate node.data.uipath from a flow element's extensionElements.
|
|
132
|
-
// `requiredFieldIndex` supplies, per serviceType, the registry's required field
|
|
133
|
-
// names; matching serialized fields get `required: true` so RequiredFields can
|
|
134
|
-
// run offline with the same `field.required && isNilOrEmpty(value)` semantics
|
|
135
|
-
// the canvas uses.
|
|
136
|
-
function buildNodeUiPath(el, requiredFieldIndex) {
|
|
137
|
-
// Script tasks / BPMN.Variables nodes carry their IO under uipath:Mapping,
|
|
138
|
-
// which has the same { type, context, input, output } shape as
|
|
139
|
-
// uipath:Activity / uipath:Event. Treat all three uniformly so node-output
|
|
140
|
-
// variables (e.g. a script writing `var="x"`) are recovered.
|
|
141
|
-
const act = findExt(el, "uipath:Activity") ?? findExt(el, "uipath:Event") ?? findExt(el, "uipath:Mapping");
|
|
142
|
-
const em = findExt(el, "uipath:ErrorMapping");
|
|
143
|
-
const vars = findExt(el, "uipath:Variables");
|
|
144
|
-
let uipath;
|
|
145
|
-
if (act) uipath = mapUiPathActivity(act);
|
|
146
|
-
if (em) {
|
|
147
|
-
uipath = uipath ?? {};
|
|
148
|
-
uipath.errorMapping = mapErrorMapping(em);
|
|
149
|
-
}
|
|
150
|
-
if (vars) {
|
|
151
|
-
uipath = uipath ?? {};
|
|
152
|
-
uipath.variables = mapVariables(vars);
|
|
153
|
-
}
|
|
154
|
-
// Mark required fields from the registry onto serialized fields by name match,
|
|
155
|
-
// and attach the full required-name set so RequiredFieldsRule can also detect
|
|
156
|
-
// required fields that are entirely ABSENT from the serialized data (frontend
|
|
157
|
-
// RequiredFieldsRule iterates every field in the node's data and fires on
|
|
158
|
-
// `field.required && isNilOrEmpty(field.value)` — an unbound required field is
|
|
159
|
-
// present-with-empty-value on canvas, which corresponds to absent-in-XML here).
|
|
160
|
-
const st = uipath?.serviceType;
|
|
161
|
-
const requiredNames = st ? requiredFieldIndex.get(st) : undefined;
|
|
162
|
-
if (requiredNames) {
|
|
163
|
-
for (const group of [uipath.context, uipath.inputs, uipath.outputs]) {
|
|
164
|
-
if (!Array.isArray(group)) continue;
|
|
165
|
-
for (const f of group) if (requiredNames.has(f.name)) f.required = true;
|
|
166
|
-
}
|
|
167
|
-
uipath.requiredFieldNames = [...requiredNames];
|
|
168
|
-
}
|
|
169
|
-
return uipath;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const ABSTRACT_ACTIVITY = new Set([
|
|
173
|
-
"bpmn:Task",
|
|
174
|
-
"bpmn:ServiceTask",
|
|
175
|
-
"bpmn:UserTask",
|
|
176
|
-
"bpmn:ScriptTask",
|
|
177
|
-
"bpmn:SendTask",
|
|
178
|
-
"bpmn:ReceiveTask",
|
|
179
|
-
"bpmn:BusinessRuleTask",
|
|
180
|
-
"bpmn:ManualTask",
|
|
181
|
-
"bpmn:CallActivity",
|
|
182
|
-
"bpmn:SubProcess",
|
|
183
|
-
"bpmn:AdHocSubProcess",
|
|
184
|
-
"bpmn:Transaction",
|
|
185
|
-
]);
|
|
186
|
-
const ABSTRACT_EVENT = new Set([
|
|
187
|
-
"bpmn:StartEvent",
|
|
188
|
-
"bpmn:EndEvent",
|
|
189
|
-
"bpmn:IntermediateCatchEvent",
|
|
190
|
-
"bpmn:IntermediateThrowEvent",
|
|
191
|
-
"bpmn:BoundaryEvent",
|
|
192
|
-
]);
|
|
193
|
-
function abstractTypeOf(type) {
|
|
194
|
-
if (ABSTRACT_ACTIVITY.has(type)) return "bpmn:Activity";
|
|
195
|
-
if (ABSTRACT_EVENT.has(type)) return "bpmn:Event";
|
|
196
|
-
return undefined;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// ---------------------------------------------------------------------------
|
|
200
|
-
// Build a flat Node for one flow element. `parentId`/`parentElement` describe
|
|
201
|
-
// the containing Process or SubProcess.
|
|
202
|
-
// ---------------------------------------------------------------------------
|
|
203
|
-
function buildNode(el, parent, requiredFieldIndex) {
|
|
204
|
-
const data = {};
|
|
205
|
-
data.label = el.name ?? undefined;
|
|
206
|
-
|
|
207
|
-
const ed = eventDefinitionOf(el);
|
|
208
|
-
if (ed) data.eventDefinition = ed;
|
|
209
|
-
|
|
210
|
-
if (el.$type === "bpmn:SubProcess") data.triggeredByEvent = el.triggeredByEvent === true;
|
|
211
|
-
if (el.$type === "bpmn:BoundaryEvent" && el.attachedToRef) data.attachedToId = el.attachedToRef.id ?? el.attachedToRef;
|
|
212
|
-
|
|
213
|
-
const uipath = buildNodeUiPath(el, requiredFieldIndex);
|
|
214
|
-
if (uipath) data.uipath = uipath;
|
|
215
|
-
|
|
216
|
-
if (parent) data.parentElement = { id: parent.id, type: parent.$type };
|
|
217
|
-
|
|
218
|
-
return {
|
|
219
|
-
id: el.id,
|
|
220
|
-
type: el.$type,
|
|
221
|
-
parentId: parent && parent.$type === "bpmn:SubProcess" ? parent.id : undefined,
|
|
222
|
-
abstractType: abstractTypeOf(el.$type),
|
|
223
|
-
data,
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function buildEdge(el, parent) {
|
|
228
|
-
const data = {};
|
|
229
|
-
if (el.name) data.label = el.name;
|
|
230
|
-
if (el.conditionExpression) {
|
|
231
|
-
// A FormalExpression moddle element carries its text in `.body`; an empty
|
|
232
|
-
// `<conditionExpression/>` element has no `.body` (undefined). Only a real
|
|
233
|
-
// string body is a condition — never fall back to the moddle object itself,
|
|
234
|
-
// which would crash the string-based rules (matches frontend: an empty
|
|
235
|
-
// conditionExpression element means "no condition expression").
|
|
236
|
-
let body = el.conditionExpression.body ?? el.conditionExpression;
|
|
237
|
-
if (typeof body === "string") {
|
|
238
|
-
if (body && !body.startsWith("=")) body = `=${body}`;
|
|
239
|
-
data.conditionExpression = body;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
// defaultFlow: source gateway's @default points to this flow.
|
|
243
|
-
const source = el.sourceRef;
|
|
244
|
-
if (source?.default && (source.default.id ?? source.default) === el.id) data.defaultFlow = true;
|
|
245
|
-
if (parent) data.parentElement = { id: parent.id, type: parent.$type };
|
|
246
|
-
return {
|
|
247
|
-
id: el.id,
|
|
248
|
-
type: el.$type,
|
|
249
|
-
source: el.sourceRef?.id ?? el.sourceRef,
|
|
250
|
-
target: el.targetRef?.id ?? el.targetRef,
|
|
251
|
-
data,
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
const FLOW_EDGE_TYPES = new Set(["bpmn:SequenceFlow", "bpmn:MessageFlow", "bpmn:Association"]);
|
|
256
|
-
|
|
257
|
-
// Recursively collect nodes & edges for one container (Process or SubProcess).
|
|
258
|
-
// `rootParentId` is the parentId assigned to the container's direct flow nodes:
|
|
259
|
-
// undefined for a stand-alone process (frontend root scope), or the pool id
|
|
260
|
-
// when the process is contained in a collaboration participant. Sub-process
|
|
261
|
-
// children carry parentId = sub-process id (frontend behavior).
|
|
262
|
-
function collectContainer(container, requiredFieldIndex, nodesOut, edgesOut, rootParentId) {
|
|
263
|
-
const flowElements = container.flowElements ?? [];
|
|
264
|
-
for (const el of flowElements) {
|
|
265
|
-
if (FLOW_EDGE_TYPES.has(el.$type)) {
|
|
266
|
-
edgesOut.push(buildEdge(el, container));
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
const node = buildNode(el, container, requiredFieldIndex);
|
|
270
|
-
// Override parentId for direct children of a Process container.
|
|
271
|
-
if (container.$type === "bpmn:Process") node.parentId = rootParentId;
|
|
272
|
-
nodesOut.push(node);
|
|
273
|
-
if (el.$type === "bpmn:SubProcess") {
|
|
274
|
-
collectContainer(el, requiredFieldIndex, nodesOut, edgesOut, rootParentId);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function buildRootUiPath(processEl) {
|
|
280
|
-
const vars = findExt(processEl, "uipath:Variables");
|
|
281
|
-
if (!vars) return undefined;
|
|
282
|
-
return { variables: mapVariables(vars) };
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// ---------------------------------------------------------------------------
|
|
286
|
-
// Public: build the full model (CanvasState-like) from a moddle definitions.
|
|
287
|
-
// ---------------------------------------------------------------------------
|
|
288
|
-
export function buildModel(definitions) {
|
|
289
|
-
const requiredFieldIndex = loadRequiredFieldIndex();
|
|
290
|
-
const rootElements = definitions.rootElements ?? [];
|
|
291
|
-
|
|
292
|
-
// Global event objects (Errors/Messages/Signals/Escalations).
|
|
293
|
-
const objects = { errors: [], messages: [], signals: [], escalations: [] };
|
|
294
|
-
for (const el of rootElements) {
|
|
295
|
-
if (el.$type === "bpmn:Error") objects.errors.push({ id: el.id, name: el.name, errorCode: el.errorCode });
|
|
296
|
-
else if (el.$type === "bpmn:Message") objects.messages.push({ id: el.id, name: el.name });
|
|
297
|
-
else if (el.$type === "bpmn:Signal") objects.signals.push({ id: el.id, name: el.name });
|
|
298
|
-
else if (el.$type === "bpmn:Escalation") objects.escalations.push({ id: el.id, name: el.name, escalationCode: el.escalationCode });
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
const collaboration = rootElements.find((e) => e.$type === "bpmn:Collaboration");
|
|
302
|
-
const processes = rootElements.filter((e) => e.$type === "bpmn:Process");
|
|
303
|
-
const processById = new Map(processes.map((p) => [p.id, p]));
|
|
304
|
-
|
|
305
|
-
const diagramsById = {};
|
|
306
|
-
let rootDiagramId;
|
|
307
|
-
let rootNode;
|
|
308
|
-
|
|
309
|
-
const procContainerNode = (proc, parentId) => ({
|
|
310
|
-
id: proc.id,
|
|
311
|
-
type: "bpmn:Process",
|
|
312
|
-
parentId,
|
|
313
|
-
abstractType: undefined,
|
|
314
|
-
data: { label: proc.name, uipath: buildRootUiPath(proc) },
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
if (collaboration) {
|
|
318
|
-
// Single collaboration diagram: pools + every participant's process flow
|
|
319
|
-
// nodes, with collaboration-level message flows. Pool lookup (walk parentId
|
|
320
|
-
// up to bpmn:Participant) resolves because each process's flow nodes get
|
|
321
|
-
// parentId = pool id, and the Process container node sits under the pool.
|
|
322
|
-
const nodes = [];
|
|
323
|
-
const edges = [];
|
|
324
|
-
for (const p of collaboration.participants ?? []) {
|
|
325
|
-
nodes.push({
|
|
326
|
-
id: p.id,
|
|
327
|
-
type: "bpmn:Participant",
|
|
328
|
-
parentId: undefined,
|
|
329
|
-
abstractType: undefined,
|
|
330
|
-
data: { label: p.name, processRef: p.processRef?.id ?? p.processRef },
|
|
331
|
-
});
|
|
332
|
-
const proc = processById.get(p.processRef?.id ?? p.processRef);
|
|
333
|
-
if (proc) {
|
|
334
|
-
nodes.push(procContainerNode(proc, p.id));
|
|
335
|
-
collectContainer(proc, requiredFieldIndex, nodes, edges, p.id);
|
|
336
|
-
if (!rootNode) rootNode = procContainerNode(proc, undefined);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
for (const mf of collaboration.messageFlows ?? []) {
|
|
340
|
-
edges.push(buildEdge(mf, collaboration));
|
|
341
|
-
}
|
|
342
|
-
rootDiagramId = collaboration.id;
|
|
343
|
-
diagramsById[collaboration.id] = {
|
|
344
|
-
diagramId: collaboration.id,
|
|
345
|
-
root: { id: collaboration.id, type: collaboration.$type },
|
|
346
|
-
nodes,
|
|
347
|
-
edges,
|
|
348
|
-
};
|
|
349
|
-
} else {
|
|
350
|
-
// Stand-alone process(es): one diagram each, root-scope flow nodes at
|
|
351
|
-
// parentId undefined (frontend root scope). The Process container node is
|
|
352
|
-
// included so container-scoped rules (SingleBlankStartEvent) can see it.
|
|
353
|
-
for (const proc of processes) {
|
|
354
|
-
const nodes = [procContainerNode(proc, undefined)];
|
|
355
|
-
const edges = [];
|
|
356
|
-
collectContainer(proc, requiredFieldIndex, nodes, edges, undefined);
|
|
357
|
-
const diagramId = proc.id;
|
|
358
|
-
diagramsById[diagramId] = {
|
|
359
|
-
diagramId,
|
|
360
|
-
root: { id: proc.id, type: proc.$type },
|
|
361
|
-
nodes,
|
|
362
|
-
edges,
|
|
363
|
-
};
|
|
364
|
-
if (!rootDiagramId) {
|
|
365
|
-
rootDiagramId = diagramId;
|
|
366
|
-
rootNode = procContainerNode(proc, undefined);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
return {
|
|
372
|
-
rootDiagramId,
|
|
373
|
-
root: rootNode ?? { id: "root", type: "bpmn:Process", data: {} },
|
|
374
|
-
diagramsById,
|
|
375
|
-
objects,
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// Build the set of known variable identifiers for variable-existence checks:
|
|
380
|
-
// ids AND names AND canonicalIds, across root + every node scope.
|
|
381
|
-
export function collectKnownVariableIds(canvasState) {
|
|
382
|
-
const ids = new Set();
|
|
383
|
-
const add = (v) => {
|
|
384
|
-
if (v?.id) ids.add(v.id);
|
|
385
|
-
if (v?.name) ids.add(v.name);
|
|
386
|
-
if (v?.canonicalId) ids.add(v.canonicalId);
|
|
387
|
-
};
|
|
388
|
-
const rv = canvasState.root?.data?.uipath?.variables;
|
|
389
|
-
for (const v of rv?.inputs ?? []) add(v);
|
|
390
|
-
for (const v of rv?.inputOutputs ?? []) add(v);
|
|
391
|
-
for (const v of rv?.outputs ?? []) add(v);
|
|
392
|
-
for (const d of Object.values(canvasState.diagramsById)) {
|
|
393
|
-
for (const n of d.nodes) {
|
|
394
|
-
const nv = n.data?.uipath?.variables;
|
|
395
|
-
for (const v of nv?.inputs ?? []) add(v);
|
|
396
|
-
for (const v of nv?.inputOutputs ?? []) add(v);
|
|
397
|
-
for (const v of nv?.outputs ?? []) add(v);
|
|
398
|
-
// A node's outputs each DECLARE a variable via their `var` attribute
|
|
399
|
-
// (frontend mapNodeOutputsToVariables: `id: v.var`). These variables are
|
|
400
|
-
// available to downstream nodes/edges, so they count as known. Without
|
|
401
|
-
// this, a gateway condition reading a variable written by an upstream
|
|
402
|
-
// script/task output false-positives as VARIABLE_DOES_NOT_EXIST.
|
|
403
|
-
for (const o of n.data?.uipath?.outputs ?? []) {
|
|
404
|
-
if (o.var) ids.add(o.var);
|
|
405
|
-
if (o.name) ids.add(o.name);
|
|
406
|
-
if (o.canonicalId) ids.add(o.canonicalId);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
return ids;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
// Convenience: all nodes / all edges across every diagram (for global checks).
|
|
414
|
-
export function allNodes(canvasState) {
|
|
415
|
-
return Object.values(canvasState.diagramsById).flatMap((d) => d.nodes);
|
|
416
|
-
}
|
|
417
|
-
export function allEdges(canvasState) {
|
|
418
|
-
return Object.values(canvasState.diagramsById).flatMap((d) => d.edges);
|
|
419
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "uipath-maestro-bpmn-validator",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Offline semantic validator for UiPath Maestro BPMN XML. Reconstructs the PO.Frontend Node/Edge/CanvasState model from the parsed BPMN and runs all 19 PO.Frontend validation rules.",
|
|
6
|
-
"bin": {
|
|
7
|
-
"validate-bpmn": "./validate-bpmn.mjs"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "node test/run-tests.mjs"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"bpmn-moddle": "^9.0.2",
|
|
14
|
-
"luxon": "^3.4.4",
|
|
15
|
-
"sax": "^1.6.0"
|
|
16
|
-
}
|
|
17
|
-
}
|