- Introdução
- Trabalhando com Coded Apps
- Apps codificados no Studio Web
- Apps de ação codificados
- Sobre Action Apps codificados
- Criação e implantação de Apps de ação codificados
- Exemplo de Apps de ação codificados
Criação e implantação de Apps de ação codificados
Build and deploy a Coded Action App in UiPath: what you need before you start, how the app exchanges data with Action Center, how to test it locally, and how to deploy it as a task interface.
Um aplicativo de ação codificado passa pelo mesmo ciclo de vida que qualquer aplicativo codificado: ele é definido no código, conectado à UiPath, implantado no Orchestrator e usado como interface para uma tarefa do Action Center.
O processo inclui as seguintes etapas:
- Definir a lógica do aplicativo de ação em um Ambiente de Desenvolvimento Integrado (IDE).
- Estabelecendo uma conexão segura com a UiPath.
- Implantando o aplicativo de ação no Orchestrator.
- Usando o aplicativo de ação como a interface do usuário para tarefas do Action Center. Um aplicativo de ação codificado pode servir como interface para tarefas criadas em todas as superfícies, incluindo agentes, processos de RPA e processos do Maestro.
Antes de começar
Make sure the following are in place:
- A local development environment with Node.js 20.x or newer, and npm, used to build the app and install the UiPath tooling. Download the installer from nodejs.org, which includes npm. To check what is already installed, run
node -vandnpm -v. - The UiPath CLI, with the
codedapptool installed. For installation instructions, see the UiPath CLI guide. - Permission to publish packages and deploy apps in the Orchestrator folder you are targeting.
Depending on what it does, an action app might also need an External App ID:
| If your action app | External App ID required |
|---|---|
| Reads and completes the task only | Não |
| Also calls other UiPath services, such as Orchestrator or Data Fabric | Sim |
Where an External App ID is required, it must come from an external application registered in your organization. An action app runs in the browser and cannot store an app secret, so register it as a Non-confidential application with user scopes. To register one, see Adding an external application in the Automation Cloud admin guide.
Build the action app
A Coded Action App runs inside a sandboxed frame rendered by Action Center, so it cannot read or write task data directly. The UiPath Coded Action App SDK bridges that gap, giving the app four things it can do:
- Receive the task and its data when the app loads.
- Notify Action Center when the user edits the form, so that it can enable the Save button.
- Complete the task with the action the user chose and the final data.
- Display messages to the user inside Action Center.
Beyond those four, UiPath adds two pieces of one-time setup to an otherwise ordinary web project:
- A connection to your organization. A small configuration file at the root of the project identifies your organization, tenant, and External App ID, where one is needed.
- A local development setup. A UiPath plugin for the project's build tool supplies that same configuration while the app runs on the developer's machine, so the app can be tested against a real tenant before it is deployed.
For the full developer setup, including the SDK methods, the configuration file, the build tool plugin, and the adjustments the app needs before it is packaged, see the Coded Action App SDK documentation.
Test the action app locally
Action Center offers a task simulation experience for Coded Action Apps that run on localhost. Two pieces of configuration are needed on the UiPath side before it works.
Add the Action Center redirect URI to your external application
Add the redirect URI https://<host>/<orgId>/<tenantId>/actions_ to the external application your action app uses, where <host> is the environment you sign in to, such as cloud.uipath.com.
<orgId> and <tenantId> are the GUIDs, not the organization and tenant names shown in the browser address bar. A missing entry, or one that uses names instead of GUIDs, fails with invalid_request or Invalid redirect_uri.
To retrieve both GUIDs, sign in with uip login, then run:
uip login status --output json
uip login status --output json
The response returns them as OrganizationId and TenantId.
This entry is normally added the first time a Coded Action App that uses the external application is deployed. To read the exact value your app sends, open the app and copy redirect_uri from the /identity_/connect/authorize request in your browser's network tab.
Open the Action Center debug page
- Go to
https://<host>/<orgName>/<tenantName>/actions_/debug/coded-action-app. This page addresses your organization and tenant by name, unlike the redirect URI. - Enter the details of your app, then load it.
Deploy the action app
Deployment happens in two parts: the developer packages and publishes the action app, then you deploy that package to an Orchestrator folder.
Package and publish the action app
A Coded Action App is published to Orchestrator as a .nupkg package, the same package format used for automations. It is published with --type Action, which registers it so that it can be selected as the user interface for an Action Center task.
-
Build the app:
npm run buildnpm run build -
Package the build output:
uip codedapp pack dist -n <appName> --version 1.0.0uip codedapp pack dist -n <appName> --version 1.0.0 -
Sign in to your UiPath organization:
uip loginuip login -
Publish the package as an action app, to a tenant feed or a personal workspace feed:
uip codedapp publish --type Actionuip codedapp publish --type Action -
Deploy the app:
uip codedapp deployuip codedapp deploy
For the full argument list of each command, see uip codedapp in the UiPath CLI guide.
Deploy the action app from Orchestrator
If the package has already been published, or if you prefer not to use the command line, deploy the action app from Orchestrator instead.
- In Orchestrator, go to Tenant > Packages.
- Select Upload and upload the
.nupkgfile created byuip codedapp pack. For the detailed procedure, see Managing packages. - Go to the folder where you want to deploy the app, and go to Automations > Apps.
- Select Deploy app, then select your app and its version. For the detailed procedure, see Managing apps.
Deploy the action app from Studio Web
If the action app is built as a coded app project inside a Studio Web solution, it is packaged and deployed together with that solution rather than on its own. The version of the action app stays in lockstep with the workflows, agents, and resources it depends on.
-
Build the app locally, then push it into the Studio Web project:
uip codedapp push --project-id <project-id>uip codedapp push --project-id <project-id> -
In Studio Web, open the solution and select Deploy.
-
Set the package version, choose whether to pack to your personal workspace or to a shared one, name the deployment, select folder and select Deploy.
For the full set of options in the deployment panel, see Publishing and deploying solutions in the Studio Web user guide.
After deployment, the action app is available in Action Center and can be assigned as the interface for a task.