
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@uipath/coded-action-app
Advanced tools
UiPath package to be used for viewing coded action apps in Action Center
An SDK enabling coded apps to be the UI for tasks within UiPath Action Center. SDK handles bi-directional communication between the coded app and UiPath Action Center host using window.postMessage events.
npm install @uipath/coded-action-app
Action Center renders a coded action app within an iframe. @uipath/coded-action-app provides service CodedActionAppService which offers below capabilities:
getTask() - On app load, UiPath Action Center provides the task details.setTaskData() - Notify Action Center when task data changes (e.g. to enable the Save button).completeTask() - Completes the task when user clicks on submit buttons (e.g. 'Approve' or 'Reject' buttons)showMessage() - Displays toast messages inside Action Center.import { CodedActionAppService } from '@uipath/coded-action-app';
const service = new CodedActionAppService();
The class is also exported under the alias CodedActionApp for convenience:
import { CodedActionApp } from '@uipath/coded-action-app';
const service = new CodedActionApp();
Call this once when the app loads. It sends an AC.init event to Action Center and waits for the task data to be posted back. (Recommended: Do not call it more than once in your app)
const taskData = await service.getTask();
console.log(taskData.taskId); // number
console.log(taskData.title); // string
console.log(taskData.status); // TaskStatus enum
console.log(taskData.isReadOnly); // boolean
console.log(taskData.data); // the task's form data
console.log(taskData.folderId); // number
console.log(taskData.folderName); // string
console.log(taskData.theme); // Theme enum — the UI theme Action Center is currently using
Note: This call will reject with an error if Action Center does not respond within 3 seconds, or if the parent origin is not trusted.
Call this whenever the user modifies the task form data. Action Center uses this signal to enable its Save button. Make sure to pass the full current task data.
service.setTaskData({ field: 'updatedValue' });
Call this when the user submits the form to mark the task as complete. Provide the action taken (e.g. "Approve" or "Reject") and the final data payload. The call returns a Promise<TaskCompleteResponse> that resolves once Action Center confirms the completion.
const result = await service.completeTask('Approve', { approved: true, notes: 'Looks good' });
if (!result.success) {
console.error(result.errorMessage);
}
Note: Only one
completeTaskcall may be in flight at a time. Calling it again before the previous call resolves will throw an error:"A completeTask call is already in progress".
Show a toast notification inside Action Center using one of the four severity levels.
import { MessageSeverity } from '@uipath/coded-action-app';
service.showMessage('Validation successful', MessageSeverity.Success);
service.showMessage('Validation failed', MessageSeverity.Error);
service.showMessage('Please review the details', MessageSeverity.Warning);
service.showMessage('User information', MessageSeverity.Info);
CodedActionAppService| Method | Description |
|---|---|
getTask() | Returns a Promise<Task> with the current task's metadata and form data. |
setTaskData(data) | Sends updated data to Action Center to signal that the form has changed. |
completeTask(actionTaken, data) | Marks the task as complete with the given action label and final data. Returns Promise<TaskCompleteResponse>. Throws if a call is already in progress. |
showMessage(msg, type) | Displays a toast message in Action Center with the given severity. |
Tasktype Task = {
taskId: number;
title: string;
status: TaskStatus;
isReadOnly: boolean;
action: string | null;
data: unknown;
folderId: number;
folderName: string;
theme: Theme;
};
TaskStatusenum TaskStatus {
Unassigned = 'Unassigned',
Pending = 'Pending',
Completed = 'Completed',
}
ThemeThe UI theme that Action Center is currently using, passed to the coded action app on load via getTask. Apply this to your app's styling so it matches the Action Center host.
enum Theme {
AutoTheme = 'autoTheme',
Light = 'light',
Dark = 'dark',
LightHighContrast = 'light-hc',
DarkHighContrast = 'dark-hc',
}
TaskCompleteResponseReturned by completeTask when Action Center responds.
type TaskCompleteResponse = {
success: boolean;
errorCode: number | null;
errorMessage: string | null;
};
MessageSeverityenum MessageSeverity {
Info = 'info',
Success = 'success',
Warning = 'warning',
Error = 'error',
}
FAQs
UiPath package to be used for viewing coded action apps in Action Center
The npm package @uipath/coded-action-app receives a total of 144 weekly downloads. As such, @uipath/coded-action-app popularity was classified as not popular.
We found that @uipath/coded-action-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 22 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.