Resolve 500 Error During Guided Template Execution by sanjacornelius · Pull Request #6301 · ProcessMaker/processmaker
Issue & Reproduction Steps
This PR addresses a 500 error encountered when running a Guided Template for the first time. The error occurred due to attempting to import the process template twice while the import process was still ongoing.
Solution
The solution introduces an importingProcess status to indicate when the process template is being imported. Before retrying the import, the system checks against this status to avoid duplicate imports.
How to Test
Note: This issue only replicated during the first run of a guided template.
- Ensure you have a clean instance to sync the guided templates
php artisan processmaker:sync-guided-templates - Navigate to Processes -> Guided Template
- Initiate a Guided Template process.
- Verify that the process runs without encountering a 500 error.
- Repeat the process initiation step to ensure consistent behavior across multiple attempts.
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.