Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Nov 12, 2025

Issue & Reproduction Steps.

When a process includes a parallel gateway that launches two “Actions By Email” call activities, the flow continues as soon as one email reply is received. Because the package fired a broadcast abe_processed message, both call activities were closed at once—so the parent request proceeded to the final Form Task even though one ABE remained unanswered.
Repro: Run the provided BPMN (parallel gateway → two ABE call activities → converging gateway). Start a case and reply to only one of the two ABE emails. The second branch closes automatically and the flow reaches the final Form Task.

Solution

  • Made CallActivity::completeSubprocess() merge only the fields actually updated by the subprocess to avoid overwriting sibling data.
  • Prevented CompleteActivity from re‑merging data for call activities (that merge already happens inside CallActivity).
  • Added targeted delivery in ThrowMessageEvent + Nayra’s EventDefinitionBus so abe_processed messages wake only the intended abe_task_node. Parallel call activities now wait for their own replies.
1 2 3 4

How to Test

  1. Run the ABE process with the parallel gateway (same BPMN provided in the issue).
  2. Start a case, reply to only the first ABE email.
    Confirm:
  • Only the corresponding call activity shows result = "yes" in the subprocess data.
  • The second branch remains waiting (case stays at the converging gateway).
  • Reply to the second email; verify the flow advances to the final Form Task and both result/result1 are saved in the parent request.

Related Tickets & Packages


Note

Limits subprocess data merging to updated fields, avoids double-merge for call activities, and targets message events to specific catch events/instances.

  • Call Activity data handling:
    • In ProcessMaker/Models/CallActivity::completeSubprocess, merge back only updated fields from the subprocess data store (using getUpdated when available), falling back to legacy copy-all if not tracked.
  • Activity completion:
    • In ProcessMaker/Jobs/CompleteActivity, skip DataManager->updateData when the element is a CallActivityInterface to prevent duplicate merging.
  • Message event targeting:
    • In ProcessMaker/Jobs/ThrowMessageEvent, add target_catch_event_id and target_instance_id to the message event definition and dispatch after applying payload to the instance datastore.

Written by Cursor Bugbot for commit 725ffe4. This will update automatically on new commits. Configure here.

@eiresendez eiresendez changed the title feat: enhance data handling in CompleteActivity and CallActivity classes FOUR-27709: ABE does not work correctly when a parallel gateway is part of the flow Nov 12, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@processmaker-sonarqube
Copy link

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.

3 participants