Service Expiration

Service Duration Calculation

Platform node will do service duration calculation according to serviceExpiredDate and duration.

When user creates an order after deciding service duration, the initial status for order is OrderPending. As user pays the order according service merchant's instruction, with the service custom defined service launching script, the order status and user service status will have the following two situations:

  1. As service merchant uses default service timing logic, order logic will be OrderFiled and user service status will be ServiceRunning, which means the user service starts timing.
  2. When service merchant uses preventDefault() from SystemUtils library, the initial status for order will be OrderFiled and user service status will be ServicePending which has not started service timing. The user service will start timing as user post a resource usage request to merchant resource node. The merchant resource node will notify merchant SDK node to start timing user service. The user service status will be updated to ServiceRunning while order status unchanged.

Calculation of Duration using Number (hour)

  • When user chooses to input number for service duration, the input number will equal to end_time - start_time.

Calculation of Duration using Date String (YYYY-MM-DD hh:mm:ss)

  • When user chooses to input date string for service duration, the duration number will be larger than or equal to end_time - start_time.
  • When end_time is less than an hour, the system will add up to 1 hour.
  • The user service will end by user's date string.

User Service Information Example

               Order Id               │   Service Type    │    Creation Time    │ Duration (HOUR) │   Expiration Time
 f4095060-0365-4a50-b123-321732f12486 │ Container Service │ 2021-04-27 09:29:58 │       1002021-05-01 22:59:30
Last Updated: 2/27/2023, 8:08:10 AM