Script Executor

A Script Executor is a Docker container designed to run scripts written in a specific programming language. When a script is triggered in ProcessMaker, the following actions take place:

  • 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:

  1. Log on to ProcessMaker Platform.

  2. Click the Admin option from the top menu to view the Users page.

  3. Click the Script Executors icon from the left sidebar 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 Edit icon to edit a Script Executor.

  • Click the Delete icon to remove a Script Executor. On the confirmation screen, click Confirm to proceed with the deletion, or click Cancel to abort.


Create a New Script Executor

Follow these steps to create a new Script Executor:

  1. View your Script Executors. The Script Executors page displays.

  2. Click the +Script Executor button. The Add New Script Executor  screen displays.  

  3. In the Name setting, enter the unique name for the Script Executor.

  4. In the Description setting, enter a description for the Script Executor.

  5. From the Language setting, select one of the following programming languages that the Script Executor uses to run Scripts:

    • PHP (µService)Java

    • C# Executor

    • Lua

    • JavaScript

    • JavaScript SSR

    • PHP Executor

    • Python

    After selecting a programming language, the default Dockerfile content displays in the Dockerfile setting. The Dockerfile content includes the SDK for that language.

  6. From the Dockerfile setting, append the default Dockerfile content with the Docker commands the Script Executor runs when it builds the Docker container.

    1. Refer to these best practices for writing Dockerfiles.

    2. Do not edit the default Dockerfile content as this is necessary to successfully run scripts in a Docker container.

  7. 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.

  8. 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.