Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 emits beginBatch, routes the batch into the workflow and then emits endBatch.

  • 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 in DRBatchServerEnv. 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.

Image Added

Sequence diagram for DRBatchCollector

For a batch Collection agent example, see

com.digitalroute.devkit.examples.diskcollection.*