Hi, how can I define a conditional, compound, tri...
# ask-community
t
Hi, how can I define a conditional, compound, trigger for a Deployment which depends on two events where those events must share a common payload. For example: Flow A and Flow B both emits a
foo.date
event. In the event payload they include the actual date, like
payload={'date': '20241211'}
. The Deployment above should be triggered after receiving both those events and the
date
payload is the same for both events. If the payload differs the Deployment should not be triggered. Is that possible using Prefect? If not, is there a workaround?
The workaround I see is to evaluate the conditional at runtime of the Flow and abort if the conditional is false. Which will put unnecessary stress on Prefect infra and make it harder to monitor the Prefect Flows if the number of events is significant.