Record Trigger Flow & Trigger Action Flow
Closed this issue · 1 comments
I really like the framework because it provides below
1.Control of order of execution across flow and apex
2.Granuler bypass mechanism
But this restrict the use of record trigger flow capability like
1.before save,after save - This can still be solved by calling flow from Apex so we can still have autolaunched flow called from Apex trigger
2.Async schedule path - No idea if we can solve this using this frame work
My question is- should we avoid using record trigger flow if we want to use this framework? I won't like to create another mechanism for bypass in case we use record trigger flows as well.Please help with you view on this.
Thanks
Regards
Sarabjeet Pal
While the Trigger Actions Framework offers significant advantages, it does have some limitations compared to Record Triggered Flows:
- Workflow Outbound Messages: Trigger Action Flows cannot directly send workflow outbound messages.
- Time-Based Workflow: Trigger Action Flows do not have built-in support for time-based actions.
- Async Paths: Trigger Action Flows don't natively support asynchronous paths. However, you can leverage Change Data Capture events to trigger flows asynchronously, as a nice workaround.
Despite these limitations, Trigger Action Flows offer several advantages:
- Interoperability with Apex: You can easily choreograph Trigger Action Flows with Apex logic, providing greater control over the order of execution and enabling complex automations.
- Standardized Bypass Mechanisms: The framework's bypass mechanisms offer granular control over automation execution, making it easier to manage and maintain your automations.
- All 7 Trigger Contexts: Trigger Action Flows can operate in all 7 trigger contexts, including
after undelete, providing more comprehensive automation capabilities. - Invocable Apex: You can call Apex methods directly from before-save Trigger Action Flows, enabling you to perform complex calculations.
- Entry Criteria: The recent addition of entry criteria to the Trigger Action Framework further enhances the capabilities of Flows, allowing you to define conditions that must be met before the flow is triggered.
Considering the trade-offs, a hybrid approach is often recommended:
- Use Trigger Action Flows for most scenarios: Leverage the framework's benefits, especially for synchronous actions and complex automations that require explicit control over the order of execution.
- Utilize Record Triggered Flows when necessary: For specific use cases like time-based actions or workflow outbound messages, Record Triggered Flows might be more suitable.
- Leverage Workarounds: For asynchronous paths, consider using Change Data Capture events in conjunction with Trigger Action Flows.