FOUR-28994: Fix self-service lock after interstitial redirect by eiresendez · Pull Request #1908 · ProcessMaker/screen-builder

Issue & Reproduction Steps

When the Start Event interstitial is enabled, launching a case first loads the start event token and then transitions client-side to the real self-service task.

  1. Enable the Start Event interstitial on the process.
  2. Launch a new case.
  3. Land on the task edit page after the interstitial redirect.
  4. Notice the task is editable on first load.
  5. Refresh the page.
  6. Notice the self-service overlay appears and the task becomes blocked.

Expected behavior:
The self-service task should be blocked immediately on first load after the interstitial redirect, without requiring a manual refresh.

Actual behavior:
The task is editable on first load, and only becomes blocked after refreshing the page.

Solution

  • Recalculate the self-service lock state from the currently loaded task instead of relying on the initial window.ProcessMaker.isSelfService flag.
  • Refresh isSelfService immediately after loadTask() receives the real task payload and again during checkTaskStatus().
  • Add regression coverage for resolveSelfService, setSelfService, checkTaskStatus, and loadTask.

How to Test

Test the steps above

Related Tickets & Packages

ci:deploy