Resolve BuildScriptExecutor Errors During Process Import with Multiple Custom Script Executors by sanjacornelius · Pull Request #6256 · ProcessMaker/processmaker
This PR addresses BuildScriptExecutor errors encountered when importing a process containing multiple custom script executors. The issue stemmed from building the imported script executors simultaneously, leading to Docker errors such as error 137 and the /generator container already running error upon the second attempt to build the script executor.
The solution involves implementing Laravel's WithoutOverlapping middleware to the BuildScriptExecutor Job. This middleware prevents jobs from overlapping and ensures they run consecutively, resolving the errors encountered during the process import.
Solution
- List the changes you've introduced to solve the issue.
How to Test
-
Import the provided process template containing multiple custom script executors.
Test_Template.json.txt -
Create a new process from the imported template.
-
Monitor the Admin -> Queue Management for Pending, Completed, and Failed Jobs.
-
Verify that the BuildScriptExecutor job successfully completes without errors.
Related Tickets & Packages
ci:next
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.