com.filenet.rm.bds

Interface BaseBulkService

All known subinterfaces:
BulkDeclarationService, BulkDisposeService

  1. public interface BaseBulkService
This base interface exposes the major public entry points offered by the Bulk Base Service.

Method Summary

Modifier and Type Method and Description
  1. void
cancelBatch()
Cancels any current batch for this BulkDeclarationService instance so that a subsequent startBatch(String) call can be made.
  1. BatchResultItem[]
executeBatch()
Executes all operations that have been placed in the current batch since the previous startBatch(String) call.
  1. BatchResultItem[]
getBatchResultItems()
Returns the array of BatchResultItems from the current active batch.
  1. Configuration
getConfigurationInfo()
Returns the current Configurationcollection belonging to this BulkDeclarationService instance.
  1. java.util.Map
getContextInfo()
Returns the current connection context Map in use by this BulkDeclarationService instance.
  1. boolean
isInBatch()
Indicates whether or not a batch is currently active for this BulkDeclarationService instance.
  1. BatchResultItem[]
reexecuteBatch(boolean removeFailedOperations)
Re-executes the current batch.
  1. void
startBatch(java.lang.String batchName)
Called to designate the start of a new batching operation.

Method Detail

getContextInfo

  1. java.util.Map getContextInfo()
Returns the current connection context Map in use by this BulkDeclarationService instance. This context information is used by the lower level transport layer to establish communications with the P8 Content Engine.

Two forms of context sets are supported based upon the underlying transport type as determined by the context Map item key BDSConstants.CONTEXT_TRANSPORT_TYPE:

  1. CE WebServices transport is used when the BDSConstants.CONTEXT_TRANSPORT_TYPE item contains either of values BDSConstants.TRANSPORT_TYPE_BDP or BDSConstants.TRANSPORT_TYPE_BDP40_WSI.
  2. CE JACE transport is used when the BDSConstants.CONTEXT_TRANSPORT_TYPE item contains the value BDSConstants.TRANSPORT_TYPE_BDP40_JACE.

When the CE WebServices transport is used the following context Map items are required (example values are given in []):

When the CE JACE transport is used the following context Map items are required (example values are given in []):

Returns:
a Map containing the context elements.

getConfigurationInfo

  1. Configuration getConfigurationInfo( )
Returns the current Configuration collection belonging to this BulkDeclarationService instance.
Returns:
a Configuration collection instance.
See Also:

startBatch

  1. void startBatch(java.lang.String batchName)
Called to designate the start of a new batching operation. Subsequent batch operations will be accumulated into this batch until either an executeBatch or resetBatch call is made.
Parameters:
batchName - optional name for this batch. Can be null.
Throws:
a - BDSException if a batch is already active for this BulkDeclarationService instance.

isInBatch

  1. boolean isInBatch()
Indicates whether or not a batch is currently active for this BulkDeclarationService instance.
Returns:
true if a batch is currently active.

cancelBatch

  1. void cancelBatch()
Cancels any current batch for this BulkDeclarationService instance so that a subsequent startBatch(String) call can be made.

Any pending operations contained in the batch are discarded.

This method is primarily intended to be used when a given batch operation (e.g., BulkDeclarationService.declareRecord(String, RecordDefinition)) fails due to an immediate validation error, and it desired that all pending batch operations should be discarded.

Can be called even if a pending batch is not active.


executeBatch

  1. BatchResultItem[] executeBatch( )
Executes all operations that have been placed in the current batch since the previous startBatch(String) call. All such operations are sent to the CE as a single bulk payload and performed as a single transaction.
Returns:
array of BatchResultItem instances, each of which is associated with each of the operations contained by the batch.
Throws:
a - BDSException for any execution error.

reexecuteBatch

  1. BatchResultItem[] reexecuteBatch( boolean removeFailedOperations)
Re-executes the current batch.

Primarily intended for use when a previous executeBatch() (or reexecuteBatch) has failed due to a retryable CE exception such as a transaction timeout or database deadlock. Can also be used to retry a failed batch by first removing all individual operations that previously failed due to validation errors.

When the removedFailedOperations parameter is true, the ability of the BulkDeclarationService to determine which operation(s) actually failed during the previous execution attempt is dependent upon where the failure was detected. If the failure was detected within the BDS component during its validation phase, then the corresponding failed operation typically can be determined and will be removed during a subsequent reexecuteBatch call. However, if the failure was detected during the execution phase (i.e., was detected by the CE server), then there is typically no knowledge as to which operation caused the failure and no operation will be removed from the batch during any subsequent reexecuteBatch call.

For example, if a non-existent record class name was provided as part of a RecordDefinition which became part of a declareRecord operation, this error would be detected during the BDS validation process because examination of the a potential record's record class is required as part of the P8 RM business logic. A subsequent reexecuteBatch call would be able to successfully remove this failed operation. On the other hand, if a non-existent document class name was provided as part of a DocumentDefinition that became part of a createDocument or createDocumentAndDeclareRecord operation, this error would not be detected until the entire batch was sent to the CE server for execution. In this case, the BDS would not know which operation was faulty and, thus, would not be able to remove the faulty operation from the batch on a subsequent reexecuteBatch call.

Parameters:
removeFailedOperations - true to force removal of previously failed operations before re-executing the remaining operations of the batch.
Returns:
array of BatchResultItem instances, each of which is associated with each of the operations contained by the batch.
Throws:
a - BDSException for any execution error.

getBatchResultItems

  1. BatchResultItem[] getBatchResultItems( )
Returns the array of BatchResultItems from the current active batch. This method is primarily intended to allow a client to determine which operation(s) caused a validation failure during a previous exection.
Returns:
array of BatchResultItem instances, each of which is associated with each of the operations contained by the batch.