public interface BaseBulkService
Modifier and Type | Method and Description |
---|---|
void |
cancelBatch()
Cancels any current batch for this
BulkDeclarationService instance
so that a subsequent startBatch(String) call can be made. |
BatchResultItem[] |
executeBatch()
Executes all operations that have been placed in the current batch since the previous
startBatch(String) call. |
BatchResultItem[] |
getBatchResultItems()
Returns the array of BatchResultItems from the current active batch.
|
Configuration |
getConfigurationInfo()
Returns the current
Configuration collection belonging to
this BulkDeclarationService instance. |
java.util.Map |
getContextInfo()
Returns the current connection context
Map in use by this
BulkDeclarationService instance. |
boolean |
isInBatch()
Indicates whether or not a batch is currently active for this
BulkDeclarationService
instance. |
BatchResultItem[] |
reexecuteBatch(boolean removeFailedOperations)
Re-executes the current batch.
|
void |
startBatch(java.lang.String batchName)
Called to designate the start of a new batching operation.
|
java.util.Map getContextInfo()
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
:
BDSConstants.CONTEXT_TRANSPORT_TYPE
item
contains either of values BDSConstants.TRANSPORT_TYPE_BDP
or BDSConstants.TRANSPORT_TYPE_BDP40_WSI
.
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 [ ]):
BDSConstants.CONTEXT_PROTOCOL
- wire protocol ["http"]
BDSConstants.CONTEXT_SERVER
- name of CE server ["localhost"]
BDSConstants.CONTEXT_PORT
- IP port number ["9080"]
BDSConstants.CONTEXT_SERVICE
- WSI Service name ["FNCEWS40Service"]
BDSConstants.CONTEXT_ENDPOINT
- WSI Endpoint name ["FNCEWS40MTOM"]
BDSConstants.CONTEXT_BINDING
- WSI Binding name ["FNCEWS40MtomPort"]
BDSConstants.CONTEXT_USERNAME
- clear text username
BDSConstants.CONTEXT_PASSWORD
- clear test password
When the CE Jace transport is used the following context Map
items are required (example values are given in [ ]):
BDSConstants.CONTEXT_URI
- CE Jace URI ["iiop://CEserver:9080/FileNet/Engine"]
BDSConstants.CONTEXT_USERNAME
- clear text username
BDSConstants.CONTEXT_PASSWORD
- clear text password
Map
containing the context elements.Configuration getConfigurationInfo()
Configuration
collection belonging to
this BulkDeclarationService
instance.Configuration
collection instance.Configuration
,
ConfigItemType
void startBatch(java.lang.String batchName)
executeBatch
or resetBatch
call is made.batchName
- optional name for this batch. Can be null
.a
- BDSException
if a batch is already active for this
BulkDeclarationService
instance.boolean isInBatch()
BulkDeclarationService
instance.true
if a batch is currently active.void cancelBatch()
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.
BatchResultItem[] executeBatch()
startBatch(String)
call. All such operations
are sent to the CE as a single bulk payload and performed as a single transaction.BatchResultItem
instances, each of which is associated
with each of the operations contained by the batch.a
- BDSException
for any execution error.BatchResultItem[] reexecuteBatch(boolean removeFailedOperations)
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.
removeFailedOperations
- true
to force removal of previously
failed operations before re-executing the remaining
operations of the batch.BatchResultItem
instances, each of which is associated
with each of the operations contained by the batch.a
- BDSException
for any execution error.BatchResultItem[] getBatchResultItems()
BatchResultItem
instances, each of which is associated
with each of the operations contained by the batch.© Copyright IBM Corp. 2006, 2013. All Rights Reserved.