Skip to content

Resolve Orphaned Process Templates Generated During Editing in Modeler#4859

Merged
ryancooley merged 3 commits into
developfrom
bugfix/FOUR-8867
Jun 23, 2023
Merged

Resolve Orphaned Process Templates Generated During Editing in Modeler#4859
ryancooley merged 3 commits into
developfrom
bugfix/FOUR-8867

Conversation

@sanjacornelius
Copy link
Copy Markdown
Contributor

@sanjacornelius sanjacornelius commented Jun 7, 2023

Issue & Reproduction Steps

The current behavior when editing a process template in the modeler results in the creation of new processes in the processes table instead of referencing the original process created during the first edit. This causes the accumulation of orphaned process templates, potentially leading to database clutter and performance degradation.

Solution

To address this issue, the following steps will be taken:

  1. A migration will be created to add the 'editing_process_uuid' column to the process_template table. This column will track the associated process when editing the template in the modeler.
  2. During template editing in the modeler, a check will be performed to verify the presence of an 'editing_process_uuid' in the processes table. If the UUID exists, the process will be referenced. Otherwise, the template will be imported, creating a new process entry in the processes table.

How to Test

  1. Verify database access is available.
  2. Navigate to the Templates tab and select a template for editing.
  3. Confirm that the 'editing_process_uuid' is correctly set in the process_templates table.
  4. Validate that the 'editing_process_uuid' in the process_templates table matches the UUID of the newly created process in the processes table.
  5. Make an update to the template in the modeler and save the changes.
  6. Edit the template again to trigger the process update.
  7. Verify that no additional processes were created in the processes table and that the previous process UUID still matches the 'editing_process_uuid' in the process_templates table.

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.

@estebangallego estebangallego self-requested a review June 8, 2023 00:50
@pmkerberos
Copy link
Copy Markdown

QA server was successfully deployed https://ci-631f36fbad.eng.processmaker.net

@ryancooley ryancooley merged commit 1a5583b into develop Jun 23, 2023
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.

4 participants