ECS Forwarding Workflow (Batch)

ECS Forwarding Workflow (Batch)

The simple workflow illustrated below begins by validating the input file with the Duplicate Batch agent, followed by decoding and validation checks performed in the Analysis agent. Valid Batches are routed to the Disk agent and output as new files. Calling cancelBatch() APL function through the Analysis agent triggers cancelBatch, and invalid Batches can be associated with an error code and a message (the value for Error Case column in ECS Inspector) using the udrAddError() APL function. Additionally, an Error UDR Type and relevant MIM values, as defined in the Workflow Properties Error tab configuration, can be associated with these Batches before they are sent to ECS.

For information about the cancelBatch state, see Workflow Execution State.

image-20250424-062658.png

Workflow Properties

In the Workflow Properties Error tab, you can configure the Error Code, Error UDR Type, and MIM to associate with the error batch sent to ECS. Also, the number of allowed cancelled batches is set here. Note that if Abort after one cancel batch is enabled, no batch is sent to the ECS if the workflow aborts.

For batch workflow agents that emit cancelBatch, such as when a duplicate file is detected by the Duplicate Batch agent, the Error Code set in the Workflow Properties Error tab will be associated with the error batch.

Note!

The use of udrAddError() APL function to specify the ErrorCode will override the Error Code configured in the Workflow Properties Error tab.

The use of cancelBatch() APL function to specify the errorUDR will override the error UDR configured in the Workflow Properties Error tab.

ECS Inspection

Same as forwarding error UDR to ECS, when an error batch is sent to ECS, the Reprocessing Group will be assigned automatically based on the Error Code that is associated to it.

If the associated Error Code is linked to a UDR-type Reprocessing Group, it will not be associated with a Reprocessing Group due to incompatible data types. Consequently, the RP Group column in the ECS Inspector will be empty for this record.

Thus, it is recommended that the Error Code for error batches should always tie to the Batch-type Reprocessing Group.

Note!

UDRs with several Error Codes mapped to different reprocessing groups cannot be automatically assigned to a reprocessing group. They must be assigned manually.

Analysis Agent

You can always use udrAddError() APL function to associate Error Code and Error Case with the error batch before calling the cancelBatch() APL function.

Example - Mapping the Error UDR in APL code

E.myErrorUDR eUDR = udrCreate( E.myErrorUDR ); eUDR.FileSize = (long)mimGet( "IN", "Source File Size"); eUDR.TS = (date)mimGet( "IN", "File Modified Timestamp"); eUDR.message = "PROCESSED ONCE."; udrAddError( eUDR, "switch_ERROR", "Switch not found."); cancelBatch( "Incorrect source.", eUDR );

Note!

To associate a UDR with the error batch is optional in the cancelBatch() APL function or the Workflow Properties Error tab. However, it is necessary if access to application-specific information is needed when reprocessing the batch. Error UDR fields will appear as MIM values in the reprocessing workflow.

Also, the only possibility to associate an Error Code with the error batch is by associating it with a UDR.