0

I am creating a flow that uses an Apex action that calls multiple future methods in quick succession and publishes platform events for each of them when they are done. There is also another flow with a pause element that subscribes to and counts all these platform events. I thought that a flow and/or pause element subscribe to platform events one by one but that does not seem to be the case. Oftentimes only the last published event would show up as the output of the pause element.

Upon reading up on this issue, I came across the following in the documentation here, :

A flow interview can receive a batch of event messages at once.

Is there any way to unpack this batch so that I can check the event messages individually? The output of a pause element can only be saved to a single platform-event record variable if I am not mistaken so how exactly is one to handle such a batch of event messages?

Any suggestions of how to subscribe to platform events in such a way that I can have some control over each of them even when batched together are very much welcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.