Configure 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. We can clear the trashcan by running the OrderTrashCanClear scheduled job that deletes the rows, or using the Database Cleanup utility. This feature is disabled by default.


Before beginning

It is highly recommended that you clean the database of order items, both before you enable the OrderTrashCan feature, and periodically afterward. 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.


Task info

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 we are deleting order items or requisition lists. Default 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.


What to do next

Package our changes to the WebSphere Commerce configuration file for deployment.


Related tasks
Administering order management