Skip to content

FOUR-32613 - Realtime (or at least faster) script executor - #8997

Open
nolanpro wants to merge 6 commits into
developfrom
spike/FOUR-32613-C
Open

FOUR-32613 - Realtime (or at least faster) script executor#8997
nolanpro wants to merge 6 commits into
developfrom
spike/FOUR-32613-C

Conversation

@nolanpro

@nolanpro nolanpro commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Requires: https://github.com/ProcessMaker/script-executor-service/pull/420

ProcessMaker counterpart to SES realtime executors. New executor type Realtime: customer-owned Dockerfile, dedicated Horizon queue, synchronous SES call, result shown in the script editor (with duration).

Pairs with script-executor-service spike/FOUR-32613-C.

Why

Same as SES: faster script runs, customers own the base image and can customize freely. SES does docker run --rm -i with JSON on stdin; PM just has to create the executor, route jobs, and treat the HTTP response as the result (no callback wait).

Executor type + admin UI

ScriptExecutorType::Realtime. Creating one sends realtime: true to SES with the full Dockerfile in config.

Admin language list adds php / python / javascript (realtime) with example Dockerfiles from resources/script-executors/realtime/*.Dockerfile (bootstrap reads stdin, evals/execs, prints JSON, exits). Customers edit that Dockerfile however they want.

Queue

New Redis connection redis-realtime and Horizon supervisor supervisor-realtime (auto balance, 2–20 processes). Preview, Execute, and BPMN RunScriptTask all onConnection('redis-realtime')->onQueue('realtime') when the executor is realtime.

The runner always sends sync: true to SES. TestScript formats the microservice payload locally (no callback) and broadcasts via Echo, including duration.

Other

  • Keycloak access tokens for SES were already cached; that matters more now that every preview/run is a sync HTTP call.
  • Script editor shows run duration.

Test plan

  • Create a realtime executor from an example Dockerfile; SES build succeeds
  • Script editor Test runs on the realtime queue and shows output + duration
  • A process script task with a realtime executor also uses that queue
  • Classic custom/system executors still use bpmn and the callback path

@nolanpro nolanpro changed the title Spike/four 32613 c FOUR-32613 - Realtime (or at least faster) script executor Aug 18, 2026
@nolanpro
nolanpro requested a review from gusys August 18, 2026 18:18
@nolanpro
nolanpro force-pushed the spike/FOUR-32613-C branch from 22bf46d to 383c139 Compare August 18, 2026 23:12
@decisions-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant