Skip to content

FOUR-25487 POC Use Web Worker to execute a javascript handler#1842

Closed
devmiguelangel wants to merge 3 commits into
developfrom
FOUR-25487
Closed

FOUR-25487 POC Use Web Worker to execute a javascript handler#1842
devmiguelangel wants to merge 3 commits into
developfrom
FOUR-25487

Conversation

@devmiguelangel

@devmiguelangel devmiguelangel commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

CleanShot.2025-07-30.mp4

Related Tickets & Packages

FOUR-25487

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.

@devmiguelangel devmiguelangel self-assigned this Jul 30, 2025
@cypress

cypress Bot commented Jul 30, 2025

Copy link
Copy Markdown

screen-builder    Run #1949

Run Properties:  status check passed Passed #1949  •  git commit 852462b6cb: FOUR-25487 POC Use Web Worker to execute a javascript handler
Project screen-builder
Branch Review FOUR-25487
Run status status check passed Passed #1949
Run duration 09m 19s
Commit git commit 852462b6cb: FOUR-25487 POC Use Web Worker to execute a javascript handler
Committer Miguel Angel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 19
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 374
View all changes introduced in this branch ↗︎

@devmiguelangel devmiguelangel marked this pull request as ready for review July 30, 2025 18:21
Comment thread src/components/renderer/form-button.vue Outdated
const rawData = data[Symbol.for("__v_raw")];

const worker = new Worker();
console.log("rawData ==> ", rawData);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove the debug logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was removed

Comment thread src/components/renderer/form-button.vue Outdated
}]);

worker.onmessage = (e) => {
console.log("Received:", e.data);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove the debug logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was removed

Comment thread src/components/renderer/form-button.vue Outdated
if (e.data.error) {
console.error("Worker error:", e.data.error);
} else if (e.data.result) {
console.log("Worker result:", e.data.result);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove the debug logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was removed

Comment thread src/workers/worker.js Outdated
const func = new Function("data", fn);
// const func = new Function('data', `return (${fn})(data)`)
const result = func(data);
console.log("result ==> ", result);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove the debug logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was removed

@processmaker-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@caleeli

caleeli commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

Merged by #1844

@caleeli caleeli closed this Aug 4, 2025
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.

2 participants