Skip to content

Fix PM Block Export/Import with Data Source Scripts and Collections#5077

Merged
ryancooley merged 4 commits into
developfrom
observation/FOUR-9383
Aug 3, 2023
Merged

Fix PM Block Export/Import with Data Source Scripts and Collections#5077
ryancooley merged 4 commits into
developfrom
observation/FOUR-9383

Conversation

@sanjacornelius
Copy link
Copy Markdown
Contributor

@sanjacornelius sanjacornelius commented Aug 1, 2023

Issue & Reproduction Steps

This pull request (PR) addresses a critical issue related to exporting and importing script tasks with webhooks enabled when they are referenced in the data_source_scripts table. The previous error was hindering the proper export and import of PM Blocks that utilize a data source script into an instance. With this PR, we have introduced a comprehensive solution that allows for seamless import of the data source script, generating a new ID, and updating the BPMN scriptRef ID to reflect the newly generated ID.

Additionally, as part of this solution, we have created separate PRs for both Data Sources and the Collections package to ensure smooth handling of script dependencies and proper UUID generation during the export/import process.

Key Changes and Improvements:

  • Fixing Script Task Export/Import Error: Addressed the root cause of the error that was preventing the export/import of script tasks with webhooks enabled.
  • Enhanced Data Source Script Import: Implemented a solution to import data source scripts correctly with the generation of new IDs and updating of BPMN scriptRef ID.
  • Script Dependency Management: The separate PR for Data Sources ensures the script dependency is properly added and retrieved during the export/import process.
  • Improved UUID Generation in Collections: The separate PR within the Collections package now correctly generates UUIDs when exporting/importing collections referenced in a data source, resolving related issues.

How to Test

  1. Import this process into your instance.
    Process_ with Data Connectors.json.txt

  2. Save the process as a PM Block.

  3. Export the PM Block.

  4. Reimport the PM Block.

Expected Behavior

  1. The process saves as a PM Block without encountering any errors.
  2. The PM Block can be successfully exported without any issues.
  3. The PM Block can be reimported, and all components, including script tasks and data source scripts, maintain their integrity.

Related Tickets & Packages

ci:package-collections:observation/FOUR-9383
ci:package-data-sources:observation/FOUR-9383
ci:deploy

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.

@tokensPM
Copy link
Copy Markdown

tokensPM commented Aug 1, 2023

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

2 similar comments
@tokensPM
Copy link
Copy Markdown

tokensPM commented Aug 1, 2023

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

@tokensPM
Copy link
Copy Markdown

tokensPM commented Aug 2, 2023

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

Copy link
Copy Markdown
Contributor

@agustinbusso agustinbusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is correct:

Screen.Recording.2023-08-03.at.10.30.59.mov

@ryancooley ryancooley merged commit 33d9920 into develop Aug 3, 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