PHPackages                             processmaker/docker-executor-lua - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. processmaker/docker-executor-lua

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

processmaker/docker-executor-lua
================================

Lua script executor for processmaker 4

1.0.1(2y ago)083.5k↓11.9%4[1 issues](https://github.com/ProcessMaker/docker-executor-lua/issues)[1 PRs](https://github.com/ProcessMaker/docker-executor-lua/pulls)GAGPL-3.0-or-laterPHP

Since Mar 25Pushed 1mo ago20 watchersCompare

[ Source](https://github.com/ProcessMaker/docker-executor-lua)[ Packagist](https://packagist.org/packages/processmaker/docker-executor-lua)[ RSS](/packages/processmaker-docker-executor-lua/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (3)DependenciesVersions (16)Used By (0)

executor-lua
============

[](#executor-lua)

Script Task Executor Engine with LUA Runtime

This docker image provides a sandboxed protected environment to run custom LUA scripts that are written in ProcessMaker 4. User created script tasks should be isolated however have utilities available to them in order to get most common tasks done. This LUA environment has modules available so Script Tasks can take advantage of the following libraries:

- dkjson
- TODO : Identify most common libraries used for existing script tasks

How to use
----------

[](#how-to-use)

The execution requires a data.json, config.json and an output.json file be present on the host system. The data.json represents the Request instance data. The config.json represents configuration specific for this Script Task. And the output.json should be a blank file that will be populated by the successful output of the script task. It is the responsibility of the caller to have these files prepared before executing the engine via command line (or docker API). The script task is represented by a script.lua file. It is the responsibility of the caller to have these files prepared before executing the engine via command line (or docker API).

Script Task design
------------------

[](#script-task-design)

When writing a Script Task, three global variables are available. They are:

- data - A record that represents the data loaded from data.json
- config - A record that represents the config loaded from config.json
- client - The ProcessMaker 4 LUA SDK Client preconfigured to access the API via OAuth authentication

Your script should execute quickly. Once the script is complete, your return statement will be used and converted to JSON which will be stored in the output.json file. Once the docker execution is complete, you should the return code of the docker execution. If the code is 0, then the script task executed successfully and you can read output.json for the valid output. If it is non-zero, then you should review STDERR to see the error that was displayed during execution.

### Example data.json

[](#example-datajson)

```
{
  "message": "Hello World"
}
```

### Example Script Task

[](#example-script-task)

```
-- Sample function to see if we can call it
function reverse (str)
  return str.reverse(str)
end

-- Convert our message inside our imported data and return it
data.message = reverse(data.message)

return data
```

### Example output.json

[](#example-outputjson)

```
{"message":"dlroW olleH"}
```

Using the PM4 SDK
-----------------

[](#using-the-pm4-sdk)

The executor comes pre-configured with the ProcessMaker 4 SDK ready to use.

Get an instance by calling `client.make('name')`.

Here is an example of fetching all pm4 users:

```
users_api = client.make('users_api')

filter=''
order_by='id'
order_direction='asc'
per_page='10'
include=''
local users, ret2, ret3 = users_api:get_users(filter, order_by, order_direction, per_page, include)

return {users=users}
```

See ProcessMaker API documentation for more info at /api/documentation on your ProcessMaker 4 instance

Command Line Usage
------------------

[](#command-line-usage)

```
$ docker run -v :/opt/executor/data.json \
  -v :/opt/executor/config.json \
  -v :/opt/executor/script.lua \
  -v :/opt/executor/output.json \
  processmaker/executor:lua \
  php /opt/executor/bootstrap.lua
```

#### License

[](#license)

Distributed under the [AGPL Version 3](https://www.gnu.org/licenses/agpl-3.0.en.html)

ProcessMaker (C) 2002 - 2021 ProcessMaker Inc.

For further information visit:

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance60

Regular maintenance activity

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1354 days

Total

2

Last Release

931d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ab66faa2bb09e27a5499a2aa35203a378d656d7df3b21582ace7f447cde8605?d=identicon)[processmaker](/maintainers/processmaker)

---

Top Contributors

[![nolanpro](https://avatars.githubusercontent.com/u/2546850?v=4)](https://github.com/nolanpro "nolanpro (18 commits)")[![ryancooley](https://avatars.githubusercontent.com/u/867714?v=4)](https://github.com/ryancooley "ryancooley (4 commits)")[![velkymx](https://avatars.githubusercontent.com/u/535300?v=4)](https://github.com/velkymx "velkymx (2 commits)")[![boliviacoca](https://avatars.githubusercontent.com/u/74792291?v=4)](https://github.com/boliviacoca "boliviacoca (1 commits)")[![tdondich](https://avatars.githubusercontent.com/u/3330334?v=4)](https://github.com/tdondich "tdondich (1 commits)")[![uujfwmnp](https://avatars.githubusercontent.com/u/3219994?v=4)](https://github.com/uujfwmnp "uujfwmnp (1 commits)")

### Embed Badge

![Health badge](/badges/processmaker-docker-executor-lua/health.svg)

```
[![Health](https://phpackages.com/badges/processmaker-docker-executor-lua/health.svg)](https://phpackages.com/packages/processmaker-docker-executor-lua)
```

###  Alternatives

[carlcs/craft-diywidget

Do It Yourself widget for Craft CMS

3839.4k](/packages/carlcs-craft-diywidget)[laradocs/moguding

蘑菇丁 SDK

1820.1k](/packages/laradocs-moguding)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
