Resolve ambiguity on "Waiting confirmation" booking status for booking by API #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Booking requests have a status to describe the state in the workflow of the booking. The first (or second after PR #50) status in the workflow is WAITING_CONFIRMATION.
We faced an issue with this while implementing bidirectional interoperability.
In the case of a bidirectional interoperability between a MaaS and a carpool operator (a user from the MaaS can book a journey from the operator, and a user from the operator can book a journey from the MaaS), the WAITING_CONFIRMATION state is ambiguous. By reading the booking status, we cannot tell if we are waiting for a confirmation from the MaaS or from the operator, as it doesn't specify if we are waiting for a response from the driver or the passenger.
The introduction of a booking status INITIATED proposed in PR #50 makes it problematic even in the case of a "one way" relationship between the MaaS and the operator (only initiate booking from the MaaS to a journey on the operator, and not the other way), as :
In this case, it will also be ambiguous and we won't know by reading the booking state which platform/user has to confirm
To resolve this ambiguity, we propose to :