-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an associated trip id to status changes when a trip ends #289
Comments
It seems like a good idea to me to require an
For 0.3.1, we could find a middle ground that explicitly allows providers to include the field for other event types but doesn't require it. If and when the provider state machine is defined more clearly in a future version of MDS, I think it would make sense to allow edges going from the |
This implements the change suggested in openmobilityfoundation#289 by clarifying that any trip-ending event can and should have an `associated_trip_id`, not just `user_drop_off` events. Since the Provider event system currently doesn't define which states are allowed to transition to which other states, it's already spec-compliant to follow a `reserved`/`user_pick_up` event with an `unavailable`/`low_battery` event, and this is the most semantically-accurate way to describe the scenario where a device shuts down during a trip because of low battery. In this situation, the implementer should include an `associated_trip_id` field in both events so that API consumers can correctly identify these events as the endpoints of the relevant trip.
This implements the change suggested in openmobilityfoundation#289 by clarifying that any trip-ending event can and should have an `associated_trip`, not just `user_drop_off` events. Since the Provider event system currently doesn't define which states are allowed to transition to which other states, it's already spec-compliant to follow a `reserved`/`user_pick_up` event with an `unavailable`/`low_battery` event, and this is the most semantically-accurate way to describe the scenario where a device shuts down during a trip because of low battery. In this situation, the implementer should include an `associated_trip` field in both events so that API consumers can correctly identify these events as the endpoints of the relevant trip.
The language of the spec was updated in #297 to be more explicit that |
Currently the provider specification only requires an
associated_trip
for status change events if theevent_type_reason
isuser_pick_up
oruser_drop_off
. For trip starts an event withevent_type = reservation
andevent_type_reason = user_pick_up
appears mandatory. For trip ends, however, it seems possible that the vehicle doesn't becomeavailable
(a scooter with low battery when a trip ends for example). In this example a trip would end with the state transition (available
,reserved
) to (unavailable
,low_battery
) and noassociated_trip
would be present in the status change event. It seems the intent is to have anassociated_trip
id present at end of trips even when there is no allowableuser_drop_off
event_type_reason
.The text was updated successfully, but these errors were encountered: