@uipath/delegate-sdk 1.203.1 → 1.203.2
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 +41 -3
- package/dist/index.mjs +2 -2
- package/dist/skills/business-analysis/SKILL.md +722 -0
- package/dist/skills/business-analysis/as-is-capture.md +440 -0
- package/dist/skills/business-analysis/assets/progress.yaml +19 -0
- package/dist/skills/business-analysis/assets/task-list.md +34 -0
- package/dist/skills/business-analysis/automation-hub-publishing.md +47 -0
- package/dist/skills/business-analysis/bpmn-to-be-design.md +274 -0
- package/dist/skills/business-analysis/case-to-be-design.md +223 -0
- package/dist/skills/business-analysis/diagram-authoring.md +215 -0
- package/dist/skills/business-analysis/industry-gaps.md +134 -0
- package/dist/skills/business-analysis/interview-spine.md +297 -0
- package/dist/skills/business-analysis/locales/de.json +54 -0
- package/dist/skills/business-analysis/locales/en.json +54 -0
- package/dist/skills/business-analysis/locales/es-MX.json +54 -0
- package/dist/skills/business-analysis/locales/es.json +54 -0
- package/dist/skills/business-analysis/locales/fr.json +54 -0
- package/dist/skills/business-analysis/locales/ja.json +54 -0
- package/dist/skills/business-analysis/locales/ko.json +54 -0
- package/dist/skills/business-analysis/locales/pt-BR.json +54 -0
- package/dist/skills/business-analysis/locales/pt.json +54 -0
- package/dist/skills/business-analysis/locales/ro.json +54 -0
- package/dist/skills/business-analysis/locales/tr.json +54 -0
- package/dist/skills/business-analysis/locales/zh-CN.json +54 -0
- package/dist/skills/business-analysis/locales/zh-TW.json +54 -0
- package/dist/skills/business-analysis/pdd-generation.md +204 -0
- package/dist/skills/business-analysis/pdd-template.md +562 -0
- package/dist/skills/business-analysis/progress-presentation.json +13 -0
- package/dist/skills/business-analysis/recording-first.md +19 -0
- package/dist/skills/business-analysis/recording-processing.md +152 -0
- package/dist/skills/business-analysis/references/automation-hub-open-api.md +57 -0
- package/dist/skills/business-analysis/references/case-definition-spec.md +90 -0
- package/dist/skills/business-analysis/references/case-design-patterns/loan-origination-spec.md +86 -0
- package/dist/skills/business-analysis/references/component-type-mapping.md +52 -0
- package/dist/skills/business-analysis/references/uipath-products/case-management-schema.md +62 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-framework.md +65 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-management.md +49 -0
- package/dist/skills/business-analysis/research-offer.md +104 -0
- package/dist/skills/business-analysis/research-pass.md +149 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.ps1 +294 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.sh +453 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.ps1 +72 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.sh +98 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.ps1 +524 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.sh +519 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.ps1 +363 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.sh +360 -0
- package/dist/skills/business-analysis/to-be-design.md +199 -0
- package/dist/skills/confluence/SKILL.md +386 -0
- package/dist/skills/doc-coauthoring/SKILL.md +295 -0
- package/dist/skills/excel-architect/SKILL.macos.md +161 -0
- package/dist/skills/excel-architect/SKILL.md +180 -0
- package/dist/skills/excel-architect/SKILL.windows.md +61 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model-advanced.md +332 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model.md +248 -0
- package/dist/skills/excel-architect/archetypes/02-data-analysis.md +171 -0
- package/dist/skills/excel-architect/archetypes/03-tracking-dashboard.md +160 -0
- package/dist/skills/excel-architect/archetypes/04-project-planning.md +193 -0
- package/dist/skills/excel-architect/archetypes/05-simple-table.md +111 -0
- package/dist/skills/excel-architect/building.md +279 -0
- package/dist/skills/excel-architect/create.md +64 -0
- package/dist/skills/excel-architect/data-and-formulas.md +186 -0
- package/dist/skills/excel-architect/generator.md +272 -0
- package/dist/skills/excel-architect/macos/scripts/add-data-validation.applescript +242 -0
- package/dist/skills/excel-architect/macos/scripts/append-rows.applescript +310 -0
- package/dist/skills/excel-architect/macos/scripts/apply-conditional-format.applescript +565 -0
- package/dist/skills/excel-architect/macos/scripts/autofit-columns.applescript +79 -0
- package/dist/skills/excel-architect/macos/scripts/benchmark.sh +135 -0
- package/dist/skills/excel-architect/macos/scripts/check-compile.sh +30 -0
- package/dist/skills/excel-architect/macos/scripts/clear-range.applescript +152 -0
- package/dist/skills/excel-architect/macos/scripts/copy-paste.applescript +179 -0
- package/dist/skills/excel-architect/macos/scripts/create-chart.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/create-pivot.applescript +443 -0
- package/dist/skills/excel-architect/macos/scripts/create-sheets.applescript +264 -0
- package/dist/skills/excel-architect/macos/scripts/create-workbook.applescript +92 -0
- package/dist/skills/excel-architect/macos/scripts/delete-chart.applescript +105 -0
- package/dist/skills/excel-architect/macos/scripts/delete-sheet.applescript +127 -0
- package/dist/skills/excel-architect/macos/scripts/filter-data.applescript +213 -0
- package/dist/skills/excel-architect/macos/scripts/find-replace.applescript +238 -0
- package/dist/skills/excel-architect/macos/scripts/format-range.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/freeze-panes.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/get-current-file.applescript +24 -0
- package/dist/skills/excel-architect/macos/scripts/get-sheet-dimensions.applescript +115 -0
- package/dist/skills/excel-architect/macos/scripts/health-check.applescript +704 -0
- package/dist/skills/excel-architect/macos/scripts/list-open-workbooks.applescript +80 -0
- package/dist/skills/excel-architect/macos/scripts/maximize-window.applescript +47 -0
- package/dist/skills/excel-architect/macos/scripts/merge-cells.applescript +227 -0
- package/dist/skills/excel-architect/macos/scripts/open-workbook.applescript +139 -0
- package/dist/skills/excel-architect/macos/scripts/read-range.applescript +267 -0
- package/dist/skills/excel-architect/macos/scripts/rename-sheet.applescript +231 -0
- package/dist/skills/excel-architect/macos/scripts/select-sheet.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/set-tab-color.applescript +109 -0
- package/dist/skills/excel-architect/macos/scripts/sort-data.applescript +136 -0
- package/dist/skills/excel-architect/macos/scripts/undo.applescript +59 -0
- package/dist/skills/excel-architect/macos/scripts/workbook-lifecycle.applescript +149 -0
- package/dist/skills/excel-architect/macos/scripts/write-formula.applescript +225 -0
- package/dist/skills/excel-architect/macos/scripts/write-range.applescript +351 -0
- package/dist/skills/excel-architect/reference/api/advanced.md +381 -0
- package/dist/skills/excel-architect/reference/api/basic.md +747 -0
- package/dist/skills/excel-architect/reference/guides.md +348 -0
- package/dist/skills/excel-architect/reference/repair.md +174 -0
- package/dist/skills/excel-architect/reference/troubleshooting.md +46 -0
- package/dist/skills/excel-architect/scripting.md +266 -0
- package/dist/skills/excel-architect/styling-and-features.md +433 -0
- package/dist/skills/excel-architect/windows/api/composites.md +337 -0
- package/dist/skills/excel-architect/windows/api/scripting.md +139 -0
- package/dist/skills/excel-architect/windows/examples/level-1-workflows.md +485 -0
- package/dist/skills/excel-architect/windows/examples/level-2-advanced.md +690 -0
- package/dist/skills/excel-architect/windows/examples/level-3-scripting.md +337 -0
- package/dist/skills/github/SKILL.md +446 -0
- package/dist/skills/github/recipes/add-comment.md +85 -0
- package/dist/skills/github/recipes/check-pr-status.md +122 -0
- package/dist/skills/github/recipes/compare-branches.md +79 -0
- package/dist/skills/github/recipes/create-issue.md +103 -0
- package/dist/skills/github/recipes/create-pr.md +97 -0
- package/dist/skills/github/recipes/get-file-contents.md +76 -0
- package/dist/skills/github/recipes/get-last-commit.md +128 -0
- package/dist/skills/github/recipes/list-my-open-prs.md +105 -0
- package/dist/skills/github/recipes/list-recent-commits.md +84 -0
- package/dist/skills/github/recipes/search-issues.md +115 -0
- package/dist/skills/google-workspace/SKILL.md +217 -0
- package/dist/skills/google-workspace/services/calendar.md +311 -0
- package/dist/skills/google-workspace/services/docs.md +426 -0
- package/dist/skills/google-workspace/services/drive.md +504 -0
- package/dist/skills/google-workspace/services/gmail.md +466 -0
- package/dist/skills/google-workspace/services/sheets.md +370 -0
- package/dist/skills/internal-comms/SKILL.md +35 -0
- package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/internal-comms/examples/general-comms.md +15 -0
- package/dist/skills/jira/SKILL.md +397 -0
- package/dist/skills/jira/recipes/add-comment.md +123 -0
- package/dist/skills/jira/recipes/assign-issue.md +157 -0
- package/dist/skills/jira/recipes/create-issue.md +274 -0
- package/dist/skills/jira/recipes/get-issue-details.md +154 -0
- package/dist/skills/jira/recipes/list-projects.md +151 -0
- package/dist/skills/jira/recipes/my-issues.md +180 -0
- package/dist/skills/jira/recipes/search-issues.md +215 -0
- package/dist/skills/jira/recipes/transition-issue.md +154 -0
- package/dist/skills/jira/recipes/troubleshooting.md +387 -0
- package/dist/skills/knowledge-base/SKILL.md +289 -0
- package/dist/skills/media-tools/SKILL.md +204 -0
- package/dist/skills/media-tools/references/encode-runbook.md +24 -0
- package/dist/skills/media-tools/references/resolve-binaries.md +81 -0
- package/dist/skills/media-tools/scripts/macos/ff-launch.sh +22 -0
- package/dist/skills/media-tools/scripts/macos/ff-poll.sh +10 -0
- package/dist/skills/media-tools/scripts/windows/ff-launch.ps1 +34 -0
- package/dist/skills/media-tools/scripts/windows/ff-poll.ps1 +20 -0
- package/dist/skills/office-download/SKILL.md +161 -0
- package/dist/skills/outlook-365/SKILL.macos.md +331 -0
- package/dist/skills/outlook-365/SKILL.md +171 -0
- package/dist/skills/outlook-365/SKILL.windows.md +124 -0
- package/dist/skills/outlook-365/api/bulk-email-operations.md +178 -0
- package/dist/skills/outlook-365/api/check-availability.md +87 -0
- package/dist/skills/outlook-365/api/create-inbox-rule.md +182 -0
- package/dist/skills/outlook-365/api/download-attachments.md +149 -0
- package/dist/skills/outlook-365/api/find-and-email-contact.md +185 -0
- package/dist/skills/outlook-365/api/manage-calendar-events.md +189 -0
- package/dist/skills/outlook-365/api/organize-with-folders.md +178 -0
- package/dist/skills/outlook-365/api/reply-to-conversation.md +68 -0
- package/dist/skills/outlook-365/api/schedule-meeting.md +73 -0
- package/dist/skills/outlook-365/api/search-and-read-email.md +93 -0
- package/dist/skills/outlook-365/api/send-email-with-attachments.md +94 -0
- package/dist/skills/outlook-365/api/send-email.md +396 -0
- package/dist/skills/outlook-365/api/set-out-of-office.md +196 -0
- package/dist/skills/outlook-365/macos/scripts/bulk-operations.applescript +429 -0
- package/dist/skills/outlook-365/macos/scripts/calendar.applescript +642 -0
- package/dist/skills/outlook-365/macos/scripts/contacts.applescript +635 -0
- package/dist/skills/outlook-365/macos/scripts/helpers.applescript +227 -0
- package/dist/skills/outlook-365/macos/scripts/read-emails.applescript +299 -0
- package/dist/skills/outlook-365/macos/scripts/search-emails.applescript +339 -0
- package/dist/skills/outlook-365/macos/scripts/send-email.applescript +245 -0
- package/dist/skills/outlook-365/uia/BASIC_OPERATIONS.md +278 -0
- package/dist/skills/outlook-365/uia/CALENDAR_OPERATIONS.md +386 -0
- package/dist/skills/outlook-365/uia/COMPOSE_EMAIL.md +426 -0
- package/dist/skills/outlook-365/uia/README.md +75 -0
- package/dist/skills/outlook-365/windows/com/bulk-operations.ps1 +241 -0
- package/dist/skills/outlook-365/windows/com/calendar.ps1 +227 -0
- package/dist/skills/outlook-365/windows/com/contacts.ps1 +270 -0
- package/dist/skills/outlook-365/windows/com/helpers.ps1 +158 -0
- package/dist/skills/outlook-365/windows/com/read-emails.ps1 +115 -0
- package/dist/skills/outlook-365/windows/com/search-emails.ps1 +141 -0
- package/dist/skills/outlook-365/windows/com/send-email.ps1 +121 -0
- package/dist/skills/pdf-architect/SKILL.md +640 -0
- package/dist/skills/powerpoint-architect/SKILL.macos.md +271 -0
- package/dist/skills/powerpoint-architect/SKILL.md +853 -0
- package/dist/skills/powerpoint-architect/SKILL.windows.md +458 -0
- package/dist/skills/powerpoint-architect/custom_themes.md +141 -0
- package/dist/skills/powerpoint-architect/editing-guide.md +424 -0
- package/dist/skills/powerpoint-architect/generator-reference.md +668 -0
- package/dist/skills/powerpoint-architect/images-guide.md +207 -0
- package/dist/skills/powerpoint-architect/issue-fix-mapping.md +768 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-html-to-slide.applescript +389 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-slide.applescript +255 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-speaker-notes.applescript +132 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-text.applescript +245 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-slide-layout.applescript +80 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-theme.applescript +122 -0
- package/dist/skills/powerpoint-architect/macos/scripts/autofit-placeholders.applescript +62 -0
- package/dist/skills/powerpoint-architect/macos/scripts/close-presentation.applescript +24 -0
- package/dist/skills/powerpoint-architect/macos/scripts/copy-slides.applescript +303 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-chart-with-data.applescript +305 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-with-theme.applescript +56 -0
- package/dist/skills/powerpoint-architect/macos/scripts/delete-slides.applescript +137 -0
- package/dist/skills/powerpoint-architect/macos/scripts/export-presentation.applescript +100 -0
- package/dist/skills/powerpoint-architect/macos/scripts/extract-slide-data.applescript +138 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-shape.applescript +192 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-slide-content.applescript +336 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-current-slide-number.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-file-path.applescript +94 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layout-elements.applescript +141 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layouts.applescript +58 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-opened-files.applescript +50 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-presentation-info.applescript +150 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-recent-files.applescript +68 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-count.applescript +37 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-info.applescript +105 -0
- package/dist/skills/powerpoint-architect/macos/scripts/health-check.applescript +690 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-shape.applescript +188 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-table.applescript +112 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-text-box.applescript +225 -0
- package/dist/skills/powerpoint-architect/macos/scripts/manage-image.applescript +486 -0
- package/dist/skills/powerpoint-architect/macos/scripts/maximize-window.applescript +48 -0
- package/dist/skills/powerpoint-architect/macos/scripts/navigate-to-slide.applescript +84 -0
- package/dist/skills/powerpoint-architect/macos/scripts/open-presentation.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/reorder-slides.applescript +106 -0
- package/dist/skills/powerpoint-architect/macos/scripts/replace-text.applescript +193 -0
- package/dist/skills/powerpoint-architect/macos/scripts/save-presentation.applescript +54 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-animation.applescript +203 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-transition.applescript +130 -0
- package/dist/skills/powerpoint-architect/visual-styling-guide.md +206 -0
- package/dist/skills/powerpoint-architect/windows/api/advanced.md +317 -0
- package/dist/skills/powerpoint-architect/windows/api/basic.md +392 -0
- package/dist/skills/powerpoint-architect/windows/examples/10-slide-presentation.md +140 -0
- package/dist/skills/powerpoint-architect/windows/examples/custom-theme-workflow.md +219 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-1-workflows.md +531 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-2-scripting.md +239 -0
- package/dist/skills/powerpoint-architect/windows/scripts/create-with-theme.ps1 +81 -0
- package/dist/skills/project-task-list/SKILL.md +174 -0
- package/dist/skills/slack-operation/SKILL.md +97 -0
- package/dist/skills/slack-operation/api/advanced-api/GUIDE.md +277 -0
- package/dist/skills/slack-operation/api/search-and-read/EXAMPLE.md +75 -0
- package/dist/skills/slack-operation/api/search-and-read/GUIDE.md +108 -0
- package/dist/skills/slack-operation/api/send-message/EXAMPLE.md +112 -0
- package/dist/skills/slack-operation/api/send-message/GUIDE.md +63 -0
- package/dist/skills/slack-operation/api/share-files/EXAMPLE.md +94 -0
- package/dist/skills/slack-operation/api/share-files/GUIDE.md +63 -0
- package/dist/skills/slack-operation/ui/desktop-automation/GUIDE.md +55 -0
- package/dist/skills/system-diagnostics/SKILL.md +263 -0
- package/dist/skills/teams-operation/SKILL.md +79 -0
- package/dist/skills/teams-operation/api/advanced-api/GUIDE.md +234 -0
- package/dist/skills/teams-operation/api/meetings/EXAMPLE.md +63 -0
- package/dist/skills/teams-operation/api/meetings/GUIDE.md +52 -0
- package/dist/skills/teams-operation/api/search-and-read/EXAMPLE.md +72 -0
- package/dist/skills/teams-operation/api/search-and-read/GUIDE.md +54 -0
- package/dist/skills/teams-operation/api/send-message/EXAMPLE.md +92 -0
- package/dist/skills/teams-operation/api/send-message/GUIDE.md +60 -0
- package/dist/skills/teams-operation/ui/desktop-automation/GUIDE.md +66 -0
- package/dist/skills/transcribe-media/SKILL.md +142 -0
- package/dist/skills/uipath-integrations/SKILL.md +370 -0
- package/dist/skills/uipath-integrations/reference/connectors.md +331 -0
- package/dist/skills/uipath-integrations/reference/endpoints.md +220 -0
- package/dist/skills/uipath-integrations/reference/errors.md +211 -0
- package/dist/skills/uipath-integrations/reference/metadata.md +317 -0
- package/dist/skills/uipath-integrations/reference/operations.md +297 -0
- package/dist/skills/uipath-orchestrator/SKILL.md +312 -0
- package/dist/skills/uipath-orchestrator/recipes/assets.md +282 -0
- package/dist/skills/uipath-orchestrator/recipes/audit-logs.md +215 -0
- package/dist/skills/uipath-orchestrator/recipes/buckets.md +205 -0
- package/dist/skills/uipath-orchestrator/recipes/jobs.md +286 -0
- package/dist/skills/uipath-orchestrator/recipes/list-folders.md +207 -0
- package/dist/skills/uipath-orchestrator/recipes/queue-items.md +292 -0
- package/dist/skills/uipath-orchestrator/recipes/queues.md +232 -0
- package/dist/skills/uipath-orchestrator/recipes/releases.md +212 -0
- package/dist/skills/uipath-orchestrator/recipes/robots-sessions.md +274 -0
- package/dist/skills/uipath-orchestrator/recipes/schedules.md +280 -0
- package/dist/skills/uipath-orchestrator/reference/endpoints.md +85 -0
- package/dist/skills/uipath-orchestrator/reference/schemas.md +153 -0
- package/dist/skills/uipath-taskautomation/SKILL.md +310 -0
- package/dist/skills/uipath-taskautomation/assets/CodedWorkflow.template.cs +98 -0
- package/dist/skills/uipath-taskautomation/assets/ExampleWorkflow.cs +146 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.json +32 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.md +44 -0
- package/dist/skills/uipath-taskautomation/references/app-profiles.md +63 -0
- package/dist/skills/uipath-taskautomation/references/automation-spec.md +88 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/before-after-hooks-template.md +115 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/codedworkflow-template.md +186 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/helper-utility-template.md +22 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/json-template.md +91 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/testcase-template.md +92 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/cli-reference.md +249 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/codedworkflow-reference.md +275 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/coding-guidelines.md +229 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/inspect-package-guide.md +81 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/integration-service-guide.md +507 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md +410 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/third-party-packages-guide.md +67 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md +110 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/environment-setup.md +194 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/error-handling-guide.md +195 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/powershell-interop-guide.md +57 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure-guide.md +114 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure.md +126 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/uia-elements-interaction-guide.md +109 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/validation-guide.md +147 -0
- package/dist/skills/uipath-taskautomation/references/coded-workflow-authoring.md +219 -0
- package/dist/skills/uipath-taskautomation/references/profiling-output.md +80 -0
- package/dist/skills/uipath-taskautomation/references/reliability-guide.md +83 -0
- package/dist/skills/uipath-taskautomation/references/task-automation-cheatsheet.md +272 -0
- package/dist/skills/uipath-taskautomation/references/template-preflight.md +17 -0
- package/dist/skills/uipath-workflow-documenter/SKILL.md +430 -0
- package/dist/skills/uipath-workflow-documenter/layouts/pdd-template.md +265 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-orchestrator.md +11 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-workflow.md +11 -0
- package/dist/skills/word-architect/SKILL.macos.md +147 -0
- package/dist/skills/word-architect/SKILL.md +502 -0
- package/dist/skills/word-architect/SKILL.windows.md +55 -0
- package/dist/skills/word-architect/api/advanced.md +522 -0
- package/dist/skills/word-architect/api/basic.md +378 -0
- package/dist/skills/word-architect/api/expert.md +302 -0
- package/dist/skills/word-architect/generation.md +308 -0
- package/dist/skills/word-architect/layouts/01-professional.md +168 -0
- package/dist/skills/word-architect/layouts/02-educational-kids.md +354 -0
- package/dist/skills/word-architect/layouts/03-academic.md +83 -0
- package/dist/skills/word-architect/layouts/04-creative.md +242 -0
- package/dist/skills/word-architect/layouts/05-operational.md +94 -0
- package/dist/skills/word-architect/macos/scripts/apply-heading-style.applescript +215 -0
- package/dist/skills/word-architect/macos/scripts/apply-style.applescript +272 -0
- package/dist/skills/word-architect/macos/scripts/autofit-tables.applescript +53 -0
- package/dist/skills/word-architect/macos/scripts/close-document.applescript +287 -0
- package/dist/skills/word-architect/macos/scripts/create-chart-with-data.applescript +379 -0
- package/dist/skills/word-architect/macos/scripts/create-chart.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/delete-selection.applescript +223 -0
- package/dist/skills/word-architect/macos/scripts/export-document.applescript +167 -0
- package/dist/skills/word-architect/macos/scripts/extract-table.applescript +168 -0
- package/dist/skills/word-architect/macos/scripts/find-by-style.applescript +173 -0
- package/dist/skills/word-architect/macos/scripts/find-text.applescript +199 -0
- package/dist/skills/word-architect/macos/scripts/format-table.applescript +234 -0
- package/dist/skills/word-architect/macos/scripts/format-text.applescript +431 -0
- package/dist/skills/word-architect/macos/scripts/get-document-properties.applescript +95 -0
- package/dist/skills/word-architect/macos/scripts/get-document-structure.applescript +371 -0
- package/dist/skills/word-architect/macos/scripts/get-header-footer-text.applescript +106 -0
- package/dist/skills/word-architect/macos/scripts/get-images.applescript +166 -0
- package/dist/skills/word-architect/macos/scripts/get-opened-files.applescript +103 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-bounds.applescript +133 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-format.applescript +134 -0
- package/dist/skills/word-architect/macos/scripts/get-recent-files.applescript +82 -0
- package/dist/skills/word-architect/macos/scripts/get-styled-text.applescript +256 -0
- package/dist/skills/word-architect/macos/scripts/get-tables.applescript +126 -0
- package/dist/skills/word-architect/macos/scripts/get-text-formatting.applescript +224 -0
- package/dist/skills/word-architect/macos/scripts/get-text.applescript +383 -0
- package/dist/skills/word-architect/macos/scripts/get-theme-colors.applescript +123 -0
- package/dist/skills/word-architect/macos/scripts/health-check.applescript +606 -0
- package/dist/skills/word-architect/macos/scripts/insert-cover-page.applescript +77 -0
- package/dist/skills/word-architect/macos/scripts/insert-header-footer.applescript +87 -0
- package/dist/skills/word-architect/macos/scripts/insert-horizontal-line.applescript +112 -0
- package/dist/skills/word-architect/macos/scripts/insert-html.applescript +440 -0
- package/dist/skills/word-architect/macos/scripts/insert-hyperlink.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/insert-image.applescript +320 -0
- package/dist/skills/word-architect/macos/scripts/insert-list.applescript +317 -0
- package/dist/skills/word-architect/macos/scripts/insert-pagebreak.applescript +181 -0
- package/dist/skills/word-architect/macos/scripts/insert-smartart.applescript +104 -0
- package/dist/skills/word-architect/macos/scripts/insert-table.applescript +238 -0
- package/dist/skills/word-architect/macos/scripts/insert-text.applescript +677 -0
- package/dist/skills/word-architect/macos/scripts/insert-textbox.applescript +261 -0
- package/dist/skills/word-architect/macos/scripts/maximize-window.applescript +67 -0
- package/dist/skills/word-architect/macos/scripts/normalize-formatting.applescript +56 -0
- package/dist/skills/word-architect/macos/scripts/open-document.applescript +222 -0
- package/dist/skills/word-architect/macos/scripts/replace-text.applescript +390 -0
- package/dist/skills/word-architect/macos/scripts/save-document.applescript +230 -0
- package/dist/skills/word-architect/macos/scripts/select-range.applescript +142 -0
- package/dist/skills/word-architect/macos/scripts/set-document-properties.applescript +195 -0
- package/dist/skills/word-architect/macos/scripts/set-page-layout.applescript +273 -0
- package/dist/skills/word-architect/macos/scripts/set-theme-colors.applescript +264 -0
- package/dist/skills/word-architect/macos/scripts/undo-redo.applescript +61 -0
- package/dist/skills/word-architect/macos/scripts/update-toc.applescript +112 -0
- package/dist/skills/word-architect/reference/formatting.md +119 -0
- package/dist/skills/word-architect/reference/html-layouts/01-executive-summary-box.md +36 -0
- package/dist/skills/word-architect/reference/html-layouts/02-kpi-summary-table.md +68 -0
- package/dist/skills/word-architect/reference/html-layouts/03-comparison-table.md +63 -0
- package/dist/skills/word-architect/reference/html-layouts/04-pros-cons-table.md +86 -0
- package/dist/skills/word-architect/reference/html-layouts/05-timeline-table.md +114 -0
- package/dist/skills/word-architect/reference/html-layouts/06-raci-matrix.md +95 -0
- package/dist/skills/word-architect/reference/html-layouts/07-data-table-alternating.md +84 -0
- package/dist/skills/word-architect/reference/html-layouts/08-callout-box.md +102 -0
- package/dist/skills/word-architect/reference/html-layouts/09-vertical-milestone.md +100 -0
- package/dist/skills/word-architect/reference/quality-assurance.md +102 -0
- package/dist/skills/word-architect/reference/tables.md +62 -0
- package/dist/skills/word-architect/reference/tracked-changes.md +34 -0
- package/dist/skills/word-architect/reference/uia-fallback.md +231 -0
- package/dist/skills/word-architect/reference/visual-elements.md +82 -0
- package/dist/skills/word-architect/windows/scripts/apply-heading-style.ps1 +190 -0
- package/dist/skills/word-architect/windows/scripts/autofit-tables.ps1 +64 -0
- package/dist/skills/word-architect/windows/scripts/create-chart-with-data.ps1 +133 -0
- package/dist/skills/word-architect/windows/scripts/create-chart.ps1 +73 -0
- package/dist/skills/word-architect/windows/scripts/export-document.ps1 +86 -0
- package/dist/skills/word-architect/windows/scripts/get-current-file.ps1 +27 -0
- package/dist/skills/word-architect/windows/scripts/insert-cover-page.ps1 +79 -0
- package/dist/skills/word-architect/windows/scripts/insert-horizontal-line.ps1 +74 -0
- package/dist/skills/word-architect/windows/scripts/insert-image.ps1 +98 -0
- package/dist/skills/word-architect/windows/scripts/insert-smartart.ps1 +118 -0
- package/dist/skills/word-architect/windows/scripts/insert-text-box.ps1 +90 -0
- package/dist/skills/word-architect/windows/scripts/normalize-formatting.ps1 +63 -0
- package/package.json +5 -4
package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Operations Guide
|
|
2
|
+
|
|
3
|
+
Detailed step-by-step procedures for all operations on UiPath coded workflow projects.
|
|
4
|
+
|
|
5
|
+
## Initialize a New Coded Project
|
|
6
|
+
|
|
7
|
+
Use this procedure ONLY when the user explicitly asked for a coded project ("coded", ".cs", "C# workflow").
|
|
8
|
+
|
|
9
|
+
There is no "create a coded project" command. `init` always scaffolds XAML; coded mode is a post-scaffold step (add `.cs` files, update `entryPoints`). For the canonical `init` documentation — flag semantics, scaffolding behavior, how `--expression-language` works — see [../environment-setup.md § Step 0.3: Creating a New Project](../environment-setup.md#step-03-creating-a-new-project).
|
|
10
|
+
|
|
11
|
+
### Steps
|
|
12
|
+
|
|
13
|
+
**1. Scaffold the project** following [../environment-setup.md § Step 0.3](../environment-setup.md#step-03-creating-a-new-project). The command is the same as for an XAML project — the scaffolding is XAML either way. The result is a project with `project.json`, `project.uiproj`, the template's XAML root file (`Main.xaml` / `TestCase.xaml`), and all required metadata directories.
|
|
14
|
+
|
|
15
|
+
**2. Read the scaffolded files — do NOT overwrite blindly:**
|
|
16
|
+
|
|
17
|
+
After `init` succeeds, read the generated files to understand the defaults:
|
|
18
|
+
```
|
|
19
|
+
Read: <PROJECT_DIR>/project.json
|
|
20
|
+
Read: <PROJECT_DIR>/Main.xaml # or TestCase.xaml for test projects
|
|
21
|
+
```
|
|
22
|
+
`project.json` contains valid defaults (correct schema version, runtime options, dependencies) that you should build on rather than replace. Leave the scaffolded XAML in place — `.xaml` and `.cs` workflows coexist freely in the same project.
|
|
23
|
+
|
|
24
|
+
**3. Analyze the task and plan the file structure:**
|
|
25
|
+
- How many workflow files? (one per logical step or responsibility)
|
|
26
|
+
- Are there shared data models or helpers? (create Coded Source Files)
|
|
27
|
+
- Is this a test project? (create test cases with Given/When/Then structure, optionally add Before/After hooks)
|
|
28
|
+
- See [../project-structure-guide.md](../project-structure-guide.md) for guidelines
|
|
29
|
+
|
|
30
|
+
**4. Add required dependencies to `project.json`** based on the Service-to-Package mapping. Edit the existing `project.json` — do NOT rewrite the entire file.
|
|
31
|
+
|
|
32
|
+
**5. Add `.cs` workflow / test case / source files:**
|
|
33
|
+
- Generate `.cs` files (workflows, test cases, source files) — respect the four Error-severity coded analyzer rules while authoring: [coding-guidelines.md § Coded Workflow Analyzer Rules](coding-guidelines.md#coded-workflow-analyzer-rules)
|
|
34
|
+
- For each `.cs` **workflow** file, add an entry to `entryPoints` in `project.json` (**Process projects only** — Tests and Library projects do NOT use `entryPoints`). The existing scaffolded XAML entry can stay alongside.
|
|
35
|
+
- For each `.cs` **test case** file, add an entry to `designOptions.fileInfoCollection` in `project.json` with `editingStatus: "InProgress"`, `testCaseType: "TestCase"`, `publishAsTestCase: true`. Test cases do NOT go in `entryPoints` regardless of project type.
|
|
36
|
+
- If test project and shared setup is needed, create a `partial class CodedWorkflow` source file that implements `IBeforeAfterRun` (see before-after-hooks-template.md)
|
|
37
|
+
|
|
38
|
+
**6. Validate each file** (Critical Rule #14) — run the validation loop on every `.cs` file until it compiles cleanly
|
|
39
|
+
|
|
40
|
+
> **Why `init` instead of manual files?** It generates correct schema versions, metadata directories, and default dependencies — manual creation risks subtle errors. See [json-template.md](../../assets/json-template.md) for reference-only templates.
|
|
41
|
+
|
|
42
|
+
## Add a Workflow File to Existing Project
|
|
43
|
+
|
|
44
|
+
**Steps:**
|
|
45
|
+
1. Read existing `project.json` to get project name (for namespace), `outputType`, and current entry points
|
|
46
|
+
2. Create the new `.cs` file:
|
|
47
|
+
- Use the project name as namespace
|
|
48
|
+
- Class name = file name (without .cs). The class name must **not** equal the project name — a class named like the project's default namespace fails analyzer rule ST-NMG-017 (Error) at `analyze`/`build`/`pack`. When the natural name collides (e.g. workflow `Invoicing` in project `Invoicing`), pick a variant like `InvoicingWorkflow`
|
|
49
|
+
- Inherit from `CodedWorkflow`
|
|
50
|
+
- Add `[Workflow]` attribute on the entry-point method. Method name does not have to be `Execute` — any name works. `Execute` is convention; keep it unless the user asks otherwise. **One `[Workflow]`/`[TestCase]` attribute per file** — a second one in the same file fails analyzer rule ST-DBP-010 (Error)
|
|
51
|
+
- Add appropriate `using` statements based on which activities are needed
|
|
52
|
+
3. Argument direction is determined by the entry-point method signature. Single-return OutArgument is named **`"Output"`**. Tuple returns produce one OutArgument per element, named after the element. A tuple element name matching an input parameter name — or, for single returns, an input parameter literally named `"Output"` — collapses into one **`InOutArgument`**:
|
|
53
|
+
|
|
54
|
+
| Signature | Example | Argument directions |
|
|
55
|
+
|-----------|---------|---------------------|
|
|
56
|
+
| Single return | `public string Execute(int a, int b)` | `a` = In, `b` = In, return = Out named `"Output"` |
|
|
57
|
+
| Tuple return | `public (string Test, int A) Execute()` | `Test` = Out, `A` = Out |
|
|
58
|
+
| Tuple + name collision | `public (string a, string b) Execute(string b, int c)` | `a` = Out, `b` = InOut (same name in input and tuple), `c` = In |
|
|
59
|
+
| Single return + `Output` input | `public string Execute(string Output, int c)` | `Output` = InOut (input named `"Output"` collides with implicit return name), `c` = In |
|
|
60
|
+
| No return | `public void Execute(string input)` | `input` = In |
|
|
61
|
+
|
|
62
|
+
> **NEVER use C# `out` or `ref` keywords** on `Execute` parameters — the auto-generated `*+Activity.cs` wrapper does not handle them correctly. Symptoms: analyzer error ST-USG-017 at `analyze`/`build`/`pack`, compile error `CS1620`, or runtime `Using 'out' and 'ref' modifiers is not allowed for Coded Workflows executions.` Studio regenerates the wrapper on every save, so manual fixes are reverted. Use return values or tuples for outputs instead.
|
|
63
|
+
|
|
64
|
+
> **InOut collapse requires matching types.** When a name collision turns a parameter into an `InOutArgument` (rows 3–4 above), the input parameter type and the returned type must be identical — a mismatch (e.g. input `string b` vs tuple element `int b`) fails analyzer rule ST-REL-001 (Error) at `analyze`/`build`/`pack`.
|
|
65
|
+
4. Update `project.json` (**Process projects only** — skip `entryPoints` for Tests and Library projects):
|
|
66
|
+
- Add new entry to `entryPoints` array with `filePath`, unique `uniqueId`, `input`, and `output` definitions
|
|
67
|
+
- If the workflow has parameters, define them in `input`/`output` with `name`, `type`, and `required`
|
|
68
|
+
5. **Validate the file** — Run the validation loop (Critical Rule #14) until the file compiles cleanly before proceeding
|
|
69
|
+
|
|
70
|
+
## Add a Test Case File
|
|
71
|
+
|
|
72
|
+
Coded test cases automate and validate application behavior using a structured **Given-When-Then** (Arrange/Act/Assert) pattern. They inherit from `CodedWorkflow` just like workflows, but use the `[TestCase]` attribute.
|
|
73
|
+
|
|
74
|
+
**Test cases can exist in any project type** — not just `"Tests"` projects. It's common to add test cases directly inside a `"Process"` project for testing purposes.
|
|
75
|
+
|
|
76
|
+
**Steps:**
|
|
77
|
+
1. Read existing `project.json` to get project name, `outputType`, and current entry points
|
|
78
|
+
2. Create the `.cs` file following the same rules as workflows, but with:
|
|
79
|
+
- `[TestCase]` attribute instead of `[Workflow]` on the entry-point method (method name does not have to be `Execute` — any name works; keep `Execute` unless the user asks otherwise)
|
|
80
|
+
- Structured code in three phases: **Arrange**, **Act**, **Assert**
|
|
81
|
+
3. Update `project.json`:
|
|
82
|
+
- Add entry to `entryPoints` array (**Process projects only** — skip `entryPoints` for Tests and Library projects)
|
|
83
|
+
- Add entry to `designOptions.fileInfoCollection` with `editingStatus: "InProgress"`, `testCaseType: "TestCase"`, `publishAsTestCase: true`
|
|
84
|
+
4. For data-driven tests, add default parameter values: `public void Execute(string browser = "chrome.exe")`
|
|
85
|
+
- Optionally create `.variations/` data file for parameterized test data
|
|
86
|
+
5. **Validate the file** — Run the validation loop (Critical Rule #14) until the file compiles cleanly before proceeding
|
|
87
|
+
6. **Update `editingStatus`** — When the user asks to mark a test case as ready/publishable, update its `editingStatus` in `fileInfoCollection` from `"InProgress"` to `"Publishable"`. Do NOT change this automatically — only when explicitly requested
|
|
88
|
+
|
|
89
|
+
**Test case structure — Given/When/Then:**
|
|
90
|
+
|
|
91
|
+
For test cases that validate non-UI logic (most common — call workflows and assert on results):
|
|
92
|
+
```csharp
|
|
93
|
+
using System;
|
|
94
|
+
using UiPath.CodedWorkflows;
|
|
95
|
+
|
|
96
|
+
namespace MyTestProject
|
|
97
|
+
{
|
|
98
|
+
public class TestInvoiceCreation : CodedWorkflow
|
|
99
|
+
{
|
|
100
|
+
[TestCase]
|
|
101
|
+
public void Execute()
|
|
102
|
+
{
|
|
103
|
+
// GIVEN (Arrange) — set up test data
|
|
104
|
+
string invoiceId = "INV-001";
|
|
105
|
+
decimal amount = 1500.00m;
|
|
106
|
+
Log($"Testing invoice creation for {invoiceId}");
|
|
107
|
+
|
|
108
|
+
// WHEN (Act) — call the workflow under test
|
|
109
|
+
var result = workflows.CreateInvoice(invoiceId: invoiceId, amount: amount);
|
|
110
|
+
|
|
111
|
+
// THEN (Assert) — verify expected results
|
|
112
|
+
testing.VerifyExpression(result.success, "Invoice creation should succeed");
|
|
113
|
+
testing.VerifyAreEqual("POSTED", result.status, "Invoice should be in POSTED status");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For test cases that validate UI behavior (target UI elements with an inline selector passed to `uiAutomation.*`):
|
|
120
|
+
```csharp
|
|
121
|
+
using System;
|
|
122
|
+
using UiPath.CodedWorkflows;
|
|
123
|
+
using UiPath.UIAutomationNext.API.Contracts;
|
|
124
|
+
|
|
125
|
+
namespace MyTestProject
|
|
126
|
+
{
|
|
127
|
+
public class TestInvoiceFormUI : CodedWorkflow
|
|
128
|
+
{
|
|
129
|
+
[TestCase]
|
|
130
|
+
public void Execute()
|
|
131
|
+
{
|
|
132
|
+
// GIVEN (Arrange) — open the application to the invoice form
|
|
133
|
+
// uiAutomation.Open() returns a screen handle; all interactions go through it
|
|
134
|
+
var formScreen = uiAutomation.Open(/* inline selector target — see coded-workflow-authoring.md */);
|
|
135
|
+
Log("Navigated to invoice creation form");
|
|
136
|
+
|
|
137
|
+
// WHEN (Act) — fill in details and submit
|
|
138
|
+
formScreen.TypeInto(/* inline selector target — see coded-workflow-authoring.md */, "INV-001");
|
|
139
|
+
formScreen.TypeInto(/* inline selector target — see coded-workflow-authoring.md */, "1500.00");
|
|
140
|
+
formScreen.Click(/* inline selector target — see coded-workflow-authoring.md */);
|
|
141
|
+
|
|
142
|
+
// THEN (Assert) — attach to confirmation screen and verify message
|
|
143
|
+
var confirmScreen = uiAutomation.Attach(/* inline selector target — see coded-workflow-authoring.md */);
|
|
144
|
+
string message = confirmScreen.GetText(/* inline selector target — see coded-workflow-authoring.md */);
|
|
145
|
+
testing.VerifyExpression(message.Contains("successfully"), "Confirmation message should indicate success");
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Assertion methods (via `testing` service):**
|
|
152
|
+
- `testing.VerifyExpression(bool condition, string outputMessage = null)` — assert a boolean condition is true
|
|
153
|
+
- `testing.VerifyAreEqual<T>(T expected, T actual, string outputMessage = null)` — assert equality
|
|
154
|
+
- `testing.VerifyAreNotEqual<T>(T notExpected, T actual, string outputMessage = null)` — assert inequality
|
|
155
|
+
- `testing.VerifyContains(string full, string part, string outputMessage = null)` — assert string containment
|
|
156
|
+
- `testing.VerifyRange(double value, double min, double max, string outputMessage = null)` — assert value in range
|
|
157
|
+
- `testing.SetTestDataQueueItems(...)` — set up test data from data queues
|
|
158
|
+
- `testing.GetTestDataQueueItem(...)` — get next test data item
|
|
159
|
+
|
|
160
|
+
**Test cases can invoke other workflows:**
|
|
161
|
+
```csharp
|
|
162
|
+
[TestCase]
|
|
163
|
+
public void Execute()
|
|
164
|
+
{
|
|
165
|
+
// Arrange — call a setup workflow using strongly-typed invocation
|
|
166
|
+
var setupResult = workflows.SetupTestData(environment: "staging");
|
|
167
|
+
|
|
168
|
+
// Act — call the workflow under test
|
|
169
|
+
var result = workflows.ProcessInvoice(invoiceId: "INV-001");
|
|
170
|
+
|
|
171
|
+
// Assert — verify the result with type-safe property access
|
|
172
|
+
testing.VerifyExpression(result.success, "Invoice processing should succeed");
|
|
173
|
+
testing.VerifyAreEqual("POSTED", result.status, "Invoice should be posted");
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Shared Before/After hooks for all test cases:**
|
|
178
|
+
Create a Coded Source File (e.g. `CodedWorkflowHooks.cs`) with `public partial class CodedWorkflow : IBeforeAfterRun` — the compiler merges it with the auto-generated CodedWorkflow partial, so all workflows and test cases get the hooks automatically. See `assets/before-after-hooks-template.md` for the full template.
|
|
179
|
+
|
|
180
|
+
## Add a Coded Source File (Helper Class / Model / Utility)
|
|
181
|
+
|
|
182
|
+
Coded Source Files are plain `.cs` files that contain reusable classes, models, enums, or utility methods. They are **not** entry points — they cannot be executed independently. Workflows and test cases consume them.
|
|
183
|
+
|
|
184
|
+
**Key differences from workflow files:**
|
|
185
|
+
- **NO** `CodedWorkflow` base class — they are plain C# classes
|
|
186
|
+
- **NO** `[Workflow]` or `[TestCase]` attribute
|
|
187
|
+
- **NO** entry in `project.json` `entryPoints`
|
|
188
|
+
- Can contain multiple classes per file if logically related (e.g. a models file)
|
|
189
|
+
|
|
190
|
+
**Steps:**
|
|
191
|
+
1. Read existing `project.json` to get the project name (for namespace)
|
|
192
|
+
2. Create the `.cs` file:
|
|
193
|
+
- Use the project name as namespace
|
|
194
|
+
- Name each class after what it contains (for a single-class file, that matches the file name). Never use the project name as a class name — analyzer rule ST-NMG-017 applies to every class in the default namespace, source files included
|
|
195
|
+
- Add only the `using` statements the class needs (typically just `System` namespaces)
|
|
196
|
+
- Do NOT inherit from `CodedWorkflow`
|
|
197
|
+
3. No `project.json` changes needed
|
|
198
|
+
|
|
199
|
+
**When to create Coded Source Files:**
|
|
200
|
+
- **Data models / DTOs** — classes that represent structured data (e.g. `InvoiceData`, `CustomerRecord`)
|
|
201
|
+
- **Helper/utility classes** — static methods for string manipulation, data transformation, validation
|
|
202
|
+
- **Custom enums** — project-specific enumerations
|
|
203
|
+
- **Constants** — centralized configuration values or magic strings
|
|
204
|
+
- **Extension methods** — reusable extensions for built-in types
|
|
205
|
+
- **Business logic** — complex logic that should be testable/reusable independently from the workflow orchestration
|
|
206
|
+
|
|
207
|
+
**Example — Data model source file (`InvoiceData.cs`):**
|
|
208
|
+
```csharp
|
|
209
|
+
using System;
|
|
210
|
+
|
|
211
|
+
namespace MyProject
|
|
212
|
+
{
|
|
213
|
+
public class InvoiceData
|
|
214
|
+
{
|
|
215
|
+
public string InvoiceNumber { get; set; }
|
|
216
|
+
public string CustomerName { get; set; }
|
|
217
|
+
public decimal Amount { get; set; }
|
|
218
|
+
public DateTime DueDate { get; set; }
|
|
219
|
+
public bool IsOverdue => DueDate < DateTime.Now;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Example — Utility source file (`StringHelpers.cs`):**
|
|
225
|
+
```csharp
|
|
226
|
+
using System;
|
|
227
|
+
using System.Text.RegularExpressions;
|
|
228
|
+
|
|
229
|
+
namespace MyProject
|
|
230
|
+
{
|
|
231
|
+
public static class StringHelpers
|
|
232
|
+
{
|
|
233
|
+
public static string ExtractInvoiceNumber(string text)
|
|
234
|
+
{
|
|
235
|
+
var match = Regex.Match(text, @"INV-\d{6}");
|
|
236
|
+
return match.Success ? match.Value : string.Empty;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
public static string NormalizeName(string name)
|
|
240
|
+
{
|
|
241
|
+
return name?.Trim().ToUpperInvariant() ?? string.Empty;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Using source files from a workflow:**
|
|
248
|
+
```csharp
|
|
249
|
+
// In ProcessInvoices.cs (a workflow)
|
|
250
|
+
[Workflow]
|
|
251
|
+
public void Execute()
|
|
252
|
+
{
|
|
253
|
+
var invoice = new InvoiceData // from InvoiceData.cs
|
|
254
|
+
{
|
|
255
|
+
InvoiceNumber = StringHelpers.ExtractInvoiceNumber(rawText), // from StringHelpers.cs
|
|
256
|
+
CustomerName = StringHelpers.NormalizeName(customerField),
|
|
257
|
+
Amount = parsedAmount,
|
|
258
|
+
DueDate = dueDate
|
|
259
|
+
};
|
|
260
|
+
Log($"Processing invoice {invoice.InvoiceNumber}, overdue: {invoice.IsOverdue}");
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Edit an Existing Workflow File
|
|
265
|
+
|
|
266
|
+
**Steps:**
|
|
267
|
+
1. Read the existing `.cs` file to understand current structure
|
|
268
|
+
2. Apply requested changes while preserving:
|
|
269
|
+
- Namespace (must match project name)
|
|
270
|
+
- Class structure and base class (`CodedWorkflow`)
|
|
271
|
+
- Attribute (`[Workflow]` or `[TestCase]`)
|
|
272
|
+
- Method name (`Execute`)
|
|
273
|
+
3. If parameters changed (added/removed/renamed/retyped) and this is a **Process** project:
|
|
274
|
+
- Update `project.json` `entryPoints` input/output definitions for this file (Tests and Library projects do not use `entryPoints`)
|
|
275
|
+
4. **Validate the file** — Run the validation loop (Critical Rule #14) until the file compiles cleanly before proceeding
|
|
276
|
+
|
|
277
|
+
## Remove a Workflow File
|
|
278
|
+
|
|
279
|
+
**Steps:**
|
|
280
|
+
1. Delete the `.cs` file
|
|
281
|
+
2. Update `project.json`:
|
|
282
|
+
- **Process projects:** Remove from `entryPoints` array. If it was the `main` file, update `main` field to another entry point
|
|
283
|
+
- **Tests and Library projects:** No `entryPoints` to update
|
|
284
|
+
- If Tests project, remove from `fileInfoCollection`
|
|
285
|
+
|
|
286
|
+
## API Discovery (Before Creating Workflows)
|
|
287
|
+
|
|
288
|
+
**MANDATORY before generating any C# code**: Learn from existing project patterns first.
|
|
289
|
+
|
|
290
|
+
This operation helps you understand the project's existing code style, API usage patterns, and conventions before creating new workflows. This ensures consistency across the project.
|
|
291
|
+
|
|
292
|
+
**Steps:**
|
|
293
|
+
|
|
294
|
+
1. **Search for existing C# files:**
|
|
295
|
+
```
|
|
296
|
+
Glob pattern: "**/*.cs"
|
|
297
|
+
Path: <PROJECT_DIR>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
2. **Count and filter results:**
|
|
301
|
+
- Count total .cs files returned
|
|
302
|
+
- Exclude files in `.local\.codedworkflows\` and `.codedworkflows\` from your count
|
|
303
|
+
- Note: Generated/temporary files in these folders can still be read for API information
|
|
304
|
+
|
|
305
|
+
3. **Read example files:**
|
|
306
|
+
- **If 5+ files found**: Read at least 5 diverse examples
|
|
307
|
+
- **If fewer than 5**: Read all of them
|
|
308
|
+
- **If 0 files**: Proceed using generic CodedWorkflow patterns from templates
|
|
309
|
+
|
|
310
|
+
4. **Read generated API files** (if they exist):
|
|
311
|
+
- `<PROJECT_DIR>\.local\.codedworkflows\CodedWorkflow.cs` — available service definitions
|
|
312
|
+
|
|
313
|
+
5. **Extract patterns:**
|
|
314
|
+
- Common `using` statements (e.g., `using UiPath.CodedWorkflows;`)
|
|
315
|
+
- Namespace patterns (e.g., `namespace ProjectName`)
|
|
316
|
+
- Class structure (inheritance from `CodedWorkflow`)
|
|
317
|
+
- Service usage patterns (e.g., `excel.UseExcelFile()`, `mail.Outlook()`)
|
|
318
|
+
- Argument patterns (input parameters, return tuples)
|
|
319
|
+
- Logging patterns (e.g., `Log("message")`)
|
|
320
|
+
- Error handling patterns (try-catch blocks)
|
|
321
|
+
- UI Automation patterns (inline selectors passed to `uiAutomation.*`: Open/Attach/Click/TypeInto/GetText)
|
|
322
|
+
|
|
323
|
+
**Example patterns to look for:**
|
|
324
|
+
|
|
325
|
+
```csharp
|
|
326
|
+
// Common using statements
|
|
327
|
+
using System;
|
|
328
|
+
using System.Collections.Generic;
|
|
329
|
+
using UiPath.CodedWorkflows;
|
|
330
|
+
|
|
331
|
+
// Namespace pattern
|
|
332
|
+
namespace MyProjectName
|
|
333
|
+
{
|
|
334
|
+
// Class structure
|
|
335
|
+
public class MyWorkflow : CodedWorkflow
|
|
336
|
+
{
|
|
337
|
+
[Workflow]
|
|
338
|
+
public void Execute(string inputParam)
|
|
339
|
+
{
|
|
340
|
+
// Logging pattern
|
|
341
|
+
Log("Starting workflow...");
|
|
342
|
+
|
|
343
|
+
// Service usage pattern
|
|
344
|
+
using (var workbook = excel.UseExcelFile(inputParam))
|
|
345
|
+
{
|
|
346
|
+
// Implementation
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Error handling pattern
|
|
350
|
+
try
|
|
351
|
+
{
|
|
352
|
+
// Operations
|
|
353
|
+
}
|
|
354
|
+
catch (Exception ex)
|
|
355
|
+
{
|
|
356
|
+
Log($"Error: {ex.Message}");
|
|
357
|
+
throw;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Why API discovery matters:**
|
|
365
|
+
- Ensures code consistency across the project
|
|
366
|
+
- Prevents using incorrect method names or patterns
|
|
367
|
+
- Identifies available services and their usage
|
|
368
|
+
- Discovers project-specific conventions
|
|
369
|
+
- Finds inline-selector patterns for UI automation
|
|
370
|
+
- Reduces compilation errors from wrong API usage
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## UI Automation Targets (inline selector primary, semantic fallback)
|
|
375
|
+
|
|
376
|
+
**This operation applies when writing UI automation code** (any workflow that uses `uiAutomation.*` calls — Open/Attach/Click/TypeInto/GetText).
|
|
377
|
+
|
|
378
|
+
**Target resolution:**
|
|
379
|
+
- **Inline selector (PRIMARY)** — wrap the captured `uipathSelector` in a model factory (`AppTarget.From...` → `uiAutomation.Open`/`Attach`; `Target.FromSelector(...)` → `Click`/`TypeInto`/`GetText` on the returned handle). Never pass a bare selector string to `uiAutomation.*` (read as an Object Repository name).
|
|
380
|
+
- **Semantic selector** — a semantic target if the strict selector may drift. If that also throws at run time, the activity fails — no runtime callback into Delegate to catch it.
|
|
381
|
+
|
|
382
|
+
Full targeting rules (selector resolution, screen-handle affinity for multi-window flows): [coded-workflow-authoring.md](../../coded-workflow-authoring.md) § Targeting.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Add a Dependency
|
|
387
|
+
|
|
388
|
+
Canonical CLI: `uip rpa packages install`. Do NOT hand-edit `project.json` `dependencies`. **There is no `uip rpa add-dependency` command** — agents that try it get `error: unknown command 'add-dependency'`. See [cli-reference.md § packages install](../cli-reference.md).
|
|
389
|
+
|
|
390
|
+
**Steps:**
|
|
391
|
+
1. Read `project.json` to check existing dependencies — skip packages already at the desired version.
|
|
392
|
+
2. Run:
|
|
393
|
+
```bash
|
|
394
|
+
uip rpa packages install --project-dir "<PROJECT_DIR>" --packages 'id=<PACKAGE_ID>,version=<VERSION>' --output json
|
|
395
|
+
```
|
|
396
|
+
Omit `,version=<VERSION>` to resolve the latest compatible. Pin a version only when there is a known compatibility constraint (see pinned versions below). The CLI writes `project.json` and runs restore — re-read `project.json` afterward if subsequent steps need it.
|
|
397
|
+
3. Only install packages the project actually needs.
|
|
398
|
+
|
|
399
|
+
**Pinned versions for UiPath activity packages (current v25.x):**
|
|
400
|
+
- `UiPath.System.Activities` → `25.12.2` — system activities (assets, queues, credentials)
|
|
401
|
+
- `UiPath.Testing.Activities` → `25.10.2` — testing and assertions. Pin this exact patch — `25.10.0` and `25.10.1` synthesize a bootloader under `.local/install/` that references `UiPath.Robot.Activities.Api` and breaks the build with CS0234.
|
|
402
|
+
- `UiPath.UIAutomation.Activities` → `25.10.21` — UI automation
|
|
403
|
+
- `UiPath.Excel.Activities` → `3.3.1` — Excel automation
|
|
404
|
+
- `UiPath.Word.Activities` → `2.3.1` — Word automation
|
|
405
|
+
- `UiPath.Presentations.Activities` → `2.3.1` — PowerPoint automation
|
|
406
|
+
- `UiPath.Mail.Activities` → `2.5.10` — Mail automation
|
|
407
|
+
- `UiPath.MicrosoftOffice365.Activities` → `3.6.10` — Microsoft 365 (Graph API: mail, calendar, Excel cloud, OneDrive, SharePoint)
|
|
408
|
+
- `UiPath.GSuite.Activities` → `3.6.10` — Google Workspace (Gmail, Calendar, Drive, Sheets, Docs)
|
|
409
|
+
|
|
410
|
+
**Third-party NuGet packages:** same CLI — pass the public NuGet package ID as `id`. See [third-party-packages-guide.md](third-party-packages-guide.md).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Using Third-Party NuGet Packages in Coded Workflows
|
|
2
|
+
|
|
3
|
+
When a user needs functionality that **no UiPath built-in activity provides** (e.g. PDF generation, barcode reading, advanced math, specific file formats), find and use a third-party NuGet package.
|
|
4
|
+
|
|
5
|
+
## Decision Flow
|
|
6
|
+
|
|
7
|
+
1. **Consider whether a built-in activity or plain .NET is the better fit** — prefer activities for Orchestrator integration, UI automation, and document handling; prefer .NET for data transforms, HTTP to external APIs, parsing, etc.
|
|
8
|
+
2. **If no built-in activity fits** — search for a well-known .NET NuGet package that provides the capability
|
|
9
|
+
3. **Inspect the package** — run the `uip rpa packages inspect` command with the appropriate flags in order to get exact API signatures before writing code
|
|
10
|
+
4. **Install it** — run `uip rpa packages install --project-dir "<PROJECT_DIR>" --packages 'id=<PACKAGE_ID>,version=<VERSION>' --output json`. Omit `,version=<VERSION>` to resolve the latest compatible. Do NOT hand-edit `project.json` `dependencies`. **There is no `uip rpa add-dependency` command.**
|
|
11
|
+
5. **Write C# code using the package** — use the package's API directly in the `Execute` method (no service proxy needed — just `using` + direct API calls)
|
|
12
|
+
|
|
13
|
+
## How Third-Party Packages Differ from UiPath Activity Packages
|
|
14
|
+
|
|
15
|
+
- UiPath packages provide services on the `CodedWorkflow` base class (e.g. `excel.ReadRange(...)`)
|
|
16
|
+
- Third-party packages are used as **plain C# libraries** — instantiate classes, call methods directly
|
|
17
|
+
- They do NOT get a service property on `CodedWorkflow`
|
|
18
|
+
- Add them to `project.json` `dependencies` just like UiPath packages: `"PackageName": "[version]"`
|
|
19
|
+
|
|
20
|
+
## Example — Using CsvHelper in a Coded Workflow
|
|
21
|
+
|
|
22
|
+
```csharp
|
|
23
|
+
using System;
|
|
24
|
+
using System.Globalization;
|
|
25
|
+
using System.IO;
|
|
26
|
+
using CsvHelper;
|
|
27
|
+
using UiPath.CodedWorkflows;
|
|
28
|
+
|
|
29
|
+
namespace MyProject
|
|
30
|
+
{
|
|
31
|
+
public class ProcessCsv : CodedWorkflow
|
|
32
|
+
{
|
|
33
|
+
[Workflow]
|
|
34
|
+
public void Execute(string inputPath)
|
|
35
|
+
{
|
|
36
|
+
using var reader = new StreamReader(inputPath);
|
|
37
|
+
using var csv = new CsvReader(reader, CultureInfo.InvariantCulture);
|
|
38
|
+
var records = csv.GetRecords<dynamic>().ToList();
|
|
39
|
+
Log($"Read {records.Count} records from CSV");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
With `project.json` dependency:
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"CsvHelper": "[33.0.1]"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## How to Search for Packages
|
|
55
|
+
|
|
56
|
+
- Use web search to find the best .NET NuGet package for the task
|
|
57
|
+
- Look for packages with high download counts, active maintenance, and .NET 6+ support
|
|
58
|
+
- Common choices:
|
|
59
|
+
- `CsvHelper` (CSV parsing)
|
|
60
|
+
- `QuestPDF` (PDF generation)
|
|
61
|
+
- `ClosedXML` (Excel without UiPath)
|
|
62
|
+
- `HtmlAgilityPack` (HTML parsing)
|
|
63
|
+
- `Dapper` (database access)
|
|
64
|
+
- `RestSharp` (REST APIs)
|
|
65
|
+
- `Polly` (retry/resilience patterns)
|
|
66
|
+
- `Newtonsoft.Json` (JSON parsing - already included in most projects)
|
|
67
|
+
- After identifying a package, run the `uip rpa packages inspect` command to discover exact APIs before coding
|
package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Data Manipulation Guide
|
|
2
|
+
|
|
3
|
+
Code patterns for transforming data in modern coded projects: DataTable LINQ, strings, RegEx, DateTime, type conversion, collections, JSON.
|
|
4
|
+
|
|
5
|
+
**Boundary — these own their topics, link don't reinvent:**
|
|
6
|
+
- Coded-mode `using` directives → [coded/coding-guidelines.md](coded/coding-guidelines.md).
|
|
7
|
+
|
|
8
|
+
## Required imports & references
|
|
9
|
+
|
|
10
|
+
A scaffolded project (`uip rpa init`) already has all of these — untouched, the LINQ family just works. Coded (`.cs`): `using System.Data;` + `using System.Linq;` ([coded/coding-guidelines.md](coded/coding-guidelines.md)).
|
|
11
|
+
|
|
12
|
+
Notes:
|
|
13
|
+
- `AsEnumerable` / `CopyToDataTable` / `DataRowComparer`: in modern (Windows / cross-platform) they resolve via `System.Data` (the `System.Data.DataSetExtensions` reference is harmless and present by default); **legacy (.NET Framework 4.6.1) requires `System.Data.DataSetExtensions`** — there they live in that assembly, not `System.Data`. Including it in both is the safe default.
|
|
14
|
+
- Drop the `System.Linq` import and `AsEnumerable` won't resolve — the break surfaces at **run** (runtime JIT), not at `uip rpa validate` or even `uip rpa build` packaging.
|
|
15
|
+
|
|
16
|
+
## Choose the approach
|
|
17
|
+
|
|
18
|
+
| Task | Use | Notes |
|
|
19
|
+
|------|-----|-------|
|
|
20
|
+
| Expression filter, no new columns | `dt.Select("[Amount] > 1000")` | returns `DataRow()`; string match is **case-INSENSITIVE** by default; SQL-ish syntax |
|
|
21
|
+
| Filter/sort/group/join/project | **LINQ** | most flexible; ~2× faster than Join Data Tables on large sets |
|
|
22
|
+
| Heavy multi-step transforms, unit-tested logic, safe accessors | **coded** (`.cs`) | C# LINQ inline; see § When to move to coded |
|
|
23
|
+
| Key-value config / counters | `Dictionary` | |
|
|
24
|
+
| Tabular data | `DataTable` | typed columns; LINQ via `.AsEnumerable()` |
|
|
25
|
+
|
|
26
|
+
### When to move to coded
|
|
27
|
+
|
|
28
|
+
When a transform genuinely outgrows a one-liner — >2 statement steps, a reusable safe accessor/helper, mutating rows in a loop, real try/catch around a parse, or an unreadable one-liner — move to a **coded (`.cs`) workflow** ([coded/operations-guide.md](coded/operations-guide.md)). Coded gives `?.`, `out var`, multi-statement logic, and unit tests.
|
|
29
|
+
|
|
30
|
+
**Source file vs workflow — and how to call it:** a bare **Coded Source File** (helper class, no entry point) is callable only from other code. To invoke the logic, make it a **Coded Workflow** (`[Workflow]` + `Execute`) and call it via `RunWorkflow` / the typed `workflows` property (from coded) — see [coded/operations-guide.md](coded/operations-guide.md).
|
|
31
|
+
|
|
32
|
+
Tabular *source/sink*: modern projects use the **Use Excel File** scope (not classic Excel Application Scope) — route to the Excel activity docs.
|
|
33
|
+
|
|
34
|
+
## Safe data access first
|
|
35
|
+
|
|
36
|
+
Production data (Excel, scraping, UI, queues) is full of `DBNull`, blanks, localized numbers, and bad dates. A `DBNull` cell's `.ToString()` returns `""` (no error) — so **bare reads silently propagate blanks**, and `Convert.ToDateTime`/`ParseExact` then **throw on the resulting blank/garbage**; a genuinely null value throws `Object reference not set`. Use direct casts only on **typed, known-non-null** columns (e.g. a Decimal column you built). For String/Excel/scraped columns, read safely.
|
|
37
|
+
|
|
38
|
+
**Reusable safe accessor** — the maintainable form once more than a couple of fields are involved (Coded Source File, plain `.cs`, no `CodedWorkflow` base):
|
|
39
|
+
```csharp
|
|
40
|
+
public static class Row
|
|
41
|
+
{
|
|
42
|
+
public static string Str(DataRow r, string c) => r.IsNull(c) ? "" : r[c].ToString().Trim();
|
|
43
|
+
public static decimal Dec(DataRow r, string c) =>
|
|
44
|
+
decimal.TryParse(Str(r, c), NumberStyles.Any, CultureInfo.InvariantCulture, out var d) ? d : 0m;
|
|
45
|
+
public static DateTime? Date(DataRow r, string c, string fmt) =>
|
|
46
|
+
DateTime.TryParseExact(Str(r, c), fmt, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dt) ? dt : (DateTime?)null;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
Throw a `BusinessRuleException` (not a crash) when invalid business data must stop the item.
|
|
50
|
+
|
|
51
|
+
## DataTable transforms (LINQ)
|
|
52
|
+
|
|
53
|
+
`.AsEnumerable()` first; `.CopyToDataTable()` to produce a DataTable. Casts assume a **typed/clean** column — for String/Excel data wrap fields per § Safe data access first.
|
|
54
|
+
|
|
55
|
+
**Rule — guard `CopyToDataTable()` against empty results (MANDATORY).** It throws `InvalidOperationException: "The source contains no DataRows"` on an empty sequence. `dt.Clone()` = empty table, same schema (`dt.Copy()` = schema + all rows).
|
|
56
|
+
|
|
57
|
+
## Iterating rows & common errors
|
|
58
|
+
|
|
59
|
+
- **Null cells.** A cell may be `DBNull.Value` — see § Safe data access first.
|
|
60
|
+
- **Modify-during-iteration trap (MANDATORY).** Never add/remove rows on the table you are iterating — throws `Collection was modified; enumeration operation may not execute`. Iterate a fresh array (`dt.Select()` returns one) and `AcceptChanges()` after.
|
|
61
|
+
|
|
62
|
+
## Strings & RegEx
|
|
63
|
+
|
|
64
|
+
- Always `Trim()` text from UI/web/Excel; check `String.IsNullOrWhiteSpace(s)` before use.
|
|
65
|
+
- Build strings in loops with `System.Text.StringBuilder` (`sb.AppendLine(...)` then `sb.ToString()`), not concatenation.
|
|
66
|
+
- Format numbers: `value.ToString("N2", Globalization.CultureInfo.InvariantCulture)` (bare `ToString("N2")` follows the machine locale).
|
|
67
|
+
|
|
68
|
+
RegEx via `System.Text.RegularExpressions.Regex` (no package needed).
|
|
69
|
+
|
|
70
|
+
| Pattern | RegEx |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Email | `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` |
|
|
73
|
+
| Phone (US) | `\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}` |
|
|
74
|
+
| Date `MM/DD/YYYY` | `\d{2}/\d{2}/\d{4}` |
|
|
75
|
+
| Currency (USD) | `\$[\d,]+\.?\d{0,2}` |
|
|
76
|
+
| Invoice | `INV-\d{4,10}` |
|
|
77
|
+
| ZIP (US) | `\d{5}(-\d{4})?` |
|
|
78
|
+
| Decimal | `-?\d+\.?\d*` |
|
|
79
|
+
|
|
80
|
+
Patterns are **unanchored** (extraction — `IsMatch`/`Match` find them anywhere in the string). For full-string *validation*, anchor: `^…$` (e.g. ZIP `^\d{5}(-\d{4})?$`).
|
|
81
|
+
|
|
82
|
+
**Escaping the pattern string:** C# coded — verbatim `@"\d+"` or doubled `"\\d+"` (bare `"\d+"` is a compile error). Never mixed: `@"\\d+"` compiles and silently matches a literal backslash instead of digits.
|
|
83
|
+
|
|
84
|
+
Named-group extraction:
|
|
85
|
+
```csharp
|
|
86
|
+
// coded C#: raw <, >, verbatim string
|
|
87
|
+
Regex.Match(input, @"(?<amt>\$[\d,.]+)").Groups["amt"].Value
|
|
88
|
+
```
|
|
89
|
+
Prefer named over positional groups; escape literal dots (`\.`); for untrusted/long input set a timeout against catastrophic backtracking.
|
|
90
|
+
|
|
91
|
+
## DateTime & type conversion
|
|
92
|
+
|
|
93
|
+
Parse with an EXPLICIT format + invariant culture (uppercase `MM` = month, lowercase `mm` = minutes). Wrong case SILENTLY misparses (does not throw): `"mm/dd/yyyy"` on `"06/15/2025"` -> January, `"06"` read as minutes. Only a test catches it.
|
|
94
|
+
|
|
95
|
+
**Parse safely** — for external/user/Excel input use `Integer.TryParse` / `decimal.TryParse` / `DateTime.TryParseExact` (returns `False`, out=default on bad input) rather than throwing parsers.
|
|
96
|
+
|
|
97
|
+
Specify culture for external numbers/dates: `Double.Parse("1,234.56", System.Globalization.CultureInfo.InvariantCulture)`.
|
|
98
|
+
|
|
99
|
+
## Collections
|
|
100
|
+
|
|
101
|
+
C# coded adds collection initializers (`{ ["a"]=1 }`), null-conditional (`dict.GetValueOrDefault("k")?.Trim()`), null-coalescing (`?? ""`).
|
|
102
|
+
|
|
103
|
+
## JSON
|
|
104
|
+
|
|
105
|
+
`Newtonsoft.Json` ships with UiPath projects; use `Newtonsoft.Json.Linq`.
|
|
106
|
+
|
|
107
|
+
## Coded (`.cs`) note
|
|
108
|
+
|
|
109
|
+
Coded workflows use the C# forms directly (`r => r["Col"]`, ternary, `out`, `?.`, `??`, collection initializers, verbatim `@"\d+"` regex, query or method LINQ). Add the `using`s (`System.Data`, `System.Linq`, `System.Text.RegularExpressions`, `System.Globalization`) per [coded/coding-guidelines.md](coded/coding-guidelines.md).
|
|
110
|
+
</content>
|