Repository navigation
docs(uipath-rpa): workflow authoring rules, rerun-safe REFramework, XAML and activity pitfalls, uip rpa publish - #3782
danmunteanu1 wants to merge 3 commits into
Conversation
…mework, XAML, Invoke Code and Finally pitfalls, publish and cleanup, bundled activity-doc corrections
|
Claude finished @danmunteanu1's task in 6m 2s —— View job PR Review: docs(uipath-rpa) — workflow authoring rules, rerun-safe REFramework, XAML pitfalls, publish
SummarySubstantial documentation update to Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes; existing frontmatter valid |
| E2E Tests | OK | No new skill folder; existing skill — changes are documentation corrections, not new CLI workflows requiring test coverage |
| Skill Body | OK | New rules 4a/4b well-placed; all cross-references resolve |
| References & Assets | OK | 100+ lines of new pitfall content, all internally consistent; all relative links verified |
| Repo Hygiene | OK | No secrets, no personal paths, no cross-skill file references, no binary files, changes scoped to uipath-rpa |
Issues for Manual Review
Finallycross-file semantics reversal (error-handling-guide.md:66,common-pitfalls.md:350): the prior guidance stated "Finally DOES run when the Catch rethrows (modern, verified)". This PR reverses it to "Finally runs only when the exception is caught inside the same workflow file." This is a significant behavioral claim that changes how agents structure cleanup. The PR description says "verified" but domain experts should confirm the new behavior matches the UiPath runtime.Isolatedinvoke type preservation (error-handling-guide.md:38): previously stated "Isolated invoke loses the type" (BusinessRuleException arrives as System.Exception). Now states the opposite — "Isolated invoke keeps the type." Another reversal of a verified claim. Domain review recommended.- InvokeCode
Languagedefault (common-pitfalls.md:378,InvokeCode.md:8): previously stated "InvokeCode infers the language from the project'sexpressionLanguage". Now states "defaults toVBNetwhatever the project's expression language." The PR removes the "inferred" examples. Domain experts should confirm the actual runtime behavior. uip rpa publishdestination flags: the flag table (cli-reference.md:498-502) lists--personal-workspace,--folder-path/--folder-key,--shared-libraries,--feed-id— these should be verified againstuip rpa publish --helpsince they're new to this doc.
Conclusion
Clean, well-structured PR with high-quality content additions. The changes are internally consistent across all 33 files — when one file's guidance changes, every file that references the same concept is updated in the same PR. The four behavioral reversals (Finally semantics, Isolated type, InvokeCode Language default, coded source file accessibility from XAML) are the only items that warrant domain-expert confirmation before merge, as they contradict previously "verified" claims. No blocking issues found.
|
|
|
||
| Every UIA `N*` activity carries a `Version` attribute in its `uip rpa activities get-default-xaml` starter (e.g. `NGetText Version="V5"`, `NApplicationCard Version="V2"`). Dropping it survives BOTH `validate` and `build` and fails only at runtime with `System.InvalidOperationException ... ThrowIfNotInTree` on the activity's argument bindings. Carry over **every** attribute the starter emits. See [csharp-activity-binding-guide.md § `ThrowIfNotInTree` at runtime](csharp-activity-binding-guide.md#throwifnotintree-at-runtime--two-causes). | ||
|
|
||
| ## OCR Engines in XAML Fail `build` With "please install the UiPath.CoreIPC package" |
There was a problem hiding this comment.
This was fixed by @IonMiron I'll remove the paragraph
There was a problem hiding this comment.
danmunteanu1
left a comment
There was a problem hiding this comment.
Notes on text that changes once a reported defect is fixed.
| The auto-generated `CodedWorkflow` is a `partial class`. You can extend it to add shared methods, properties, or constants available to all workflows and test cases — with or without hooks: | ||
| The auto-generated `CodedWorkflow` is a `partial class`. You can extend it to add shared methods, properties, or constants available to all workflows and test cases — with or without hooks. | ||
|
|
||
| Every part you write names `CodedWorkflowBase` as its base (`: CodedWorkflowBase`, `: CodedWorkflowBase, IBeforeAfterRun` for hooks). `build` compiles the class from a part it generates plus the project's parts, and a project part without the base leaves the class with none: `CS0103: The name 'Log' does not exist`, `CS0103` on `serviceContainer` in `.generated/CodedWorkflow.g.cs`, and `CS1503: cannot convert from '<Workflow>' to 'UiPath.CodedWorkflows.CodedWorkflowBase'` — in process and library projects alike, while `validate` passes. |
There was a problem hiding this comment.
Goes when build gives CodedWorkflow its base whatever the parts declare: UiPath/cli#4890. : CodedWorkflowBase itself stays valid.
| namespace {{PROJECT_NAME}} | ||
| { | ||
| public partial class CodedWorkflow : IBeforeAfterRun | ||
| // Name CodedWorkflowBase on every partial part, or build compiles CodedWorkflow without a base |
There was a problem hiding this comment.
Both template comments go with UiPath/cli#4890; the base itself stays.
| | **`CS0103 'uiAutomation'` (or `workflows` lacks a workflow method), `CodedWorkflow.cs` present and `build` green** | The coded base partials are a first-load snapshot and don't refresh in-session (§ Configure UI Targets); a package or cross-called workflow was added after they generated | Regenerate: delete `.local/.codedworkflows/`, restart the headless host, `validate`. Prevent by installing all packages + writing the stub before the first `uip rpa` command. | | ||
| | **Runs invoke stale code after a signature change**, or `run` fails in `.local/install/<Class>+<Class>Activity.cs` with `There is no argument given that corresponds to the required parameter` | Generated wrapper (`*+Activity.cs` / WorkflowRunnerService) not regenerated | Re-run `uip rpa build` after changing an Execute signature; never hand-patch generated files under `.local/` | | ||
| | **`validate` (or the pre-validation in `run` / `debug start`) fails with `CS0246 'CodedWorkflow' could not be found` plus `CS0103` on `uiAutomation` / `Log`, while `build` is green** | `.local\.codedworkflows\CodedWorkflow.cs` is missing. The host generates it only while loading a project that already has a `[Workflow]`/`[TestCase]` `.cs`; a host that loaded stub-less (e.g. the window baseline ran before the stub) never emits it — `build` stays green, `validate`/`run` stay CS0246. Not a source or using defect | **Prevent:** write the coded stub before the first `uip rpa` command (SKILL.md § Capture-First Fast Path step 2). **Already stale:** run `uip rpa project close --project-dir "<PROJECT_DIR>"`, then re-run `validate`. | | ||
| | **`build` fails with `CS0103 'Log'`, `CS0103 'serviceContainer'` in `.generated/CodedWorkflow.g.cs` and `CS1503 cannot convert … to 'UiPath.CodedWorkflows.CodedWorkflowBase'`, while `validate` is clean** | A project file declares `partial class CodedWorkflow` without naming `CodedWorkflowBase` | Add `: CodedWorkflowBase` to that declaration ([codedworkflow-reference.md § Extending CodedWorkflow with Partial Classes](codedworkflow-reference.md#extending-codedworkflow-with-partial-classes)) | |
There was a problem hiding this comment.
Row goes with UiPath/cli#4890.
| ``` | ||
|
|
||
| 4. **Author against the library in consumer XAML.** Library activities are not in the `activities find` catalog and `activities get-default-xaml` does not load library types — get the activity surface from the package itself: | ||
| 4. **Author against the library in consumer XAML.** Once the library is installed, `activities find` returns its public workflows and `activities get-default-xaml` returns each one's element with its arguments as properties, without their types or directions — read those from the package itself: |
There was a problem hiding this comment.
Changes when activities get-default-xaml returns each argument with its direction and type: UiPath/cli#4895. Reading them from the package is then unnecessary.
| Without the import, `validate` and `build` fail with `CS0103` / `BC30451` on a helper's name and `CS0246` / `BC30002` on a type name. Types shared across projects belong in a library ([../library-authoring-guide.md](../library-authoring-guide.md)). | ||
|
|
||
| **Fix:** inline the logic in `InvokeCode`, or invoke a coded workflow via `InvokeWorkflowFile`. Helpers shared across projects belong in a library ([../library-authoring-guide.md](../library-authoring-guide.md)). | ||
| The project's Studio host compiles the coded files when it loads the project, so a `.cs` file added later — or a member added or changed in an existing one — stays invisible to XAML: `validate`, `build` and `run` keep reporting the type or member as missing (`CS0103`, `CS0246`, VB `BC30451`, `BC30456`) with the import in place. Run `uip rpa project close --project-dir "<PROJECT_DIR>"` and validate again; the next command reloads the project. |
There was a problem hiding this comment.
Goes when the headless host regenerates its view of the coded files after a change; shrinks to the reload command if uip rpa project close only gets documented and also regenerates .local/.codedworkflows/. STUD-81658.
There was a problem hiding this comment.
| | **Runs invoke stale code after a signature change**, or `run` fails in `.local/install/<Class>+<Class>Activity.cs` with `There is no argument given that corresponds to the required parameter` | Generated wrapper (`*+Activity.cs` / WorkflowRunnerService) not regenerated | Re-run `uip rpa build` after changing an Execute signature; never hand-patch generated files under `.local/` | | ||
| | **`validate` (or the pre-validation in `run` / `debug start`) fails with `CS0246 'CodedWorkflow' could not be found` plus `CS0103` on `uiAutomation` / `Log`, while `build` is green** | `.local\.codedworkflows\CodedWorkflow.cs` is missing. The host generates it only while loading a project that already has a `[Workflow]`/`[TestCase]` `.cs`; a host that loaded stub-less (e.g. the window baseline ran before the stub) never emits it — `build` stays green, `validate`/`run` stay CS0246. Not a source or using defect | **Prevent:** write the coded stub before the first `uip rpa` command (SKILL.md § Capture-First Fast Path step 2). **Already stale:** run `uip rpa project close --project-dir "<PROJECT_DIR>"`, then re-run `validate`. | | ||
| | **`build` fails with `CS0103 'Log'`, `CS0103 'serviceContainer'` in `.generated/CodedWorkflow.g.cs` and `CS1503 cannot convert … to 'UiPath.CodedWorkflows.CodedWorkflowBase'`, while `validate` is clean** | A project file declares `partial class CodedWorkflow` without naming `CodedWorkflowBase` | Add `: CodedWorkflowBase` to that declaration ([codedworkflow-reference.md § Extending CodedWorkflow with Partial Classes](codedworkflow-reference.md#extending-codedworkflow-with-partial-classes)) | | ||
| | **`CS0103 'uiAutomation'` (or `CS1061` on `workflows.<Workflow>`), `CodedWorkflow.cs` present and `build` green** | The coded base partials are a first-load snapshot; a package or cross-called workflow was added after they generated | Reload per § Configure UI Targets. | |
There was a problem hiding this comment.
Goes when the host regenerates its coded snapshot after a change (STUD-81658).
There was a problem hiding this comment.
| **Prevention:** Always check `project.json` `expressionLanguage` before writing any expression. Never mix languages. | ||
|
|
||
| ## Missing Assembly References | ||
| ## Assembly References Studio Requires and the CLI Does Not Check |
There was a problem hiding this comment.
Section and its pointers go when the Studio designer resolves expression types as build does; it becomes a CLI warning to act on if the CLI starts reporting what the designer reports. Not filed yet.
| </ui:AddDataRow.DataTable> | ||
| <ui:AddDataRow.ArrayRow> | ||
| <InArgument x:TypeArguments="x:Object[]">[New Object() {"Alice", 30, "HR"}]</InArgument> | ||
| <InArgument x:TypeArguments="s:Object[]">[New Object() {"Alice", 30, "HR"}]</InArgument> |
There was a problem hiding this comment.
Matches UiPath/Activities#40392; replaced by the package's own text when the bundled copy is refreshed.
| ## Language Attribute | ||
|
|
||
| By default, InvokeCode infers the language from the project's `expressionLanguage` setting in `project.json`, so omitting the `Language` attribute is usually fine. However, if you do set it explicitly, use the correct enum values — they differ from `project.json`: | ||
| `Language` defaults to `VBNet` whatever the project's `expressionLanguage` is: without it, a C# body is compiled as VB.NET and fails with VB `BC3xxxx` errors. Set it on every InvokeCode. The enum values differ from `project.json`: |
There was a problem hiding this comment.
Matches UiPath/Activities#40393; replaced by the package's own text when the bundled copy is refreshed, and the Invoke Code entries in xaml/common-pitfalls.md can then point to the package doc.
| | Enum | Values | | ||
| |------|--------| | ||
| | `OrderBy` | `NewestFirst`, `OldestFirst` | | ||
| | `OrderBy` | `NewestFirst`, `OldestFirst` — not applied by `GetEmails`: either value returns the same emails in the same order; sort the result by `Item.ReceivedDateTime` for oldest first | |
There was a problem hiding this comment.
Matches UiPath/Activities#40391; replaced by the package's own text when the bundled copy is refreshed.
…coded fallback when the message appears
…tion, same-version library repack
Split from #3460 so each skill's changes reach its own code owners. Found while building automations from genomes.
Changes
SKILL.md
.xaml/.cswith Write and Edit, never a generator script — Object Repository links survive Edit, not regeneration.uip rpa cleanup --dry-run.CLI and packaging (
cli-reference.md,library-authoring-guide.md)uip rpa publishreplacesuip or packages upload/uip or libraries upload: destination by package type, destination flags and refusals,409on a duplicate version, a test package needs a Publishable test case.buildwritesentry-points.jsonandbindings_v2.jsonunder.local/content/;uip rpa cleanup; an 8.3 short--project-dirbreaksrun.XAML and coded pitfalls (
xaml/common-pitfalls.md, activity and pattern cards, coded references)Languagedefaults toVBNetwhatever the project language; child-elementCodeloses its line breaks.ContinueOnErrorandIsolatedincluded;Isolatedkeeps the exception type; out/in-out values when the callee faults.WorkflowFileNamehides the callee from the designer; a callee argument named like an activity property fails validation.clr-namespacealias (s:Object[]), neverx:; While / DoWhile / ForEachConditionhas noInArgumentwrapper.<Project>.Corereference; assembly references Studio requires and the CLI never checks; every partialCodedWorkflownamesCodedWorkflowBase.xml:space="preserve"); folder named like a workflow beside it failsbuildwith CS0101; OCR engines fail headlessbuildon the CoreIPC check; database activity parameters; AppendLine, CopyFolderX and DeleteFileX behaviour.REFramework (
reframework-guide.md)Bundled activity docs
Condition, AppendLine, CopyFolderX, KillProcessAppliesTomembers, InvokeWorkflow arguments, AddDataRows:Object[], InvokeCodeLanguage, O365GetEmailsOrderBy. The last three match package-doc PRs UiPath/Activities#40391, #40392 and #40393.Execution maps