Add rpa common pitfall with pkgs that end up in proj folder#77
Add rpa common pitfall with pkgs that end up in proj folder#77AdiNicuPopa wants to merge 4 commits intomainfrom
Conversation
| - Use LINQ with explicit conversion: `dtData.AsEnumerable().Where(Function(row) CDbl(row("Amount")) > 1000).CopyToDataTable()` | ||
| - Convert the column type after reading: loop through rows and convert values, or clone the DataTable with the correct column types | ||
|
|
||
| ### `uip rpa restore` dumps .nupkg files into the project directory |
There was a problem hiding this comment.
@aoltean16 shouldn't we rather fail without a destination path? And instruct it like this in there.
I feel like adding this would pollute the skill.
| ### Stale Validation Cache | ||
|
|
||
| Studio may cache validation results internally. If `get-errors` reports persistent errors after multiple edits to the same file — especially OverloadGroup errors that should be resolved by your changes — the cache may be stale. To clear it: | ||
|
|
||
| ```bash | ||
| uip rpa close-project --project-dir "<PROJECT_DIR>" --format json | ||
| uip rpa open-project --project-dir "<PROJECT_DIR>" --format json | ||
| ``` | ||
|
|
||
| Then re-run `get-errors`. This forces Studio to reload all files from disk and revalidate from scratch. | ||
|
|
There was a problem hiding this comment.
We shouldn't do this: closing and reopening studio for every "get errors" isn't a solution.
Also, this has been fixed at the get-errors-command-level. It should now return the freshest errors if you fetch the latest Studio version.
So we should be okay to revert this section.
| ### `uip rpa restore` dumps .nupkg files into the project directory | ||
|
|
||
| When calling `uip rpa restore` without `--destination-path`, the command restores NuGet packages directly into the project root directory, polluting it with hundreds of `.nupkg` files. These are cached package files, not project artifacts, and should not be there. | ||
|
|
||
| **Always specify `--destination-path`** pointing to a location outside the project directory: | ||
|
|
||
| ```bash | ||
| # Correct — restore to a temp/cache directory | ||
| uip rpa restore --project-path "{projectRoot}" --destination-path "{projectRoot}/.local/packages" --format json | ||
|
|
||
| # Wrong — packages end up in project root | ||
| uip rpa restore --project-path "{projectRoot}" --format json | ||
| ``` | ||
|
|
||
| If you already have `.nupkg` files littering the project root, clean them up: | ||
| ```bash | ||
| rm "{projectRoot}"/*.nupkg | ||
| ``` |
There was a problem hiding this comment.
Same for this -- this looks more like something that should be addressed through the command's business logic itself rather than have the model deal with these.
Let's revert this section and open a PR or a Jira to track this change. It should default the package restore dump path to where Studio usually does too.
| | PDF activities (ReadPDFText, GetPDFPageCount, ExtractPDFPageRange, ManagePDFPassword, ExportPDFPageAsImage, ExtractImagesFromPDF, ReadXPSText) | `FileName` (string) | `ResourceFile` (IResource) | — | | ||
| | PDF convert activities (ConvertHtmlToPDF, ConvertTextToPDF) | `FileName` (string, when InputMode=File) | `ResourceFile` (IResource, when InputMode=File) | `Html`/`Text` (string, when InputMode=Content) | |
There was a problem hiding this comment.
There is another table below that handles conditional properties ## Conditional Property Requirements
There was a problem hiding this comment.
moved the conditional properties
skills/uipath-rpa-workflows/SKILL.md
Outdated
| **IMPORTANT — `.Item` child elements:** The default XAML returned by this command may contain `.Item` child elements with `ItemArgument` nodes (e.g., `<activity:SomeActivity.Item><upap:ItemArgument .../></activity:SomeActivity.Item>`). These are internal scaffolding for OverloadGroup (FileName/ResourceFile) switching. **Do NOT copy `.Item` children into your generated XAML.** Instead, set the desired property (e.g., `FileName`) directly on the activity element and omit the `.Item` child. Studio auto-generates the internal structure when it loads the workflow. Including a misconfigured `.Item` child causes `"None of the overload groups have all their required/optional activity arguments configured"` errors. See [common-pitfalls.md](./references/common-pitfalls.md) for details. | ||
|
|
There was a problem hiding this comment.
This is almost the same as the common-pitfalls.md text. Keep just a reference here
801e4de to
de8cc6a
Compare
We noticed this while testing the PDF activities.
Problem: uip rpa restore without --destination-path dumps all NuGet packages into the project root
Fix: Always pass --destination-path (e.g., {projectRoot}/.local/packages) to keep packages out of the project directory
UPDATE: fixing more issues
Issue 1: Studio caches validation results and get-errors might miss some errors.
Fix: updated
skills/uipath-rpa-workflows/references/validation-and-fixing.mdIssue 2: presence of .Item elements may cause "None of the overload groups have all their required/optional activity arguments configured" errors.
Fix: updated
skills/uipath-rpa-workflows/references/common-pitfalls.mdandskills/uipath-rpa-workflows/SKILL.mdIssue 3: agent created workflows in subfolders and named them
x:Class="Subfolder.WorkflowName"; this caused a runtime error because of the dot. Correct version isx:Class="Subfolder_WorkflowName"Fix: added a note in xaml-basics-and-rules.md, under the XAML File Anatomy section