How to stop timer event, if expected event has happened

I am designing a flow where:

  • flow starts
    A. an event should happen, e.g. user changes the status → flow ends
    B. if user has not changed the status during 5 min, do something → flow ends
    If either A or B has finished, the complete flow should end.
    But my problem is, flow still remains in either Timer event or message catch event.

How to design such flow properly?

Hi @Jevgeni_Zolotarjov

If I understood you correctly, using an event-based gateway should serve your needs