Real-Time Workflow vs Plugin: Execution Order
Like plugins, real-time workflows are executed before (pre-operation) or after (post-operation) the core operation. Both are executed inside the same database transaction. Here are outlined some actions I have executed in order to evaluate their execution order: Customization of a custom entity named Entity A which contains two text fields named ‘Plugin Text’ and ‘Workflow Text’; Registration of two synchronous plugin steps for Pre Update and Post Update, which are triggered when the Entity A name field is updated: Pre Update Event: sets ‘Plugin Text’ with PLUGIN | PRE UPDATE; Post Update Event: sets ‘Plugin Text’ with PLUGIN | POST UPDATE; Creation of two real-time workflows; one runs before the update and the other runs after the update. Both are triggered when the Entity A name field is updated: Before Update: sets ‘Workflow Text’ with Workflow | PRE UPDATE; After Update: sets ‘Workflow Text’ with Workflow | POST UPDATE; Then after created and Entity A record, upd...