A Script Executor is triggered based on the script’s programming language.
A Docker container is created with the necessary libraries already built in.
Each Docker container includes the ProcessMaker Platform Software Development Kit (SDK), enabling programmatic interaction and extensibility within the platform.
The script runs securely in the container, ensuring no impact on the main platform or hosting environment.
Once the script completes, the Docker container is destroyed, preventing any external access or lingering security risks.
Benefits of using Script Executors
Custom Functionality: Administrators can add packages for approved APIs and SDKs to Script Executors.
Design Flexibility: Process designers can use these customized Executors to make API and SDK calls.
Controlled Access: Administrators can regulate access to sanctioned APIs and SDKs.
Increased Security: Access control ensures secure usage of third-party integrations.
See the following video for an example of how to use a Script Executor with a Docker RUN
command to package the Google Client class into the Script Executor, enabling scripts to successfully call the Google API
Intended audience: Administrators, software developers
Viewing time: 3 minutes; contains narration
Supported Programming Languages
ProcessMaker Platform provides the following Script Executors.
PHP (µService) Executor: This is the default Script Executor to run Scripts developed using PHP microservice.
C# Executor: This is the default Script Executor to run Scripts developed using C#.
Java Executor: This is the default Script Executor to run Scripts developed using Java.
Lua Executor: This is the default Script Executor to run Scripts developed using Lua.
JavaScript: This is the default Script Executor to run Scripts developed using JavaScript.
JavaScript SSR: This is the default Script Executor to run Scripts developed using JavaScript SSR.
PHP Executor: This is the default Script Executor to run Scripts developed using PHP.
Python Executor: This is the default Script Executor to run Scripts developed using Python.
Script Executor Examples
View Script Executors
ProcessMaker Platform provides a centralized location to view all Script Executors. Any Script Executor created by an Administrator can be used across any process model, making script management simple and efficient. Follow these steps to view all Script Executors in your organization:
Log on to ProcessMaker Platform.
From the top menu, click the Admin option to view the Users page.
From the left sidebar, click the Script Executors icon to see a list of available Script Executors.
The Script Executors page displays the following information in tabular format:
The Language column shows the programming language each Script Executor supports.
The Title column displays the name of the Script Executor.
The Modified column displays the date and time the Script Executor was last modified. Time is displayed based on ProcessMaker Platform instance's time zone setting or the user profile's setting.
Click the +Script Executor to create a new Script Executor.
Click the Edit icon to modify Script Executor settings in the same way as when creating a new Script Executor.
Click the Delete icon to remove a Script Executor. The Caution screen displays to confirm the deletion of the Script Executor.
When a Script Executor is deleted, all Scripts that run during a Request fail. Process designers that have developed Scripts configured to use a deleted Script Executor are not notified of that Script Executor's deletion. When a Process designer reviews or edits the Script configuration settings for a Script configured to use a deleted Script Executor, that Script Executor does not display from the Language setting. Therefore, take caution when deleting a Script Executor.
Deleting a Script Executor from the Script Executors page cannot be undone.
Create a New Script Executor
Follow these steps to create a new Script Executor:
View your Script Executors. The Script Executors page displays.
Click the +Script Executor button. The Add New Script Executor screen displays.
In the Name setting, enter the unique name for the Script Executor.
In the Description setting, enter a description for the Script Executor.
From the Language setting, select one of the following programming languages that the Script Executor uses to run Scripts:
PHP (µService)
Java
C#
Lua
JavaScript
JavaScript SSR
PHP
Python
After selecting a programming language, the default Dockerfile content displays in the Dockerfile setting. The Dockerfile content includes the SDK for that language.
From the Dockerfile setting, append the default Dockerfile content with the Docker commands the Script Executor runs when it builds the Docker container.
Refer to these best practices for writing Dockerfiles.
Do not edit the default Dockerfile content as this is necessary to successfully run scripts in a Docker container.
Click Save and Build to build the Docker container. The Build Command Output setting displays below the Dockerfile setting as the Script Executor builds the Docker container in real-time.
If the Docker container builds successfully, the following message displays: Executor Successfully Built. You can now close this window. If building the Docker container is unsuccessful, the following message displays: Error Building Executor. See Output Above.. The Build Command Output setting displays the Dockerfile error.