-
Notifications
You must be signed in to change notification settings - Fork 41
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
[CHANGE REQUEST] Add new Leg State : PAUSE_FORCED #554
Comments
Hi! The use case sounds interesting but I think I didn't get it completely. Basically the user has a running booking and wants to end it. For ending the leg the bike has to be in the business area and additionally not in a no-parking space. If the leg would be ended by the user via his app, the MP would issue a START_FINISHING event. But this would not be successful because the conditions for ending the leg are not met. The user will be informed about that. In your case the leg is not ended via app. Instead the user just locks the bike. The TO recognizes this and checks if the leg can be finished. Since the conditions are not met the leg can't be finished here. I assume the user will be informed about the wrong location for ending the leg and will continue on with his leg and try to end the leg at a location that fulfills the conditions. Is my understanding correct? |
Yes, your understanding is correct. User locks the bike on the bike itself in a bad area. In the regular flow, the user can issue regular pause requests to lock / unlock the bike. We want to separate those 2 pause types and a new leg state should reflect that best, instead of using one of the memo* fields. From a business side we want to achieve:
|
What happens in your case when the user locks the bike and the bike is parked properly in a parking zone. How do you distinguish whether the user wants to pause the bike or end the rental? |
Hi Mat, The end rental case is looking like that: |
Thx for the additional info. That makes sense. You already mentioned that one option would be to send a But you suggested to have a new leg state In addition the status of the bike looks the same: it's locked but still in rental. Only the user who rented it can open the bike. It's not shown as available to anyone else. But maybe there is one difference: what happens if the user doesn't react to the info that the leg can't be finished at this location? Will the leg ultimately be |
Hi, we send changes from any ’booking' or 'leg' events from TO to the MP, so actively pushing any information to the MP. In our solution with the new leg type, the MP would just receive an This would be sufficient for us. The MP's app could explicitly distinguish between the 2 pause types using this After a defined time if the user does nothing (in our case 24 hours), is exactly like you described: the leg will be ultimately By contrast, for a regular pause within the usual business zone, the MP sends There are no other circumstances or business cases where a regular pause is |
Hi! I now fully understand the use case and your reasoning for the new leg state |
Hmmm. Personally, I don't think it is wise to add another event type (reflecting the status). Other MPs don't know (yet) how to handle it and it doesn't simplify the API. Isn't there another way? What's the sequence? OR a) bike is IN_USE If the MP doesn't show it to the end user OR the end user doesn't replace the bike, a fine can be added to the /payment/journal-entry endpoint. |
Hi @edwinvandenbelt the first option is the sequence.
Alternatively, for communicating this we could use the standard PAUSE event in combination with the field Edit (21.08.2024) to MPs TO -> MP |
API Version
TOMP 1.5
Summary
Add new Leg State FORCED_PAUSE to show the MP that the TO had set the bike in a forced Pause when trying to finish a booking that the TO will prevent for business reasons (non-parking area).
The API reflects that the users ride cannot be finished: the legs stays in FORCED_PAUSE state, and the user need to move the bike outside of a no-parking area.
Expected Behavior
Extend LegEvent Types
[ PREPARE, ASSIGN_ASSET, SET_IN_USE, PAUSE, OPEN_TRUNK, START_FINISHING, FINISH, TIME_EXTEND, TIME_POSTPONE, CANCEL ]
to
[ PREPARE, ASSIGN_ASSET, SET_IN_USE, PAUSE, FORCED_PAUSE, OPEN_TRUNK, START_FINISHING, FINISH, TIME_EXTEND, TIME_POSTPONE, CANCEL ]
Current Behavior
Use PAUSE Leg Event Type and write the information that the pause was forced in one of the additional fields:
The Combination auf PAUSE + one of the above fields would be a workaround, but more complicated for the MP to implement.
Possible Solution
Extend the LegEvent Types to:
[ PREPARE, ASSIGN_ASSET, SET_IN_USE, PAUSE, FORCED_PAUSE, OPEN_TRUNK, START_FINISHING, FINISH, TIME_EXTEND, TIME_POSTPONE, CANCEL ]
Steps to Reproduce
Not yet, it is still in design
Context (Environment)
Creating Legs from TO side.
We came over to this problem when when a user is trying to finish a ride by locking the bike:
If the bike got locked from the TO side, we check if the user can finish the booking there. If our backend decides that the ride could not be finished there (no-parking spaces, outside business area), we will notify the user about that.
If this situation comes along, the TO creates a leg of the user in a FORCED_PAUSE, this should be reflected through the API.
Detailed Description
see context.
Possible Implementation
See possible Solution
The text was updated successfully, but these errors were encountered: