Skip to content

Fix ScriptMicroserviceEcho issue - #9074

Open
gusys wants to merge 1 commit into
developfrom
FOUR-33460
Open

gusys wants to merge 1 commit into
developfrom
FOUR-33460

Conversation

@gusys

@gusys gusys commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Describe the issue this ticket solves and describe how to reproduce the issue (please attach any fixtures used to reproduce the issue).

Solution

  • Define ScriptMicroserviceEcho to listen and broadcast only for Admin/ScriptExecutors

How to Test

Describe how to test that this solution works.

Related Tickets & Packages

  • Link to any related FOUR tickets, PRDs, or 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.

@cursor

cursor Bot commented Sep 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Admin-only broadcasting bootstrap with no auth or data-model changes; misconfiguration could leave build logs without live updates on that page.

Overview
Scopes script-runner real-time updates to the Admin Script Executors page by initializing ScriptMicroserviceEcho in the script-executors Vite entry instead of relying on global bootstrap setup that may not run on this screen.

When the script-runner microservice is enabled, the Blade view now exposes window.Processmaker.script_microservice (Pusher/Echo broadcasting options from script-runner-microservice config, including optional custom wsHost/ports). The entry bundle registers ScriptMicroserviceEcho via setGlobalVariables so ScriptExecutors can subscribe to build-image channels. The root component import is corrected to ./ScriptExecutors.vue.

Reviewed by Cursor Bugbot for commit e5a2002. Bugbot is set up for automated code reviews on this repo. Configure here.

@decisions-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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e5a2002. Configure here.

<script>
if (!!{{ config('script-runner-microservice.enabled') }}) {
window.Processmaker.script_microservice = {
enabled : {{ config('script-runner-microservice.enabled', false) }},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Disabled microservice breaks inline script

Medium Severity

Blade prints a boolean false as an empty string, so script-runner-microservice.enabled being off yields invalid JavaScript (if (!!) and enabled : ,). That parse error aborts the whole inline script, including the packages setup that follows. The original layout avoided this with a Blade @if so the block was omitted when the microservice is disabled.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e5a2002. Configure here.

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.

1 participant