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.
- Enable the Start Event interstitial on the process.
- Launch a new case.
- Land on the task edit page after the interstitial redirect.
- Notice the task is editable on first load.
- Refresh the page.
- 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.isSelfServiceflag. - Refresh
isSelfServiceimmediately afterloadTask()receives the real task payload and again duringcheckTaskStatus(). - Add regression coverage for
resolveSelfService,setSelfService,checkTaskStatus, andloadTask.
How to Test
Test the steps above
Related Tickets & Packages
ci:deploy