Skip to content

feat(FOUR-34380):Subprocess Inline to group task to reduce the visualizacion of BPMN - FE - #9163

Merged
caleeli merged 1 commit into
feature/FOUR-34328from
feature/FOUR-34380_B
Nov 12, 2026
Merged

caleeli merged 1 commit into
feature/FOUR-34328from
feature/FOUR-34380_B

Conversation

@rodriquelca

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

On every process save, convertFromExternalBPM() turned embedded bpmn:subProcess into callActivity, created a child process, and rewrote the BPMN. That broke the expected XML and could break the modeler after reload (e.g. missing pm:config).

Reproduce: Open modeler with BPMN containing subProcess → Save → Check stored BPMN or process count (element becomes callActivity, extra process row). Fixture: tests/Feature/Api/processes/CP.01.00 Create new customer.bpmn.

Solution

  • Stop subProcess → callActivity conversion in Process::convertFromExternalBPM().
  • Remove unused conversion helpers from Process.php.
  • Keep sendTask → scriptTask conversion.
  • Update ConvertBPMNTest::testConvertSubProcess.
image image

How to Test

Manual: save a process with bpmn:subProcess; confirm XML still has subProcess, no new child process, and F5/modeler behaves as expected.

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.

@cursor

cursor Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes BPMN persistence on save for diagrams with subProcess (behavioral fix) while keeping sendTask conversion; could affect processes that previously relied on automatic callActivity/child-process creation.

Overview
Stops automatic subProcess → callActivity conversion on process save so embedded BPMN subProcess elements stay in the stored XML and no extra child Process records are created.

sendTask → scriptTask conversion in Process::convertFromExternalBPM() is unchanged; when any conversion runs, saved BPMN now gets xmlns:pm on the definitions root via new ensurePmNamespaceOnDefinitions(). The old createCallActivityFrom helper is removed.

ConvertBPMNTest::testConvertSubProcess now asserts a single process row, subProcess present, and zero callActivity nodes.

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

@caleeli
caleeli merged commit bba43f1 into feature/FOUR-34328 Nov 12, 2026
6 checks passed

@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 high 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 fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 705f2fa. Configure here.

];
}
if ($conversions) {
$this->ensurePmNamespaceOnDefinitions($document);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Embedded subprocess remains non-executable

High Severity

Removing the subProcess to callActivity rewrite leaves embedded bpmn:subProcess in stored BPMN, but runtime still only implements subprocess via callActivity. WorkflowServiceProvider never maps subProcess, DefinitionsRepository has no subprocess factory, and unimplemented elements are skipped. Tokens that hit an inline subProcess can stall, skip inner tasks, or fail after save, so grouped processes will not run the way converted child processes did.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 705f2fa. 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

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