The loadInventoryMismatch service

The LoadInventoryMismatch service goes through several different steps.

Note: Although we have used WebLogic JMS as an example, Sterling Order Management System Software supports the use of WebSphere®.

From file IO to text translator

The LoadInventoryMismatch service first looks at a particular directory where the node uploads the inventory information in an XML file of the following format:


<?xml version="1.0" encoding="UTF-8" ?>
<Inventory YantraMessageGroupID=”OPTIONAL” ShipNode="REQUIRED" ApplyDifferences=""
 CompleteInventoryFlag="" ReasonCode="" ReasonText="">
    <Items>
        <Item InventoryOrganizationCode="REQUIRED" ItemID="REQUIRED" ProductClass=""
 UnitOfMeasure="" >
            <Supplies>
                <Supply ETA="" Quantity="" Segment="" SegmentType="" ShipByDate=""
 SupplyType="" SupplyReference="" SupplyReferenceType="" SupplyLineReference=""
 AvailabilityType="">
                    <Tag BatchNo="" LotNumber=”” LotAttribute1="" LotAttribute2=""
 LotAttribute3="" LotKeyReference="" ManufacturingDate="" RevisionNo="" />
                </Supply>
            </Supplies>
        </Item>
        <Item ...>
            ...
        </Item>
    </Items>
    <Items>
        <Item ...>
            ...
        </Item>
    </Items>
</Inventory>

That XML is then passed on to the Text Translator.

Note: There are as many messages sent to the JMS queues as there are <Items> nodes. In order to control the number of those messages, make use of the number of <Item> nodes within each <Items> node appropriately. IBM® recommends including 100 <Item> nodes within each <Items> node.

From text translator to webLogic JMS

The Text Translator parses the XML files, one at a time, and includes the attributes of the <Inventory> node into every one of the <Items> node.

If the YantraMessageGroupID attribute is not passed, Sterling Order Management System Software generate one automatically. That attribute is unique for every file.

When a file has been successfully parsed, each <Items> node is added to the JMS Queue as a message. When the file has been completely parsed, the EOF (End Of File) node is added to the JMS Queue.

From webLogic JMS to API

The JMS Queue then reads every message in the queue. The loadInventoryMismatch API is called for each message in the queue, with the appropriate XML as input.

When an EOF message is received by the Integration Server, the server first checks if there are any reprocessable messages for this service with the same YantraMessageGroupID. If there are any pending error messages to be reprocessed, then the EOF message is marked as a reprocessable error message and inserted into the YFS_REPROCESS_ERROR table. This message needs to be reprocessed along with other reprocessable errors for this service.

If there is no pending error messages to be processed, it calls the SyncLoadedInventory Service. For more information about the Sync Loaded Inventory service, see The syncLoadedInventory service.

The loadInventoryMismatch API inserts into the YFS_INVENTORY_SUPPLY_TEMP for each <Item> ... </Item> node.