--- title: "Configure a Script" slug: "configure-a-script" updated: 2025-07-09T19:03:15Z published: 2025-07-09T19:03:15Z canonical: "docs.processmaker.com/configure-a-script" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.processmaker.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure a Script ## Configure a Script **Permissions** Your user account or group membership must have the following permissions to configure a Script unless your user account has the **Make this user a Super Admin** setting selected: - Scripts: Edit Scripts - Scripts: View Scripts See the [Scripts](/v1/docs/permission-descriptions-for-users-and-groups#scripts) permissions or ask your Administrator for assistance. > [!WARNING] > Notice to Administrators > > - Enhance the security of your ProcessMaker Platform instance by following [these best practices](/v1/docs/enhance-processmaker-platform-security). > - Ensure all user accounts running scripts are valid and appropriate. > - Review the **Run script as** setting for each script to verify which user's API client token is used with the ProcessMaker REST API. ### Configure General Settings Follow these steps to configure general settings for a Script: 1. [View your Scripts](/v1/docs/scripts#view-all-scripts). The **Scripts** page displays. 2. Click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/Ellipsis Icon.png) menu, and then select the **Configure** option for your Script. The **Edit Configuration** page displays. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/40e290cf-0735-4d23-9793-d1aef35d2984.png) 3. Edit the following information about the Script as necessary: - In the **Name** setting, edit the unique name of the Script. This is a required setting. - From the **Category** drop-down menu, select one or more Script Categories to associate with this Script. In doing so, [Script Categories](/v1/docs/script-categories) may be sorted from the [**Scripts page**](/v1/docs/scripts#view-all-scripts). To remove a Script Category that is currently selected, click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/7c0b8996-7086-4219-95f1-9f1d41c79214.png) icon for that selection or press `Enter` when the drop-down is visible. This is a required setting. - From the **Project** drop-down menu, optionally select the [Project(s)](/v1/docs/projects) that this Script becomes an asset. This setting only displays Projects of which you are a member. This setting only displays Projects of which you are a member. To remove a Project that is currently selected, click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/7c0b8996-7086-4219-95f1-9f1d41c79214.png) icon for that selection or press `Enter` when the drop-down is visible. - From the **Run script as** drop-down menu, select which user's API client token with appropriate [permissions](/v1/docs/permission-descriptions-for-users-and-groups) to use with the ProcessMaker Platform REST API. This is a required setting. - From the **Script Executor** drop-down menu, select which [Script Executor](/v1/docs/script-executor-management#what-is-a-script-executor) to run this Script. This setting only displays Script Executors that this Script has been developed using. Your Administrator may have created custom Script Executors using ProcessMaker Platform-supported languages to run sanctioned custom third-party code and/or [Docker commands](https://docs.docker.com/engine/reference/commandline/docker/) that allow Scripts to successfully call third-party Application Program Interfaces (APIs) and Software Development Kits (SDKs). Below are the Script Executors ProcessMaker Platform provides, though some require packages to be installed: - **csharp - C# Executor:** This is the default Script Executor to run Scripts developed using C#. - **java - Java Executor:** This is the default Script Executor to run Scripts developed using Java. - **javascript - Node Executor:** This is the default Script Executor to run Scripts developed using JavaScript. - **lua - LUA Executor:** This is the default Script Executor to run Scripts developed using Lua. - **python - Python Executor:** This is the default Script Executor to run Scripts developed using Python. - **r - R Executor:** This is the default Script Executor to run Scripts developed using R. This is a required setting. - In the **Description** setting, edit the description of the Script. This is a required setting. - In the **Timeout** setting, use the slider control or enter how many seconds the Script is allowed to run before it times out. Use `0` to indicate that the Script never times out. The default timeout is **60** seconds. This setting requires an integer. - In the **Retry Attempts** setting, configure how many times to re-run the Script if the Script returns a runtime error as follows: - Enter a number. Use the up and down arrows to increase or decrease the number. - Set `0` for no retry attempts. - In the **Retry Wait Time** setting, configure how many seconds to wait before attempting a retry as follows: - Enter the number of seconds. Use the up and down arrows to increase or decrease seconds. - Set `0` for no timeout. 4. [Optionally, enable this Script with API access as an independent endpoint](/v1/docs/configure-a-script#enable-a-script-with-api-access-as-an-endpoint). 5. Click **Save**. --- ### Enable a Script with API Access as an Endpoint Enable a Script to function as an Application Program Interface (API) endpoint. Use a Script as an API endpoint to perform multiple scripting tasks that do not require be run from a Process. The Script may use either `GET` and/or `POST` methods as an independent endpoint. By enabling the Script with direct API access, a unique API URL is generated. Copy the API URL and insert it wherever that Script's API endpoint must be called. Enabling and then disabling a Script's API access maintains the same API URL. Configure API access settings independently from the [Script's basic settings](/v1/docs/configure-a-script#configure-general-settings). API access settings require the following: - Specify Basic Authentication of user name and password, if used. - Specify from which URLs may access the Script's independent API endpoint if other Scripts run this one. Refer to the following HTTP responses for their corresponding events when using a Script's API endpoint: - `200 OK`**:** The Script's API endpoint successfully returns the JSON response when set to run synchronously. - `204 No Content`**:** There is no content for the Script API endpoint to return because it is being run asynchronously. The Script's API endpoint successfully fulfilled the request and that there is no JSON response in payload body. - `Error 403 Forbidden`**:** The Script's API access is not accessible to that URL. Grant that URL access. - `Error 404 Not Found`**:** The Script's API access is not available. Enable the Script's API endpoint. Use an application like [Postman](https://www.postman.com/product/api-client/) that can send API requests to the Script to more easily inspect and debug the Script's API endpoint responses. Follow these steps to enable a Script with API access as an independent endpoint: 1. [View your Scripts](/summer-2024/A7mdugENW7gZw1jmnrOv/designer-advanced/what-is-a-script#view-all-scripts). The **Scripts** page displays. 2. Click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/Ellipsis Icon.png) menu, and then select the **Configure** option for your Script. The **Edit Configuration** page displays. Ensure that the Script's basic settings are configured properly to run. 3. Locate the **Enable Direct API access** setting. This setting is disabled by default. 4. Select the **Enable Direct API access** toggle key. Settings display to configure the Script's API access. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/ea6e2bae-1270-4dfa-96bf-a0d9798872e8.png) 5. Disable the **Run Synchronously** toggle key to run the Script asynchronously. The **Run Synchronously** toggle key is enabled by default. 6. From the **Accepted methods** setting, select which method(s) this Script uses as an endpoint: - **GET/ Query String:** The GET / Query String method retrieves data using parameters passed in the Script's auto-generated URL. The **GET** toggle key is disabled by default. - **POST:** The POST method sends JSON data as provided in the Script. The **POST** toggle key is enabled by default. 7. From the **Authentication** setting, select either **None** or **Basic Authentication** as the authentication method. Follow these steps to configure basic authentication settings when selecting the **Basic Authentication** option from the Authentication section: 1. In the **User** setting, enter or edit the user name that the Script authenticates endpoint access. 2. In the **Password** setting, enter or edit the password that the Script authenticates endpoint access. 8. From the **Allow Access From** setting, enter or edit from which URLs may access this Script's endpoint. The default setting is **All**, allowing any URL to access the Script's endpoint. Follow these guidelines to specify URLs: 1. Click the +**URL** button to add a URL. A field displays to enter the URL. 2. Enter the URL that this Script allows access to its endpoint. 3. Click the **Delete** ![img](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/610e0f92-0e21-47ee-abb2-6fdfa9c4fec5.png) icon to delete the URL, if necessary. 9. From the **API URL** setting, copy the generated API endpoint and insert it wherever that Script's API endpoint must be called. 10. Click **Save**. --- ### Configure Version History **Permissions** Your user account or group membership must have the following permissions unless your user account has the **Make this user a Super Admin** setting selected: - Scripts: Edit Scripts - Scripts: View Scripts - Version History: Edit Version History - Version History: View Version History See the [Scripts](/v1/docs/permission-descriptions-for-users-and-groups#scripts) and [Version History](/v1/docs/permission-descriptions-for-users-and-groups#version-history) permissions or ask your Administrator for assistance. A version is a set of changes made to a Script at a particular time by a Process designer. Versioning maintains a record of all named and unnamed changes to that Script. Any of these versions may be viewed or retrieved, if needed. The **Version History** page displays all saved versions of the Script in a tabular format from where they can be edited and/or marked as the `Current Version` according to your business needs. The current version of a Script is used in all new Requests in which that Script is run from [Script Task](/v1/docs/script-task) elements or [Watchers](/v1/docs/watchers). Version changes are not reflected in Requests which were in-progress or already completed when the version changed. Follow these steps to view or edit the version history of your Script: 1. [View your Scripts](/v1/docs/scripts#view-all-scripts). The **Scripts** page displays. 2. Click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/Ellipsis Icon.png) menu, and then select the **Configure** option for your Script. The **Configuration** tab of the **Edit Configuration** page displays. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/c75d9959-18fe-43ce-be87-0f76196050e5.png) 3. Click on the **Version History** tab. The **Version History** page displays. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/e931cf0f-6af2-445c-ac3e-c2405a939755.png) The **Version History** page organizes versions in a monthly format and displays the following information: - **Date**: The date and time of when a Process Designer [saved this version](/v1/docs/script-editor#save-your-processmaker-script) in [Script Editor](/v1/docs/script-editor#overview). - **Current Version**: The most recent version of the Script is displayed at the top and is marked as the `Current Version`. This version is used in all in-progress and new [Requests](/v1/docs/requests-and-cases#what-is-a-request). - **Name**: The name of this version as entered by a Process designer when saving the Script in Script Editor. - **Description**: A description of the changes in this version as entered by a Process designer when saving the Script in Script Editor. - **Saved by**: The name of the Process designer who saved this version. 4. Toggle the **Only show named versions** toggle key to show only the versions with a name assigned to them. 5. Click the **Change Version Details** icon ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/16bb4864-b371-4853-9bc1-7ad671541f93.png) to edit version details for this version. The **Change Version Details** screen displays. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/ea286dbd-cd02-425e-833d-d87d716e6f40.png) 6. Optionally, edit any of the following existing details about this named version: 1. In the **Version Name** setting, edit the name to this named version. If saving this named version with no name, this version does not display in the **Version History** page if the **Only show named versions** toggle key is enabled. 2. In the **Additional Details (optional)** setting, edit the details about this version. For example, describe the changes in this version for auditing, historical, or maintenance purposes. 3. Click **Confirm and Save** to save your changes. Otherwise, click **Cancel**. 7. Click the **Copy to Latest** icon ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/fc81af94-efa4-463d-b213-d6c3f10f742b.png) to set a version as the current version. The **Copy to Latest** screen displays. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/9fe03c24-1ef9-4306-bfd0-70ceed702a8d.png) The screen displays the warning `This version will become the active version for this asset`, indicating that this action will set this version as the current version. 8. Click **Confirm and Save** to set this version as the current version. Otherwise, click **Cancel**.