Troubleshooting
Problem
Consider a reservation created in the passed using the following input to reserveAvailableInventory-
<Promise EnterpriseCode="DEFAULT" OrganizationCode="DEFAULT">
<ReservationParameters/>
<PromiseLines>
<PromiseLine FulfillmentType="" ItemID="WItem" LineId="1" RequiredQty="1" ShipNode="Node2" UnitOfMeasure="" ValidateItem="N">
<ReservationParameters ExpirationDate="" ReservationID="0900014423180622155241"/>
</PromiseLine>
</PromiseLines>
</Promise>
This created the following reservation -
INSERT /*YANTRA*/ INTO YFS_INVENTORY_RESERVATION(INVE
Cancel this reservation the following day by passing the following input to the API cancelReservation-
<CancelReservation ItemID="WItem" OrganizationCode="DEFAULT" ProductClass="" QtyToBeCancelled="1"
ReservationID="0900014423180622155241" ShipNode="Node2" UnitOfMeasure=""/>
This does not result in the reservation being cancelled
Cause
The application allows creation of multiple reservations with different ShipDates having the same reservationID, shipnode and other details. SHIP_DATE is defaulted to the current date. All the details are required by the cancelReservation API to identify the correct reservation to be cancelled.
Diagnosing The Problem
Consider a scenario where there are two reservations with same INVENTORY_ITEM_KEY,RESERVATION_ID and SHIPNODE_KEY
1. If ShipDate is not defaulted to the current date in cancelReservation , it would be passed as NULL which would result in 0 records from DB, thus resulting in no reservations being cancelled.
2. If ShipDate is not passed at all in the above query, it would result in two reservations being cancelled, this would not be the expected behavior.
Resolving The Problem
Pass the required ShipDate in the input to cancelReservation to help identify the correct reservation to be cancelled.This is inserted in the yfs_inventory_reservation at the time of creation of the reservation.
Was this topic helpful?
Document Information
Modified date:
26 July 2018
UID
ibm10716899