StateMachineEvent not getting entity
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3503889. --> Reported by: [dariogcode](https://www.drupal.org/user/186754) Related to !2 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When reacting to pre_transition or post_transition events, actions doesn't have the entity available to act on. </p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>1. Create flow with State Machine event<br> 2. Try to show a message with entity values [entity:label]<br> 3. Message empty, entity not available.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>I've reviewed and compare this event code with other ECA events and may be we need to declare the function getData additionally to the actual buildEventData, in order to get entity available. I'm not totally sure the implementation Im attaching is fine but this works in my enviroment after a few tests. </p>
issue