Handling order and inventory system outages
In the point-to-point integration between HCL Commerce and Sterling Order Management, in the order management system, outages occur, sometimes with long downtime. To avoid impact to the front end, HCL Commerce has a way to deal with the outages in the order capture process.
The Sterling Order Management order management system can schedule outages that affect the HCL Commerce front-end order capture process. HCL Commerce continues to accept orders during any outages by using an exception. HCL Commerce calls heartbeat if an exception is thrown.
- For the inventory system: http://INVENTORY_SERVER_HOSTNAME:INVENTORY_SERVER_PORT/smcfs/heartbeat/heartbeat.jsp
- For the order system: http://ORDER_SERVER_HOSTNAME:ORDER_SERVER_PORT/smcfs/heartbeat/heartbeat.jsp
A heartbeat for the inventory system is different than a heartbeat for the order system. With the inventory system heartbeat scheduler, the scheduler adds a job when the system is off. With the order system heartbeat scheduler, the heartbeat is always running. With a scheduled heartbeat job, the heartbeat gets triggered to get the real-time system state. From there, it checks the system state in the registry. If the real-time system state is different from the one in the registry, the registry is updated to the real-time system state. If the system state is on, the system outage is over. For the inventory system, if the system state is off, a new heartbeat scheduler job is added after a heartbeat. For the order system, a new job is always added after a heartbeat. The interval between the heartbeat scheduler jobs is configurable (default is 5 minutes).
Order management system outage and getInventory availability in the product display page and add to shopping cart page
- Retrieves the inventory component state from the registry.
- If the system state of the inventory component is off, HCL Commerce bypasses the order management system monitorItemAvailability and findInventory API calls, and returns a successful response. The response of the inventory status is decided by the fallback status in the inventory configuration.
- If the system state of the inventory component is on, HCL Commerce calls
the order management system monitorItemAvailability and findInventory
API synchronously through the Service Definition Framework.
- If an exception, such as TimeoutException or IOException, is received, HCL Commerce calls heartbeat. If the heartbeat returns order management system off, HCL Commerce updates the system state of the inventory component to off in the Registry. It accepts the exception and returns as a successful response. HCL Commerce then adds a scheduler job to run the heartbeat again in a configurable period (example, 5 minutes). This scheduled job adds a scheduler job for the heartbeat until it detects that the order management system is on.
Order management system outage and the reserve inventory process
- When the shopper goes to the order summary page and OrderPrepare is called: HCL Commerce retrieves the inventory component state from the Registry.
- If the system state of inventory component is off, HCL Commerce bypasses the order management system reserveAvailableInventory API call and returns a successful response.
- If the system state of inventory component is on, HCL Commerce calls
the order management system reserveAvailabileInventory API synchronously
through the Service Definition Framework.
- If an exception, such as TimeoutException or IOException, is received, HCL Commerce calls heartbeat. If the heartbeat returns Inventory system off, HCL Commerce updates the system state of the inventory component to off in the Registry. It accepts the exception and returns as a successful response. HCL Commerce then adds a scheduler job to run the heartbeat again in a configurable period (example, 5 minutes). This scheduled job adds a new scheduler job for the heartbeat until it detects that the order management system is on.
- If reserving inventory is run when the order management system is off, depending on the
fallback status in the qualified inventory configuration, HCL Commerce updates the inventory status of all items in
the order. HCL Commerce updates the status to
NALC
, if the fallback status is not configured as available or backorderable. HCL Commerce updates the status of the items in the order toVALC
, which indicates that the inventory reservation virtually happens.
HCL Commerce cancels inventory reservation and order management system outage
- HCL Commerce retrieves the inventory component state from the Registry.
- If the system state of inventory component is off, HCL Commerce bypasses
the order management system cancelReservation API call and returns
a successful response. Note: If the inventory reservation expiration rule in order management system is set, HCL Commerce relies on this expiration rule to make the inventory reservation expired in this situation.
- If the system state of inventory component is on, HCL Commerce calls
the order management system cancelReservation API synchronously through
the Service Definition Framework.
- If an exception, such as TimeoutException or IOException, is received, HCL Commerce calls heartbeat. If the heartbeat returns order management system off, HCL Commerce updates the system state of the inventory component to off in the Registry. It accepts the exception and returns as a successful response. HCL Commerce then adds a scheduler job to run the heartbeat again in a configurable period (example, 5 minutes). This scheduled job adds a scheduler job for the heartbeat until it detects that the order management system is on.
Order transfer and order management system outage
- HCL Commerce retrieves the order component state from the Registry.
- If the system state of order component is on, HCL Commerce checks the inventory state of the order
items. If the order state is
VALC
, HCL Commerce does not pass the reservation line information to the order management system. - If the system state of order system component is off, HCL Commerce does not trigger the order transfer. The order is then put to H: Failed to Transfer status.
- Order transfer is triggered in the asynchronous mode in HCL Commerce, unlike processing in the inventory operations. It is hard for HCL Commerce to detect the system state and transfer the order in the same transaction. Therefore, the heartbeat is running in the regular scheduler mode.
OrderRetransfer for orders in H or F status and order management system outage
- HCL Commerce retrieves the order component state from the Registry. If the system state is off, it is directly returned.
- If the system state of order component is on, HCL Commerce picks up the orders in H: Failed
to Transfer status. The order transfer is triggered for these orders, but not to pass
line reservation information for
VALC
order items. - If the system state of order component is on, HCL Commerce picks up the orders in F: Hold on Transfer status that has not been updated for a long time. This time period is configurable. The order information is gathered from Sterling Order Management. If Sterling Order Management does not return the order information, HCL Commerce triggers the order transfer. If Sterling Order Management returns the order information, HCL Commerce updates the order status to G: Successfully Transferred, and does not trigger the order transfer.