FFOD delivery #2 FFoddDelivery Deliveryunit Delivery unit Are you available for delivery? Deliver the Order Deliver to DoorCall customer Delivery delivered? 30 minutes Order delivered Pickup Order Send notification to restaurant Delivery cancelled FFoddPortal FFodd Portal Choose optimal delivery unit Change state to "On the Way" Change the State to "Waiting for pickup" Order cancelled Change state to "Delivered" Payments to Restaurants Send final receipt to Customer Order finished Send Order to Restaurant Orders Assing to pickup Order is completed and paid Cancel order (no payment) Order prepared? Cancel Order (return payment) Order cancelledReceive order response Send notification to Delivery unit 1h response not received Send error mail to restaurant Notify Delivery unit Customer Restaurant Order Change Order state Change Order state to"Ready for Payment" Change Order state Add Order Change Order state YesNo Finalreceipt Notify"Waitingforpickup" Notify"OntheWay" Notification"Ordercancelled" Notification"Ordercancelled" Change Order state Yes Yes No Orderresponse No Deliveryguytopickup Change Order state Manual task does not pass data to process so gateway cannot make decision -1 FFood Delivery Description #2 The completed and paid Order is in the System (Faulty Food Portal). Order is sent to a restaurant to prepare and pack. After the System receives a message that Order is ready, it changes the Order state (also in the database (DB)) and notifies the Customer with „Waiting for pickup “. If the response about Order does not come in one hour or the restaurant sends cancel response the Order is cancelled and process with payment return is invoked. Meanwhile, the System chooses an optimal delivery unit and asks the delivery unit for assignment confirmation; it repeats its process until the ideal delivery unit is selected. Delivery is then assigned to the selected unit. The delivery unit pick-ups the Order and click on “On the Way” in the System. Notification (“On the Way”) is sent to the Customer, and the state is also changed in DB. Order is also added to the DB of delayed batch payments for the chosen restaurant. The delivery unit tries to deliver the order (call then deliver to door) If it’s unsuccessful, it waits 30 minutes then tries it again. It can cancel the process and the Order is cancelled without payment return. The Customer is notified about the cancellation. Successful delivery changes the state to Delivered and readies the delayed batch payment for the restaurant. A final receipt is sent to the Customer, and Order is finished.