com.filenet.rm.bds

Interface BaseBulkService

    • Method Detail

      • startBatch

        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

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

        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

        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

        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

        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.

© Copyright IBM Corp. 2006, 2013. All Rights Reserved.