Step Data panel missing tokens in replay for queue worker events - tokens set by DataProviderInterface not displayed
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3586143. --> Reported by: [freelock](https://www.drupal.org/user/313537) Related to !617 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When viewing execution replay data for ECA workflows triggered by queue worker events (`eca_queue:processing_task`), the Step Data panel in the Modeler UI does not display all tokens that are available during execution. Specifically, tokens added via `TokenService::addTokenDataProvider()` (such as the `entity` token from the Task's data) are not visible in the Step Data tree, even though they are accessible to actions and conditions.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>1. Create an ECA model with a queue worker event (`eca_queue:processing_task`)<br> 2. Configure the model to enqueue tasks with specific tokens (e.g., `entity`, `message`, `image_uri`)<br> 3. Trigger the workflow by creating a queue item<br> 4. Allow the queue to process (or run `drush queue:run`)<br> 5. Open the Modeler and view the execution replay for the processed event<br> 6. Navigate to any step in the replay (e.g., "Add image" action)<br> 7. Observe the Step Data panel</p> <p>The Step Data panel should show ALL tokens available at that execution step, including:</p> <ul> <li>env_name (set by custom action)</li> <li>entity (restored from queue via Task DataProvider)</li> <li>image_uri (derived from entity)</li> <li>message (restored from queue)</li> <li>post (created by earlier action)</li> </ul> <p>Actual result:</p> <p>The Step Data panel only shows a subset of tokens:<br> - &#10003; `Env Name` (top-level token)<br> - &#10003; `Post` (token created by action)<br> - &#10003; `User` (global token)<br> - &#10007; `entity` - **MISSING** (restored from queue via addTokenDataProvider)<br> - &#10007; `image_uri` - **MISSING** (derived from entity)</p> <p>See attached screenshot - Step data shows env name, event, post, user but does not show entity or image_uri tokens -- hwever the action configuration shows these, and the execution succeeded, showing the tokens were available.</p> <p><img src="https://www.drupal.org/files/issues/2026-04-21/Screenshot_20260421_171320.png" alt='Image shows "Add image" step at 7 of 10. Step Data shows Env Name, Event, Post, User but does NOT show `entity` or `image_uri` tokens. However, the action configuration shows `[image_uri]` in the Image field, and the execution succeeded, proving the token was available.'></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Either:<br> 1. **Modeler**: Update `ReplayDataRenderer` to query all available tokens (including from DataProviders) when displaying Step Data<br> 2. **ECA**: Ensure `ProcessDebugger` captures the full token state including DataProvider data when storing history</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3> <p>(Issue partially written using an AI agent).</p>
issue