Versions Compared

Key

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

Image Modified

The Database collection agent performs some extra maneuvers to ensure that data is not recollected or lost if the workflow aborts before the collection of a batch has finished correctly.

  1. A unique Transaction ID is retrieved for each new batch.
     

  2. The pending transaction table is queried for all pending Transaction IDs, to be compared with the transaction IDs in the working table, from which the agent will collect.
     

  3. The SQL query is built and executed, and all matching rows are collected. In addition to the user defined condition, the agent adds some conditions to the query, to ensure that pending data, cancelled data and data marked as collected is not collected.
     

  4. For each row that has been successfully converted to a UDR, the agent updates its Transaction ID column to the Transaction ID retrieved in bullet 1.
     

  5. When all rows matching the query have been successfully collected, the After Collection configuration in the Source tab, is used.

    1. If Remove, all rows with the given Transaction ID are removed in batches of the size configured as the Commit Window Size, in the Advanced tab.

    2. If Mark as Collected, all rows with the given Transaction ID are updated with the reserved Transaction ID value -1.

    3. If Run SP, the user defined stored procedure is executed. For further information, see After Collection Stored Procedure in Tables and Stored Procedures(3.0).

Emits

The agent emits commands that changes the state of the file currently processed.

...

Note
titleNote!

If the SQL select statement does not return any data, Begin and End Batch will not be emitted. Not even if Produce Empty Files is selected in a Forwarding Disk agent.

Retrieves

The agent retrieves commands from other agents and based on them generates a state change of the file currently processed.

...