@startuml Order penalty flow title Order penalty actor Apps as app participant Server as server database Database as db participant "Third Party" as third autonumber app -> app: Finished Order\nWith out leaving the connector third -> server ++: notification_charge_order_info server -> db --: Update Order Status ' alt Interval ' third -> server ++: notification_charge_order_info ' app -> third ++: Get Connector Status by order ' third -> server --++ ' server -> server --: Check connector status ' server -> db --: Update Order Actual End Time \nIf Status is not 已插槍 ' end autonumber alt 拔槍 third -> server ++: notification_stationStatus server -> db ++: Find Out Current Order (Status = 已完成 & Acutal End Time = Null) By Connector ID db -> server -- server -> db --: Update Actual End Time & Calculate Penalty ((Acutal End Time - End Time) * Penalty Fee/Min) end autonumber alt Having Penalty app -> server ++: Get Order Information: Current || Having Penalty & Not Paid\nTry to create another order server -> app --++: Penalty Fee app -> server --++: Wallet Transaction to pay the penalty fee by Order ID server -> db --: Update Order pay penalty fee status by ID end @enduml