Skip to content

FOUR-31702 Self-service task with a timer event to complete the request still appears as active - #9080

Open
devmiguelangel wants to merge 2 commits into
developfrom
FOUR-31702
Open

devmiguelangel wants to merge 2 commits into
developfrom
FOUR-31702

Conversation

@devmiguelangel

@devmiguelangel devmiguelangel commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Self-service task with a timer event to complete the request still appears as active

Solution

When a boundary timer interrupts an unclaimed self-service task, the token is closed but is_self_service stays 1. Saved searches with is_self_service equal 1 still list it, and charts label it Self Service.

  • persistActivityClosed now sets is_self_service equal 0 when a task is closed without being claimed. The classic engine and the Nayra microservice both use this method.
  • On ProcessCompleted, task saved-search data tables refresh every task token of the request. Interrupted tasks do not fire an activity event, so the table row was never updated.
  • Chart queries and data-table list rows only show Self Service when the token is still active.

Tokens already closed with is_self_service equal 1 are unchanged. If the boundary path continues to another task instead of ending the request, the data table row updates when the request completes, or on the next periodic sync.

CleanShot.2026-09-28.at.14.43.58.mp4

Related Tickets & Packages

FOUR-31702
https://github.com/ProcessMaker/package-savedsearch/pull/701

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.

ci:package-savedsearch:FOUR-31702
ci:deploy

.

@devmiguelangel devmiguelangel self-assigned this Sep 28, 2026
@cursor

cursor Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Narrow persistence change on activity close for self-service tokens; behavior aligns with closed tasks no longer being claimable, with new boundary-event tests covering the scenario.

Overview
Fixes FOUR-31702: unclaimed self-service tasks interrupted by a boundary timer stayed CLOSED but kept is_self_service = 1, so PMQL/saved searches and UI still treated them as claimable self-service work.

TokenRepository::persistActivityClosed() now sets is_self_service to 0 whenever a self-service token is closed (e.g. interrupting boundary timer), since closed tokens cannot be claimed.

Adds feature tests with a self-service + timer boundary BPMN fixture: interrupting timer asserts CLOSED, flag cleared, and the task is excluded from is_self_service = 1 API results; non-interrupting timer leaves the task ACTIVE with the flag unchanged.

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

@decisions-sonarqube

Copy link
Copy Markdown

@vladyrichter

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants