Newer Version Available
Considerations for Subscribing to Platform Events with Processes and Flows
Before you use processes or flows to subscribe to platform events,
familiarize yourself with these considerations.
- Infinite Loops and Limits
- Be careful when publishing events from processes or flows because you can get into an
infinite loop and exceed limits. For example, a process is associated with the Printer
Status platform event. The same process includes an action that creates a Printer Status
event notification. The process would trigger itself.
To avoid creating an endless loop in an event process, make sure that the new event message’s field values don’t meet the filter criteria for the associated criteria node.
- Subscriptions Related List
- On the platform event’s detail page, the Subscriptions related list shows which
entities are waiting for notifications of that platform event to occur. One “Process”
subscriber appears in the Subscriptions related list when:
- At least one active event process is associated with that platform event
- At least one flow interview is waiting for that platform event to occur
- Uninstalling Events
- Before you uninstall a package that includes a platform event:
- Delete interviews that are waiting for the event to occur
- Deactivate processes that reference the event
- Testing Events
- Event processes or Wait elements subscribed to platform events don't support Apex tests.
Event Processes
These considerations apply only to event processes.
- Formulas
- Formulas in Process Builder don’t support platform event fields.
- Post to Chatter Actions
- You can’t include event references in Chatter post messages.
- Scheduled Process Actions
- Scheduled actions aren’t supported in event processes.
- Packaging Event Processes
- When you package an event process, the associated object isn’t included automatically. Advise your subscribers to create the object, or manually add the object to your package.
Resumed Flow Interviews
These considerations apply only to flow interviews that resume when a platform event occurs.
- Formulas
- To reference a platform event field in a flow, pass the event data into an sObject variable in the Wait element. Then reference the appropriate field in that sObject variable.
- Event Condition Values
- In flow event conditions, values can’t be more than 765 characters.