DRBatchCollector
The collector is the controller of the workflow. It controls the main execution thread, and when the thread returns from the collector, the workflow will stop. DRBatchCollector
defines the execute
method, where the workflow thread lives, as well as transaction control methods. These are used to propagate beginBatch and endBatch calls.
execute
When called, the collector is given the workflow thread. The collector must keep this thread until the workflow should terminate, for instance, when the stop method has been called. The
execute
method typically emitsbeginBatch
, routes the batch into the workflow and then emitsendBatch
.beginBatch
Propagates a new transaction to the transaction controller and all the workflow agents.
endBatch
Propagates a transaction end to the transaction controller and all the workflow agents.
endBatchHinted
Called when another agent has called
hintEndBatch
inDRBatchServerEnv
. The collector may choose to ignore this method, that is, not to implement it in case it cannot be supported.splitBatch
When invoked, it will propagate to the other agents that the input batch will be split (
DRBatchProcessor.splittingInfile
).
The following sequence diagram shows in which order methods are called for the Batch Collector.
Sequence diagram for DRBatchCollector
For a batch Collection agent example, see
com.digitalroute.devkit.examples.diskcollection.*