Skip to content

Adding run-stream.sh#12

Open
AugustoLopezProcess wants to merge 1 commit into
developfrom
feature/FOUR-31789
Open

Adding run-stream.sh#12
AugustoLopezProcess wants to merge 1 commit into
developfrom
feature/FOUR-31789

Conversation

@AugustoLopezProcess

@AugustoLopezProcess AugustoLopezProcess commented Jun 15, 2026

Copy link
Copy Markdown

Issue & Reproduction Steps

Expected behavior: The Node executor image includes a script that can receive input files over stdin and return output files over stdout.

Actual behavior: The image only includes run.sh, which runs the script when input files are already present on disk.

Solution

  • Add src/run-stream.sh, which:
    • Extracts a tar archive from stdin into the container (tar xf - -C /)
    • Runs the existing executor via /bin/sh /opt/executor/run.sh
    • If output paths are passed as arguments, streams them back as a tar archive on stdout (tar cf - -C / "$@")

How to Test

  1. Rebuild the Node Script Executor Docker image so it includes run-stream.sh.
  2. Create a tar archive with the required executor files (e.g. opt/executor/data.json, opt/executor/config.json, opt/executor/script.js).
  3. Run the container with stdin attached and command:
    /bin/sh /opt/executor/run-stream.sh opt/executor/output.json
  4. Pipe the input tar into the container and confirm:
    • The script runs without error
    • A tar stream containing output.json is returned on stdout
  5. Confirm existing execution via /bin/sh /opt/executor/run.sh still works unchanged.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

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