9.18.3.2.3 Closing Batches from APL and Error Handling

Closing Batches from APL

In addition to using the batch closing criteria in the agent's batch closing criteria, you can trigger closing of the current batch by routing a CloseBatchUDR to the agent. This UDR type contains the following field:

FieldDescription
BatchId (string)

When the input type is MultiForwardingUDR, this field must contain the fntSpecification UDR. When the input type is bytearray, this field is ignored by the Disk forwarding agent.

Error Handling

When a worker process fails to synchronize or move data, an ErrorUDR is routed to the workflow. This UDR type contains the following fields:

FieldDescription
BatchId (string)When the input type is bytearray, this field contains the fixed string "SINGLE_BATCH". When the input type is MultiForwardingUDR, this field contains an fntSpecification string.
Code (int)This field contains a code that identifies the type of error that occurred.
200 - Incoming data was throttled due to exceeded worker queue size or concurrent batches limit.
300 - Failed to create a stream for synchronized data.
301 - Failed to write data to a temporary file.
302 - Cannot guarantee that data was stored. 
400 - Missing fntSpecification in MultiForwardingUDR.
Data (list<bytearray>)This field contains the input data (payload) to the agent. The maximum size of the list depends on the settings in the Advanced tab.

When data is redirected back into the workflow in an ErrorUDR due to an unexpected error, it is not guaranteed that the data has been written. In the case of throttled data, it is guaranteed that the data has not been written. Note that the redirected data is included by any counters for closing criteria. Therefore, when data has been throttled, for example, the final batch file contains less data than configured using the automatic closing criteria.