What is a Script?
Understand what a Script does in ProcessMaker Platform.
Overview
Write a Script Once, Then Use Anywhere
In ProcessMaker Platform, Scripts allow Process designers and developers to write self-contained programmatic actions that can be called from any Process's Request at run-time. The same Script can be used in any Process model. In other words, "write once, use anywhere."
Use ProcessMaker's AI Assistant to Code, Clean, Document, and Explain Your Script's Functionality
More efficiently produce your Scripts with ProcessMaker's AI assistant, Cornea AI. Use Cornea AI's no-coding option in the following ways to more efficiently produce Script assets:
Generate a Script using a natural language description of its function
Clean a Script to improve its code
Document a Script
Explain a Script
Note that Cornea AI features are only available when using Scripts in JavaScript or PHP programming languages.
Video Example
See an example in the following video how ProcessMaker Platform integrates with third-party services Amazon Textract and UiPath Robotic Process Automation (RPA) so a loan application workflow scans, analyzes, and intelligently routes a Request and provision a bot accordingly.
Intended audience: Process designers and business analysts
Viewing time: 11 minutes; contains narration
Supported Programming Languages
ProcessMaker Platform supports the following programming languages in the Open-Source edition:
PHP
Lua
JavaScript
ProcessMaker Platform Enterprise edition supports the following additional programming languages:
C# (requires the C# package)
Java (requires the Java package)
Python (requires the Python package)
R (requires the R package)
Scripts Run in Short-Lived Docker Containers for Security
Scripts run securely and in isolation from within Docker containers called Script Executors. The Script Executor for each supported programming language contains the Software Development Kit (SDK) that supports extensibility to provide programmatic interaction with ProcessMaker Platform. When the ProcessMaker Platform instance calls a Script to run, the Script Executor for that programming language creates a Docker container corresponding with that programming language, runs the Script, and then destroys the Docker container. This ensures that any malicious script that anyone in your organization might inadvertently introduce to ProcessMaker Platform does not affect the instance or its hosting environment: Docker containers cannot access them. Furthermore, Docker containers cannot listen for inbound connections; therefore, a Docker container cannot be accessed externally.
When the Script Executor creates a Docker container to run a Script, required libraries are already built in that Docker container. Furthermore, all default Script Executors that run ProcessMaker Platform-supported programming languages also contain the Software Development Kits (SDKs) for those languages.
See an example in the following video how to use a Script Executor that includes a Docker RUN command to package the Google Client class provided by Google into that Script Executor, thereby allowing Scripts using that Script Executor to successfully call the Google API.
Intended audience: Administrators, software developers, and coding engineers
Viewing time: 3 minutes; contains narration
Design and Test Scripts in One Environment
Scripts are designed and tested in the Script Editor.
While designing a Script, test it before you deploy it. Scripts are tested within the authoring environment to ensure they function as intended. While testing, do the following:
Use the JSON data model that you can preview from your Screens to ensure that variables designed from a Screen function as intended in your Script.
Incorporate other JSON-formatted data, such as API keys, to ensure your Script uses them correctly during your testing.
Related Topics
What is a Script?What is a Script Executor?Manage Script CategoriesCreate a New ScriptSearch for a ScriptEdit a ScriptConfigure a ScriptCopy a ScriptDelete a ScriptWhat is a Package?C# PackageJava PackagePython PackageR PackageLast updated