Configuring deleting order items and requisition lists

If the OrderTrashCan feature is disabled, when a user deletes an order item or requisition list item the table rows that represent those items are removed from the database. If enabled, these rows are updated to belong to the trashcan. You can clear the trashcan by running the OrderTrashCanClear scheduled job that deletes the rows, or by using the Database Cleanup utility. This feature is disabled by default.

Before you begin

It is highly recommended that you clean your database of order items, both before you enable the OrderTrashCan feature, and periodically afterwards. Order item deletion is a common operation, and as a result, many deleted order items can build up in the ORDERITEMS table. If this data is not cleaned periodically, database performance can degrade. For more information, see Deleting order objects.

About this task

This task describes how to enable the OrderTrashCan feature.

Procedure

  1. Open the WebSphere Commerce configuration file.
  2. Within the file, the text can be put in any place between "<InstanceProperties>" and "</InstanceProperties>" as a child of InstanceProperties.
    For example:
     <InstanceProperties>
    ....
    ....
    ....
     <ExpectedInventorySynchronize
          ExpCountFlag="Y"
          ExpRecCount="200" display="false"/>
        <OrderTrashCan 
    	TrashCanOwner="-1006"
    	TrashCanRequisitionListSegmentLen="30"
    	TrashCanOrderItemSegmentLen="50"
    	TrashCanEnabled="true"/> 
      </InstanceProperties>
    

    This setting deletes order item entries from the ORDERITEMS table. If TrashCanEnabled is set to "true", when a user deletes an order item or requisition list item, the table rows that represent those items are not deleted from the database. Instead, the items are updated to belong to the trashcan.

    Where:

    TrashOwner
    The owner when you are deleting order items or requisition lists. The default value is -1006.
    TrashCanRequisitionListSegmentLen
    A commit count parameter that specifies the segment length of requisition list to delete. The default value is 30.
    TrashCanOrderItemSegmentLen
    A commit count parameter that specifies the segment length of order items to delete. The default value is 50.
    TrashCanEnabled
    Determines whether the trashcan feature is used to delete order items.
    false
    The order item is deleted from the database. This value is the default value.
    true
    The order item is sent to the trashcan.

    Change the values and save the file.

  3. Propagate your changes to the WebSphere Commerce configuration file.
  4. Restart your WebSphere Commerce Server.