Skip to content

WIP feat: add coded workflow API support for all activity packages [STUD-79807]#542

Open
viogroza wants to merge 2 commits intodevelopfrom
feature/coded_support
Open

WIP feat: add coded workflow API support for all activity packages [STUD-79807]#542
viogroza wants to merge 2 commits intodevelopfrom
feature/coded_support

Conversation

@viogroza
Copy link
Copy Markdown
Collaborator

Introduces UiPath.{Category}.Activities.API projects for Cryptography, Database, FTP, Java, Python, and Credentials.
Each package exposes a typed service interface (ICryptographyService, IDatabaseService, IFtpService, IJavaService, IPythonService, ICredentialsService) and registers it with the coded workflows service locator via ICodedWorkflowsServiceRegistry, making the services available as injected dependencies in coded workflow classes.

Scope-based packages (FTP, Java, Python) additionally expose IXxxScopeHandle types and static extension operations classes (FtpOperations, JavaOperations, PythonOperations) for fluent use within a session.

All API projects include unit test coverage and are wired into every per-category solution file and the community solution.

https://uipath.atlassian.net/browse/STUD-79807

TO DO

…79807]

Introduces UiPath.{Category}.Activities.API projects for Cryptography,
Database, FTP, Java, Python, and Credentials. Each package exposes a
typed service interface (ICryptographyService, IDatabaseService,
IFtpService, IJavaService, IPythonService, ICredentialsService) and
registers it with the coded workflows service locator via
ICodedWorkflowsServiceRegistry, making the services available as
injected dependencies in coded workflow classes.

Scope-based packages (FTP, Java, Python) additionally expose
IXxxScopeHandle types and static extension operations classes
(FtpOperations, JavaOperations, PythonOperations) for fluent use
within a session.

All API projects include unit test coverage and are wired into every
per-category solution file and the community solution.
@viogroza viogroza changed the title feat: add coded workflow API support for all activity packages [STUD-79807] WIP feat: add coded workflow API support for all activity packages [STUD-79807] Apr 28, 2026
@viogroza viogroza requested a review from Copilot April 28, 2026 14:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds “coded workflow API” surface area for multiple Activities packages by introducing per-category UiPath.{Category}.Activities.API projects that register typed services (and, where applicable, scope handles + fluent operations) into the coded workflows service locator so they can be injected/auto-imported in coded workflows.

Changes:

  • Added new *.Activities.API and *.Activities.API.Tests projects for Python, Java, FTP, Database, Cryptography, and Credentials (services, registries, models, operations, and tests).
  • Updated packaging projects to include the API DLL/XML in produced packages and added required dependencies (UiPath.CodedWorkflows, etc.).
  • Updated solution files and central package versions (UiPath.Platform, UiPath.Telemetry.Client, added UiPath.CodedWorkflows).

Reviewed changes

Copilot reviewed 81 out of 82 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
Activities/Python/UiPath.Python/Properties/AssemblyInfo.cs Exposes internals to API test project.
Activities/Python/UiPath.Python.Packaging/UiPath.Python.Packaging.csproj Packages Python API DLL/XML; adds project/package references for coded workflows.
Activities/Python/UiPath.Python.Activities/RunScript.cs Refactors to call internal helper for coded-ops reuse.
Activities/Python/UiPath.Python.Activities/Properties/AssemblyInfo.cs Exposes internals to API + API test assemblies.
Activities/Python/UiPath.Python.Activities/LoadScript.cs Refactors to call internal helper for coded-ops reuse.
Activities/Python/UiPath.Python.Activities/InvokeMethod.cs Refactors to call internal helper for coded-ops reuse.
Activities/Python/UiPath.Python.Activities/GetObject.cs Refactors to call internal helper for coded-ops reuse.
Activities/Python/UiPath.Python.Activities.API/UiPath.Python.Activities.API.csproj New Python coded-workflow API implementation project.
Activities/Python/UiPath.Python.Activities.API/Services/PythonService.cs Implements IPythonService + scope creation/init.
Activities/Python/UiPath.Python.Activities.API/Services/IPythonService.cs Public Python coded-workflow service contract.
Activities/Python/UiPath.Python.Activities.API/PythonRegistry.cs Registers Python service + auto-imports.
Activities/Python/UiPath.Python.Activities.API/Properties/AssemblyInfo.cs Exposes internals to API test assembly.
Activities/Python/UiPath.Python.Activities.API/Models/PythonScopeOptions.cs Options object for Python scope initialization.
Activities/Python/UiPath.Python.Activities.API/Models/IPythonScopeHandle.cs Scope handle wrapping Python engine lifecycle.
Activities/Python/UiPath.Python.Activities.API/Extensions/PythonOperations.cs Fluent extension operations for Python scope (script/code/invoke/convert).
Activities/Python/UiPath.Python.Activities.API.Tests/UiPath.Python.Activities.API.Tests.csproj New Python API unit test project.
Activities/Python/UiPath.Python.Activities.API.Tests/PythonServiceTests.cs Tests for PythonService guard clauses/behavior (with skip for real runtime).
Activities/Python/UiPath.Python.Activities.API.Tests/PythonOperationsTests.cs Tests for PythonOperations engine forwarding + disposal behavior.
Activities/Python/Directory.build.props Adds a build comment (contains a typo).
Activities/Java/UiPath.Java/Properties/AssemblyInfo.cs Exposes internals to Java API + API tests.
Activities/Java/UiPath.Java.Activities.Packaging/UiPath.Java.Activities.Packaging.csproj Packages Java API DLL/XML; adds coded workflow dependencies + reference.
Activities/Java/UiPath.Java.Activities.Design/UiPath.Java.Activities.Design.csproj Removes nuspec None include (cleanup).
Activities/Java/UiPath.Java.Activities.API/UiPath.Java.Activities.API.csproj New Java coded-workflow API implementation project.
Activities/Java/UiPath.Java.Activities.API/Services/JavaService.cs Implements IJavaService + invoker start logic.
Activities/Java/UiPath.Java.Activities.API/Services/IJavaService.cs Public Java coded-workflow service contract.
Activities/Java/UiPath.Java.Activities.API/Properties/AssemblyInfo.cs Java API assembly attributes + InternalsVisibleTo tests.
Activities/Java/UiPath.Java.Activities.API/Models/JavaScopeOptions.cs Options object for Java scope initialization.
Activities/Java/UiPath.Java.Activities.API/Models/IJavaScopeHandle.cs Scope handle wrapping Java invoker lifecycle.
Activities/Java/UiPath.Java.Activities.API/JavaRegistry.cs Registers Java service + auto-imports.
Activities/Java/UiPath.Java.Activities.API/Extensions/JavaOperations.cs Fluent extension operations for Java scope (load jar/invoke/get fields/convert).
Activities/Java/UiPath.Java.Activities.API.Tests/UiPath.Java.Activities.API.Tests.csproj New Java API unit test project.
Activities/Java/UiPath.Java.Activities.API.Tests/JavaServiceTests.cs Tests for JavaService guard clauses/behavior (with skip for real runtime).
Activities/Java/UiPath.Java.Activities.API.Tests/JavaOperationsTests.cs Tests for JavaOperations invoker forwarding + validation.
Activities/FTP/UiPath.FTP.Activities.Packaging/UiPath.FTP.Activities.Packaging.csproj Packages FTP API DLL/XML; adds coded workflow deps + reference.
Activities/FTP/UiPath.FTP.Activities.API/UiPath.FTP.Activities.API.csproj New FTP coded-workflow API implementation project.
Activities/FTP/UiPath.FTP.Activities.API/Services/IFtpService.cs Public FTP coded-workflow service contract.
Activities/FTP/UiPath.FTP.Activities.API/Services/FtpService.cs Implements FTP session creation/open + returns scope handle.
Activities/FTP/UiPath.FTP.Activities.API/Properties/AssemblyInfo.cs Exposes internals to FTP API tests.
Activities/FTP/UiPath.FTP.Activities.API/Models/IFtpScopeHandle.cs Scope handle wrapping FTP session lifecycle.
Activities/FTP/UiPath.FTP.Activities.API/Models/FtpScopeOptions.cs Options object for FTP/SFTP session configuration.
Activities/FTP/UiPath.FTP.Activities.API/FtpRegistry.cs Registers FTP service + auto-imports.
Activities/FTP/UiPath.FTP.Activities.API/Extensions/FtpOperations.cs Fluent extension operations for FTP session.
Activities/FTP/UiPath.FTP.Activities.API.Tests/UiPath.FTP.Activities.API.Tests.csproj New FTP API unit test project.
Activities/FTP/UiPath.FTP.Activities.API.Tests/FtpServiceTests.cs Tests for FtpService guard clauses/behavior (with skip for real server).
Activities/FTP/UiPath.FTP.Activities.API.Tests/FtpOperationsTests.cs Tests for FtpOperations session forwarding + null validation.
Activities/Directory.build.targets Updates shared package versions + adds UiPath.CodedWorkflows central version.
Activities/Database/UiPath.Database.Activities.Packaging/UiPath.Database.Activities.Packaging.csproj Packages DB API DLL/XML; adds coded workflow deps + references.
Activities/Database/UiPath.Database.Activities.API/UiPath.Database.Activities.API.csproj New Database coded-workflow API implementation project.
Activities/Database/UiPath.Database.Activities.API/Services/IDatabaseService.cs Public Database coded-workflow service contract.
Activities/Database/UiPath.Database.Activities.API/Services/DatabaseService.cs Implements DB connection creation with guard clauses.
Activities/Database/UiPath.Database.Activities.API/Properties/AssemblyInfo.cs Exposes internals to DB API tests.
Activities/Database/UiPath.Database.Activities.API/Models/DatabaseScopeOptions.cs Options object for DB connection creation.
Activities/Database/UiPath.Database.Activities.API/DatabaseRegistry.cs Registers Database service + auto-imports.
Activities/Database/UiPath.Database.Activities.API.Tests/UiPath.Database.Activities.API.Tests.csproj New Database API unit test project.
Activities/Database/UiPath.Database.Activities.API.Tests/DatabaseServiceTests.cs Tests for DatabaseService guard clauses + factory usage.
Activities/Cryptography/UiPath.Cryptography.Activities.Packaging/UiPath.Cryptography.Activities.Packaging.csproj Packages Crypto API DLL/XML; adds coded workflow deps + references.
Activities/Cryptography/UiPath.Cryptography.Activities.API/UiPath.Cryptography.Activities.API.csproj New Cryptography coded-workflow API implementation project.
Activities/Cryptography/UiPath.Cryptography.Activities.API/Services/ICryptographyService.cs Public Cryptography coded-workflow service contract.
Activities/Cryptography/UiPath.Cryptography.Activities.API/Services/CryptographyService.cs Implements crypto operations via existing helper methods.
Activities/Cryptography/UiPath.Cryptography.Activities.API/Properties/AssemblyInfo.cs Exposes internals to Crypto API tests.
Activities/Cryptography/UiPath.Cryptography.Activities.API/CryptographyRegistry.cs Registers Cryptography service + auto-imports.
Activities/Cryptography/UiPath.Cryptography.Activities.API.Tests/UiPath.Cryptography.Activities.API.Tests.csproj New Cryptography API unit test project.
Activities/Cryptography/UiPath.Cryptography.Activities.API.Tests/CryptographyServiceTests.cs Tests for crypto operations + guard clauses.
Activities/Credentials/UiPath.Credentials.Packages/UiPath.Credentials.Packages.csproj Packages Credentials API DLL/XML; adds coded workflow deps + references.
Activities/Credentials/UiPath.Credentials.Activities.API/UiPath.Credentials.Activities.API.csproj New Credentials coded-workflow API implementation project.
Activities/Credentials/UiPath.Credentials.Activities.API/Services/ICredentialsService.cs Public Credentials coded-workflow service contract.
Activities/Credentials/UiPath.Credentials.Activities.API/Services/CredentialsService.cs Implements credential manager operations + prompt handling.
Activities/Credentials/UiPath.Credentials.Activities.API/Properties/AssemblyInfo.cs Exposes internals to Credentials API tests.
Activities/Credentials/UiPath.Credentials.Activities.API/Models/RequestCredentialResult.cs Result record for credential prompt.
Activities/Credentials/UiPath.Credentials.Activities.API/Models/GetSecureCredentialResult.cs Result record for secure credential retrieval.
Activities/Credentials/UiPath.Credentials.Activities.API/Models/GetCredentialResult.cs Result record for credential retrieval.
Activities/Credentials/UiPath.Credentials.Activities.API/CredentialsRegistry.cs Registers Credentials service + auto-imports.
Activities/Credentials/UiPath.Credentials.Activities.API.Tests/UiPath.Credentials.Activities.API.Tests.csproj New Credentials API unit test project.
Activities/Credentials/UiPath.Credentials.Activities.API.Tests/CredentialsServiceTests.cs Tests for credentials operations + guard clauses + round-trips.
Activities/Community.Activities.sln Adds new API projects to community solution and bumps VS version header.
Activities/Activities.Python.sln Adds Python API projects; updates VS version header (contains invalid suffix).
Activities/Activities.Java.sln Adds Java API projects; updates VS version header (contains invalid suffix).
Activities/Activities.FTP.sln Adds FTP API projects; updates VS version header (contains invalid suffix).
Activities/Activities.Database.sln Adds Database API projects; updates VS version header (contains invalid suffix).
Activities/Activities.Cryptography.sln Adds Cryptography API projects; updates VS version header (contains invalid suffix).
Activities/Activities.Credentials.sln Adds Credentials API projects; updates VS version header (contains invalid suffix).
.gitignore Ignores local Claude settings file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Activities/Activities.FTP.sln Outdated
Comment thread Activities/Activities.Credentials.sln Outdated
Comment thread Activities/Python/UiPath.Python.Activities.API/Services/PythonService.cs Outdated
Comment thread Activities/Java/UiPath.Java.Activities.API/Services/CJavaService.cs
Comment thread Activities/Python/Directory.build.props Outdated
Comment thread Activities/Java/UiPath.Java.Activities.API/Models/IJavaScopeHandle.cs Outdated
Comment thread Activities/Python/UiPath.Python.Activities.API/Extensions/PythonOperations.cs Outdated
Comment thread Activities/Activities.Java.sln Outdated
Copy link
Copy Markdown
Collaborator

@alexandru-petre alexandru-petre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of the new coded-workflow API surface. Posting 14 line-level findings (critical / high / medium). Holding low-severity nits and pre-existing issues.

Themes:

  • Lifecycle / concurrency: the Java and Python scope handle Dispose() implementations have a check-then-set race on _disposed; JavaService.UseJavaScope orphans an IInvoker if StartJavaService throws.
  • Security / contracts: ICryptographyService only exposes string keys/passphrases (no SecureString overloads, no IV/mode parameters); RequestCredential calls a modal Win32 dialog from a service-locator service and returns the password as both a plain string and a SecureString — callers will reach for the easy field.
  • ABI hygiene: UiPath.Java and UiPath.Python.Activities now declare InternalsVisibleTo to the new public-shipping *.Activities.API assemblies; the API project then calls internal members of the legacy activities, turning those internals into de-facto public ABI.
  • Build hygiene: every .sln was bumped from VS 17 to VS 18 (a non-GA stamp); .gitignore carries a contributor-local Claude Code config; the cryptography API targets $(PortableFramework) but its test project targets $(WindowsFramework); the Credentials API csproj sets UseWpf=true and references UiPath.Workflow for what is supposed to be a service-contract assembly.
  • API ergonomics: timeout units differ across packs (int? ms / int ms / double seconds); registry lifetimes are unspecified; *Operations.GetSession() casts the public handle to a concrete internal type, making third-party stubs throw at runtime.

Held (low / pre-existing): JavaOperations.ResolveTypes null coercion, DatabaseScopeOptions.ConnectionString redaction marker, missing docs/samples (already in the PR's TODO list), key-byte zeroization (folded into the string-key comment).

Comment thread .gitignore
Comment thread Activities/Community.Activities.sln Outdated
Comment thread Activities/Java/UiPath.Java.Activities.API/Services/JavaService.cs Outdated
Comment thread Activities/Python/UiPath.Python.Activities/Properties/AssemblyInfo.cs Outdated
Comment thread Activities/FTP/UiPath.FTP.Activities.API/Extensions/FtpOperations.cs Outdated
Address review findings
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants