IBM FileNet P8, Version 5.2.1            

Resetting failed queue sweep entries

Thumbnail queue sweeps and custom queue sweeps stop processing failed queue entries after the number of failures exceeds a threshold. To restart the processing of failed queue entries, a property must be reset on each queue entry.

About this task

For most system implementations of queue sweeps, the maximum number of failures property is set to zero by default, meaning that the queue sweep attempts to reprocess failed queue entries an unlimited number of times. One exception is the thumbnail generation queue sweep, where the default maximum number of failures is three. Another exception applies to any user-implemented custom queue sweep where the default maximum number of failures is greater than zero. Each time a queue entry fails to process, the sweep service increments the failure count property on the queue entry. If the failure count value equals or exceeds the maximum number of failures set for the queue sweep, the queue entry property for the queue entry is set to a fail status and the queue sweep no longer processes the failed queue entry.

To restart the processing of failed queue entries, you must reset the failure count property on each queue entry. Although you can use Administration Console for Content Platform Engine to reset failed queue entries, creating a custom sweep job for this task is a faster and more convenient alternative for resetting large numbers of failed queue entries.

Procedure

To use a custom sweep job to reset the failed queue sweep entries:

  1. Implement a sweep action handler that resets the failure count property on the failed queue entries to zero. The following example is a simple JavaScript implementation. You might consider adding trace logging and error handling to your implementation.
    importClass(java.lang.System);
    importPackage(Packages.com.filenet.api.core);
    importPackage(Packages.com.filenet.api.constants);
    importPackage(Packages.com.filenet.api.engine);
    
    function onSweep (sweepObject, sweepItems)
    {
    for (ii = 0; ii < sweepItems.length; ii++)
    {
    item = sweepItems[ii].getTarget();
    item.set_FailureCount ( 0 );
    item.save ( RefreshMode.NO_REFRESH );
    sweepItems[ii].setOutcome(SweepItemOutcome.PROCESSED, "");
    }
    }
    
    function onPolicySweep ( sweepObject, sweepPolicy, sweepItems) 
    {
    }
    
    function getRequiredProperties() 
    {
    return '';
    }
  2. Create a custom sweep job.
  3. Set the Filter expression property to the queue entries that are in a failed state. For example: customJob.set_FilterExpression("QueueEntryStatus=3");
  4. Set the Sweep target property to the queue sweep subclass with the failed queue entries. For example: customJob.set_SweepTarget(Factory.ClassDefinition.getInstance(os, GuidConstants.Class_CmThumbnailRequest));


Last updated: March 2016
p8pcc347.htm

© Copyright IBM Corporation 2016.