Process scripts allow you to execute custom JavaScript code as part of a process. Scripts can read process variables, perform calculations or business logic, interact with platform APIs, and return results to the process through output variables.
The script editor automatically provides access to several global objects and services. Process variables are available for both input and output, allowing scripts to exchange data with the process.
Use process scripts when a business requirement cannot be implemented using standard modeling elements alone. Scripts provide flexibility for data transformation, advanced validation, process automation, and integration scenarios.
Tip: When an API requires a repository identifier, pass
null as the repository argument when you want to use the default
repository. Specify a repository ID only when the application targets a specific
repository.
The following actions are available for script use:
| Category | Description |
|---|---|
| Using Process Variables in Scripts | Read and update process variables within the script. |
| Using Integration Attributes in Scripts | Access information about the current process, application, and execution context. |
| Using Runtime Commands in Scripts | Execute process or task operations through the runtime command channel. |
| Runtime APIs | Interact with runtime process and task services and use the responses directly within the script. |
| Query APIs | Retrieve indexed process and task information. |
| Form API | Read, save, and submit form definitions and form data. |
| Repository API | Manage repository content, metadata, security, renditions, records, users, groups, vocabularies, and related objects. |
| ACS Content API | Manage nodes, people, groups, sites, tags, actions, and search capabilities in Alfresco Content Services. |