A_CheckInPTComplete
This action checks if the Inbound Physical Transmission is complete and if so, raises the necessary events. This action can be called due to events raised by either inbound transactions or inbound batches and acts differently depending on the event. The events that may lead to this action are as follows:
- 'E_InTxnComplete': the transaction contained in the transmission has completed successfully and can therefore raise the 'E_InPTAllChildrenComplete' event.
- 'E_InTxnFailed': the transaction contained in the transmission is complete but has failed and so raises the 'E_InPTFailed' event.
- 'E_InBatComplete': one of the batches that are a part of the transmission has completed, so the inbound PT is updated by incrementing the count of successful batches in the TRANSMISSION_BASE table in the column BAT_SUCCESS_CNTR with the number of batches stored in the event context.
- I'E_InBatFailed': one of the batches that are a part of the transmission has failed, so the inbound PT is updated by incrementing the count of failed batches in the TRANSMISSION_BASE table in the column BAT_FAILED_CNTR with the number of batches stored in the event context.
If the event is batch related, the count of successful batches and the failed batches is compared to the total number of batches in the transmission, to check if all batches have been processed. If all batches have been processed, the number of failed batches determines if the transmission has completed successfully or not. If the number is zero, the event 'E_InPTAllChildrenComplete' is raised to signal the inbound transmission has completed successfully as all batches have finished without error, otherwise the event 'E_InPTFailed' is raised to signal that the transmission has failed due to at least one failed batch.