Singal vs message event to capture wait

In my use-case, I have to capture following flow:

A vehicle enters a premise, performs a series of tasks and leaves premise.

I am able to capture enter event using a message start event(to map to a sensor event), followed by various service tasks corresponding to various tasks performed by vehicle.

But I am not sure about how to capture exit event, save some data, and then end the process. As time taken by vehicle in the premise is a variable entity, so timer event doesn’t seem to be a fit here.

I guess signal/message event is a better fit. Which one of these two is a better fit for my use-case?

Generally when trying to decide between message and signal events the main consideration correlation.

If you’re looking for a one-to-one correlation then use a messag event.
If need to a broadcast that could be caught my more than one process instance use a signal.

For your case, it seems like message event is the way to go.

2 Likes