Jaa


UpdateInventory Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Represents the UpdateInventory pipeline component. This class contains items required by the IPipelineComponent interface.

Namespace:  Microsoft.CommerceServer.Inventory
Assembly:  Microsoft.CatalogServer (in Microsoft.CatalogServer.dll)

Syntax

'Declaration
<ComVisibleAttribute(True)> _
<GuidAttribute("525E1580-3473-4e2d-92B1-CD48B42174E1")> _
Public Class UpdateInventory _
    Inherits RegisterCOMComponentFriendlyName
'Usage
Dim instance As UpdateInventory
[ComVisibleAttribute(true)]
[GuidAttribute("525E1580-3473-4e2d-92B1-CD48B42174E1")]
public class UpdateInventory : RegisterCOMComponentFriendlyName
[ComVisibleAttribute(true)]
[GuidAttribute(L"525E1580-3473-4e2d-92B1-CD48B42174E1")]
public ref class UpdateInventory : public RegisterCOMComponentFriendlyName
public class UpdateInventory extends RegisterCOMComponentFriendlyName

Remarks

The component provides real time inventory stock checks on items in the customer's basket.

When UpdateInventory fails, such as when the component is unable to decrement the inventory for a line item, UpdateInventory performs the following steps: it writes a generic error, returns an error level of 2, and does not return an HRESULT. The level 2 error prevents the pipeline components after the UpdateInventory component (in the CHECKOUT pipeline) from executing. However, the Orders runtime system does not throw an exception.

Because no exception is thrown, you must write your site code to look through the _Purchase_Errors collections to determine that the pipeline failed to execute completely. Additionally, to determine the line item that caused the error, your site code must check the LineItemCollection and access the indexer property "_inventory_condition" for each line item.

For more information about the IpipelineComponent interface, see IPipelineComponent Interface [CS05]. For more information about the IpipelineComponentDescription interface, see IPipelineComponentDescription Interface [CS05].

Inheritance Hierarchy

System..::.Object
  RegisterCOMComponentFriendlyName
    Microsoft.CommerceServer.Inventory..::.UpdateInventory

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

UpdateInventory Members

Microsoft.CommerceServer.Inventory Namespace