Phase 1 - Create Tender Control

Note: This step cannot be bounded by thread range but must execute across the entire population of staging details. Therefore this step in the process is designed so that all parallel threads attempt to execute it at the same time but only one thread succeeds to avoid creating duplicate tender controls.

This step creates all tender controls required by the upload records as follows:

  • For each distinct tender source transmissions represented within the incomplete set of upload staging details a deposit control, a deposit tender and a tender control are created in an open state. Note that a deposit tender record is only created if the tender amount is not zero.
  • If an error occurs at this stage
    • A designated staging record for the transmission group (one is picked at random) is set to Error and a ToDo entry is created and linked to it to capture the error message that applies for the whole transmission group. Other records in the group remain incomplete.
    • The process stops.
Note: Group Error. This technique allows for an easier recovery from a setup error that may affect a large volume of records in a single transmission. Capturing the error only on a single designated record requires only this record to be set back to Incomplete once the setup issue is corrected. It is important to note that the transmission group is not processes if at least one of the records in the group is in Error status.
  • Once a transmission group of records is fully processed, a ToDo cleanup processing takes place to complete ToDo entries previously raised for its designated staging record.
Fastpath: Refer to ToDo Entries Instead of Exceptions for more information on how ToDo entries are used to capture processing errors.