Backend integration
Timeouts
There are 4 timeouts configured for the integration, they serve as safety nets for cases when the integrated systems fail to make appropriate API calls according to the flow or when the users (drivers and passengers) don't provide any required response in time.
DriverAcceptTimeout
This timeout is initiated when an order is created (the Order create API is called by Mileus), it's canceled when the RH operator calls either the /order/driver-accept or the /order/driver-cancel API (the driver either accepts or refuses the ride). If this timeout occurs it means that the driver has failed to react to the offered order, the order is canceled from Mileus side (by calling the Order cancel API) and Mileus proceeds to search for other matches (possible rides).
PassengerAcceptTimeout
This timeout is initiated when an order is accepted by the driver (the /order/driver-accept API is called by the RH operator) and the ride is offered to the passenger, the timeout is canceled when the passenger responds to the offered ride. If this timeout occurs it means that the passenger has failed to accept the ride, the order is canceled from Mileus side (by calling the Order cancel API) and Mileus cancels the watchdog search.
OrderConfirmationTimeout
This timeout is initiated when a ride is accepted by the passenger (the Order accept API is called by Mileus at this point), it's canceled when one of the following events occurs:
- Mileus successfully calls the Order accept API and it works synchronously (see below), so no call to the /order/confirm API is then expected
- Mileus is able to retrieve the status of the order from the Order state API of the RH operator (called right before this timeout occurs) and determine the success/failure of the confirmation based on the response
- the RH operator successfully calls the Mileus /order/confirm API (in case of the Order accept API of the RH operator being asynchronous)
If this timeout occurs it means that the integrated systems have failed to perform the final confirmation of the ride (in time), the order is canceled from Mileus side (by calling the Order cancel API) and Mileus proceeds to search for other matches (possible rides).
SearchTimeout
This is the “global” timeout of the watchdog search, it's initiated when the passenger starts the searching process. If this timeout occurs it means that no suitable match has been found (or that none of the found matches ended up as a successful ride order), the watchdog search is stopped and the order is canceled from Mileus side (by calling the Order cancel API) if applicable (if there is a pending order).
However, if the timeout occurs when the search has reached a state where a match has been found and an order is pending, the timeout is prolonged until the order is accepted or canceled/timeouted. In other words, if this timeout occurs after the Order create API is called by Mileus and the driver and then the passenger now has the chance to accept the ride, Mileus postpones the search stopping and gives it “one last try” to complete the order.