Skip to content

FOUR-34301: ABE Enhancements - #9185

Open
sanjacornelius wants to merge 32 commits into
developfrom
story/FOUR-34301
Open

sanjacornelius wants to merge 32 commits into
developfrom
story/FOUR-34301

Conversation

@sanjacornelius

@sanjacornelius sanjacornelius commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

FOUR-34301 introduces optional Track Responder Identity for Actions by Email (ABE), allowing ProcessMaker to identify which recipient responded to an emailed action while preserving backward compatibility. The feature is opt-in through configEmail.trackResponder; existing ABE implementations continue to work unchanged.

Key Enhancements

Responder Tracking

  • When enabled, ABE sends a unique signed link per recipient.
  • Supports direct assignments, self-service users, and groups.
  • Deduplicates recipients and handles overlapping group membership.
  • Captures responder metadata in a new abe_responder payload:
    - Email
    - User ID
    - Group membership
    - IP address
    - User agent/device details
    - identity_mismatch flag when the logged-in user differs from the signed recipient

Performance & Scalability

  • Reuses rendered email content during personalized sends to reduce processing overhead.
  • Supports configurable email staggering through abe_email_stagger_seconds.
  • Added large-scale recipient and overlapping-group test coverage.

Email Rendering Improvements

  • Inline horizontal submit buttons.
  • Improved Outlook and Gmail compatibility.
  • Better button styling, borders, padding, and clickable areas..

Related PRs

Repo Branch Notes
connector-send-email story/FOUR-34301 UI + email renderer (#378, #379, track responder UI)
package-actions-by-email story/FOUR-34301 sendAsync delay

How to test

Legacy (default)

  1. ABE task with Track responder identity off.
  2. Trigger task → one email (comma-separated To for multiple recipients), shared link.
  3. Click → request data has action variable only; no abe_responder.

Track responder

  1. Enable Track responder identity on the ABE task.
  2. Self-service or group assignment with multiple users → one email per unique address, distinct signed links.
  3. Click → request data includes abe_responder with signed email / user_id / groups.
  4. Log in as a different user and click signed link → action succeeds; identity_mismatch true when applicable.

Require Login + tracking

  1. Require Login + track responder on.
  2. Anonymous click → login → action completes with signed recipient preserved (abe_click_ticket).

Staggering (full stack)

  1. With tracking on and multiple recipients, confirm multiple SendEmail jobs with incremental delays when abe_email_stagger_seconds > 0 (requires updated package-actions-by-email).

Connector email UI

  1. ABE email screen with inline submit buttons — layout in Gmail/Outlook; button borders and full clickable area.

Automated

  • processmaker: AbeResponderTest, TaskActionByEmailSelfServiceTest, AbeLargeRecipientGroupTest, TaskActionByEmailLinkRewriteTest, TaskController ABE tests as applicable.

ci:connector-send-email:story/FOUR-34301
ci:package-actions-by-email:story/FOUR-34301
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.

@cursor

cursor Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches task completion and request data for an opt-in ABE path, including HMAC-signed query params and Require Login cache/cookie restoration; legacy shared-link sends remain when tracking is disabled.

Overview
Adds Track responder identity for Actions by Email: when configEmail.trackResponder is enabled, ABE resolves unique assignees (deduped by email, merged groups), sends one personalized email per recipient with HMAC-signed action links, and on click writes a nested abe_responder object into process request data (recipient, groups, IP/UA, optional identity_mismatch vs logged-in user). Legacy behavior is unchanged when tracking is off (single shared To line).

Sending path: TokenRepository drives recipient resolution and per-recipient signed queries; TaskActionByEmail renders the email screen once per batch, appends signed params only on /tasks/update_variable/ links, and staggers queue dispatch via abe_email_stagger_seconds.

Click path: TaskController::updateVariable is refactored; Require Login now parks the full query in cache and sets an unencrypted abe_click_ticket cookie so signed params survive login/session reset. Failed restore yields validation errors instead of HTTP 500.

New helpers AbeRecipientSignature / AbeResponder, docs (docs/abe-responder-tracking.md), and broad unit/feature coverage including large-group stress tests.

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

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

Reviewed by Cursor Bugbot for commit e1ba7ba. Configure here.


$pending = Cache::pull(self::ABE_CLICK_CACHE_PREFIX . $ticket);
if (!is_array($pending) || ($pending['abe_uuid'] ?? null) !== $abe->uuid) {
return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ticket cache dropped on UUID mismatch

Medium Severity

pullPendingAbeClickQuery runs Cache::pull before checking that the parked payload's abe_uuid matches the current token. A leftover abe_click_ticket on any other update_variable URL without abe_sig (another ABE email, a legacy unsigned link) deletes the parked query. After Require Login the user then hits the short intended URL with no query, restore fails, and validation returns 422 instead of completing with the signed recipient.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e1ba7ba. Configure here.

@cursor
cursor Bot requested review from gproly and pmPaulis November 19, 2026 20:02
@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://tenant-1.ci-74d6541c8b.engk8s.processmaker.net

@sanjacornelius sanjacornelius changed the title [WIP] ABE Enhancements FOUR-34301: ABE Enhancements Nov 19, 2026
@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://tenant-1.ci-74d6541c8b.engk8s.processmaker.net

1 similar comment
@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://tenant-1.ci-74d6541c8b.engk8s.processmaker.net

@decisions-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
3 New issues
3 New Maintainability Issues (required ≤ 0)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

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