Manage Scripts throughout your organization.
Manage your Script Categories.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Improve your Script organization by creating Categories to which to assign them.
Your user account or group membership must have the following permissions to create a new Script Category unless your user account has the Make this user a Super Admin setting selected:
Scripts: Create Script Categories
Scripts: View Script Categories
Scripts: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to create a new Script Category:
Click the +Category button. The Create Script Category screen displays.
In the Category Name setting, enter the name of the new Script Category. The Script Category name must be unique from all other Script Category names in your organization and can only use apostrophe characters ('
) and spaces. This is a required setting.
From the Status drop-down menu, select one of the following options for the Script Category's status:
Active: Active Script Categories can have Scripts assigned to them.
Inactive: Inactive Script Categories cannot have Scripts assigned to them.
The Active option is selected by default. This is a required setting.
Click Save.
Edit the name and/or status of a Script Category.
Your user account or group membership must have the following permissions to edit a Script Category unless your user account has the Make this user a Super Admin setting selected:
Scripts: Edit Script Categories
Scripts: View Script Categories
Scripts: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to edit a Script Category:
Edit the following information about the Script Category as necessary:
In the Category Name setting, edit the name of the Script Category if necessary. The Script Category name must be unique from all other Script Category names in your organization. This is a required setting.
From the Status drop-down menu, change the status of the Script Category, if necessary, from the following options:
Active: Active Script Categories can have Scripts assigned to them.
Inactive: Inactive Script Categories cannot have Scripts assigned to them.
This is a required setting.
Click Save.
Click the ellipses icon, and then select the Edit Category option for the Script Category to edit. The Edit Script Category page displays.
Filter all Scripts in your organization to find that one you need.
Use the Search function to filter all Scripts from the Scripts page based on your entered text.
Your user account or group membership must have the "Scripts: View Scripts" permission to search for Scripts unless your user account has the Make this user a Super Admin setting selected.
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to search for a Script:
View your Scripts. The Scripts page displays.
Enter in the Search setting the text to filter Scripts using any of the following criteria:
Name: Filter by the Script name that displays in the Name column.
Category: Filter by the Script Category name that displays in the Category column.
Description: Filter by the Script description that displays in the Description column.
As you enter text into the Search setting, Scripts display that match your entered text.
If there are no search results, the following message displays: No Results.
Delete a Script from being used in any Process.
Your user account or group membership must have the following permissions to delete a Script:
Scripts: Delete Scripts
Scripts: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
When a Script is deleted, Process models that use that Script in Script Task elements are not affected. However, that Script can no longer be referenced from other Process models thereafter.
Deleting a Script from the Scripts page cannot be undone.
Follow these steps to delete a Script:
View your Scripts. The Scripts page displays.
Click Confirm.
Click the ellipses icon, and then select the Delete option for the Script to delete. The Caution screen displays to confirm the deletion of the Script.
View the Scripts in your organization.
ProcessMaker Platform displays all Scripts in one location. Any Script developed by any Process Owner or Developer can be used in any Process model. This makes it easy to manage Scripts.
Your user account or group membership must have the "Scripts: View Scripts" permission to view the list of Scripts unless your user account has the Make this user a Super Admin setting selected.
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to view all Scripts in your organization:
Log on to ProcessMaker Platform.
Click the Designer option from the top menu. The Designer Welcome Screen displays.
Do one of the following:
The Scripts tab displays the following information in tabular format about Scripts:
Name: The Name column displays the name of the Script. Click the name to edit the Script in Scripts Editor.
Description: The Description column displays the description of the Script. See Edit Script Configuration for more information.
Category: The Category column displays to which Script Category the Script is assigned.
Language: The Language column displays the programming language with which the Script was written.
Modified: The Modified column displays the date and time the Script was last modified. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Created: The Created column displays the date and time the Script was created. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Use the Search setting to filter Scripts that display.
Click the +Script button. See Create a New Script.
If no Scripts exist, the following message displays: No Results.
Control how tabular information displays, including how to sort columns or how many items display per page.
From the Assets pane in the Designer Welcome Screen, mouse-hover over the Scripts icon, and then select View All Scripts.
Click the Scripts icon from the left sidebar. The Scripts tab displays all Scripts in the Scripts page.
Click the ellipses icon, and then select the Edit Script option or click the Script name. See Edit a Script.
Click the ellipses icon, and then select the Configure option. See Edit Script Configuration.
Click the ellipses icon, and then select the Add to Project option. See Add a Script to a Project.
Click the ellipses icon, and then select the Copy option. See Copy a Script.
Click the ellipses icon, and then select the Delete option. See Delete a Script.
Delete a Script Category when it is no longer needed.
Your user account or group membership must have the following permissions to delete a Script Category unless your user account has the Make this user a Super Admin setting selected:
Scripts: Delete Script Categories
Scripts: View Script Categories
Scripts: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
To delete a Script Category, no Scripts can be assigned to it. If any Scripts are assigned to the Script Category, its Delete Category option does not display. Reassign those Scripts to another Script Category.
Deleting a Script Category cannot be undone.
Follow these steps to delete a Script Category:
Click Confirm. The following message displays: The category was deleted.
Click the ellipses icon, and then select the Delete Category option for the Script Category to delete. A message displays to confirm deletion of the Script Category.
Search for a Script Category.
Your user account or group membership must have the following permissions to search Script Categories unless your user account has the Make this user a Super Admin setting selected:
Script: View Script Categories
Script: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to search for Script Categories:
Enter in the Search setting the text to filter Script Categories by name.
As you enter text into the Search setting, Script Categories display that match your entered text.
If there are no search results, the following message displays: No Results.
Create a new Script to automate or add functionality to any Process.
Your user account or group membership must have the following permissions to create a Script unless your user account has the Make this user a Super Admin setting selected:
Scripts: Create Scripts
Scripts: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to create a new Script:
View your Scripts. The Scripts page displays.
Click the +Script button. The Create Script screen displays.
In the Name setting, enter the name of the Script. Script names must be unique in your organization and can only use apostrophe characters ('
) and spaces. This is a required setting.
In the Description setting, enter the description of the Script. This is a required setting.
From the Language drop-down menu, select the Script Executor from which to run the Script for this Script's programming language. Your Administrator may have created custom Script Executors using ProcessMaker Platform-supported languages to run sanctioned custom third-party code and/or Docker commands 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#. Note that if the C# package is not installed, this Script Executor is not available.
java - Java Executor: This is the default Script Executor to run Scripts developed using Java. Note that if the Java package is not installed, this Script Executor is not available.
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. Note that if the Python package is not installed, this Script Executor is not available.
r - R Executor: This is the default Script Executor to run Scripts developed using R. Note that if the R package is not installed, this Script Executor is not available.
This is a required setting.
From the Run script as drop-down menu, select which user's API client token to use with our REST API. Ensure that the selected user's account has the appropriate API permissions to access our REST API. This is a required setting.
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.
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.
Click Save. Script Editor displays so you can develop your Script. See Script Editor.
From the Category drop-down menu, select one or more Script Categories to associate with this Script. In doing so, Script Categories may be sorted from the Scripts page. To remove a Script Category that is currently selected, click theicon 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) that this Script becomes an asset. This setting only displays Projects of which you are a member. To remove a Project that is currently selected, click theicon for that selection or press Enter
when the drop-down is visible.
Add a Script as an asset to a Project. Any members of that Project may then use that asset toward the goals of that Project.
Adding a Script to a Project adds that Process as an asset to that Project. Any Project member may then use that asset toward the goals of that Project.
Follow these steps to add a Script to a Project:
View your Scripts. The Scripts tab displays.
Optionally, select the Use a copy of this asset option to use a copy of this Script as the Project asset instead of the original. When selecting this option, any revisions made to the original Script do not affect yours in your Project(s), and vice versa. Consider this option a best practice to use, especially if you intend to make changes from the original Script that may not be an asset in any Project.
Click Add. The Script is added as an asset to the selected Project(s).
Click the ellipses icon, and then select the Add to Project option. The Add to a Project screen displays.
From the Select Project drop-down, select to which Project(s) this Script becomes an asset. To remove a Project that is currently selected, click theicon for that selection or press Enter
when the drop-down is visible.
Copy an existing Script.
Your user account or group membership must have the following permissions to copy a Script unless your user account has the Make this user a Super Admin setting selected:
Scripts: View Scripts
Scripts: Create Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to copy a Script:
View your Scripts. The Scripts page displays.
Edit the following information from the original Script as necessary:
In the Name setting, edit the name of the copied Script. After the original Script is copied, the word Copy is suffixed to the original Script's name. This is a required setting.
In the Description setting, edit the description from the original Script.
Click Save.
Click the ellipses icon, and then select the Copy option for your Script. The Copy Script screen displays.
Edit the configuration for a Script.
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 permissions or ask your Administrator for assistance.
Enhance ProcessMaker Platform security for your ProcessMaker Platform instance by following these best practices. Among these best practices are to verify all user accounts that run Scripts are valid and appropriate.
Review the Run script as setting described below for each Script to determine which user's API client token to use with the ProcessMaker REST API.
Follow these steps to configure general settings for a Script:
View your Scripts. The Scripts page displays.
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 Run script as drop-down menu, select which user's API client token with appropriate permissions to use with the ProcessMaker Platform REST API. This is a required setting.
From the Script Executor drop-down menu, select which 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 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#. Note that if the C# package is not installed, this Script Executor is not available.
java - Java Executor: This is the default Script Executor to run Scripts developed using Java. Note that if the Java package is not installed, this Script Executor is not available.
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. Note that if the Python package is not installed, this Script Executor is not available.
r - R Executor: This is the default Script Executor to run Scripts developed using R. Note that if the R package is not installed, this Script Executor is not available.
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.
Click Save.
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. 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 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:
View your Scripts. The Scripts page displays.
Locate the Enable Direct API access setting. This setting is disabled by default.
Select the Enable Direct API access toggle key. Settings display to configure the Script's API access.
Disable the Run Synchronously toggle key to run the Script asynchronously. The Run Synchronously toggle key is enabled by default.
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.
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:
In the User setting, enter or edit the user name that the Script authenticates endpoint access.
In the Password setting, enter or edit the password that the Script authenticates endpoint access.
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:
Click the +URL button to add a URL. A field displays to enter the URL.
Enter the URL that this Script allows access to its endpoint.
From the API URL setting, copy the generated API endpoint and insert it wherever that Script's API endpoint must be called.
Click Save.
The Versioning package must be installed to view or edit the version history for a Script.
Furthermore, 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 and 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 elements or Watchers. Version changes are not reflected in Requests which were in-progress or already completed when the version changed. See the Versioning package for more information.
Follow these steps to view or edit the version history of your Script:
View your Scripts. The Scripts page displays.
Click on the Version History tab. The Version History page displays.
Date: The date and time of when a Process Designer saved this version in Script Editor.
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.
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.
Toggle the Only show named versions toggle key to show only the versions with a name assigned to them.
Optionally, edit any of the following existing details about this named version:
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.
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.
Click Confirm and Save to save your changes. Otherwise, click Cancel.
Click Confirm and Save to set this version as the current version. Otherwise, click Cancel.
Understand what Script Categories are and how they can help organize your Scripts.
Script Categories can be in active or inactive status. Following is a description of each status:
Active: Active Script Categories can have Scripts assigned to them.
Inactive: Inactive Script Categories cannot have Scripts assigned to them.
Click the ellipses icon, and then select the Configure option for your Script. The Edit Configuration page displays.
From the Category drop-down menu, select one or more Script Categories to associate with this Script. In doing so, Script Categories may be sorted from the Scripts page. To remove a Script Category that is currently selected, click the 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) 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 theicon for that selection or press Enter
when the drop-down is visible.
Click the ellipses icon, 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.
Click the Deleteicon to delete the URL, if necessary.
Click the ellipses icon, and then select the Configure option for your Script. The Configuration tab of the Edit Configuration page displays.
The Version History page organizes versions in a monthly format and displays the following information:
Click the Change Version Details iconto edit version details for this version. The Change Version Details screen displays.
Click the Copy to Latest iconto set a version as the current version. The Copy to Latest screen displays.
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.
Use Script Categories to organize your . Organizing your Scripts into Categories makes it easier to search for a Script based on its assigned Category. Assign multiple Script Categories to a Script if necessary. For example, assign a Script named "Database Call" to the "Database Scripts" and "Data Management" Script Categories.
: Organize your .
: Organize your .
: Organize your .
Script Categories: Organize your .
: Organize your .
: Organize your .
: Organize your .
View the Script Categories in your organization.
Your user account or group membership must have the following permissions to view Script Categories unless your user account has the Make this user a Super Admin setting selected:
Script: View Script Categories
Script: View Scripts
See the Scripts permissions or ask your Administrator for assistance.
Follow these steps to view Script Categories:
Log on to ProcessMaker Platform.
Click the Designer option from the top menu. The Designer Welcome Screen displays.
Click the Categories tab. The Script Categories display.
The Categories tab displays the following information in tabular format about Script Categories:
Name: The Name column displays the name of the Script Category. The Script Category named Uncategorized is the default Category.
Status: The Status column displays the status of the Script Category. Below is a description of each status:
Active: Active Script Categories can have Scripts assigned to them. The Script Category named Uncategorized is active by default.
Inactive: Inactive Script Categories cannot have Scripts assigned to them.
Scripts: The # Scripts column displays how many Scripts in your organization have been assigned to that Script Category.
Modified: The Modified column displays the date and time the Script Category was last modified. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Created: The Created column displays the date and time the Script Category was created. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
If no Script Categories exist, the following message displays: No Results.
Use the Search setting to filter Script Categories by their names.
​Control how tabular information displays, including how to sort columns or how many items display per page.
Click the Scripts icon from the left sidebar. The Scripts tab displays all Scripts in the Scripts page.
Edit a Script.
Your user account or group membership must have the following permissions to edit 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 permissions or ask your Administrator for assistance.
Follow these steps to edit a Script:
View your Scripts. The Scripts page displays.
Click the Edit iconfor the Script to edit. The Script opens in Script Editor. See Script Editor.