Process C1-PEPL1 - Upload Payments (Step 1)

The batch process C1-PEPL1 refers to the first of three background processes that load the contents of the payment event upload staging records into the various payment tables.

The responsibility of this process is to transition the status of the staging records from Incomplete to Pending. The status of a staging record must remain Incomplete until:

  • It is linked to a tender control. This process creates a new deposit control record. It creates a new tender control record if the staging record is not currently linked to one. It then updates the payment event upload staging records with the corresponding Tender Control ID.
  • The Tender Account ID field is populated. The Determine Tender Account algorithm defined on the distribution rule is called and the returned account ID is posted on the staging record.
  • The Pay Event Process ID field is populated. If left blank this field is set equal to the Tender Account ID.

The following diagram and the sections below describe at a high level the processing phases of the C1-PEPL1 background process.

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 and a tender control are created in an open state. (If the upload record is already linked to a tender control, then that tender control is used and a new one is not created.)
  • 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 To Do 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 To Do cleanup processing takes place to complete To Do entries previously raised for its designated staging record.
Fastpath:

Refer to To Do Entries Instead of Exceptions for more information on how To Do entries are used to capture processing errors.

Top of Page

Phase 2 - Determine Tender Account

After all tender controls have been created the second step attempts to transition all incomplete records to the pending state.

Each incomplete staging record is processed as follows:

  • If not yet associated with a tender control ID, the process looks for an Open tender control that matches the batch code, batch number and external source ID and links it to the staging record. An error is raised if a matching tender control is not found.
  • Execute the Determine Tender Account algorithm defined on the distribution rule and populate the record with the returned account ID. Note that the algorithm is called even when the tender account is populated to provide for a potential override of the initial value when necessary. An error is raised if a tender account may not be determined.
  • If not already populated, the Pay Event Process ID is set equal to the Tender Account ID. The C1-PEPL2 process uses this field to organize the parallel threads and to group multiple staging details into a single payment event.
  • The staging record is moved to pending state.
  • If any errors occur set the record to Error and create a To Do entry for the error message.
  • If no error occurred, a To Do cleanup processing takes place to complete To Do entries previously raised for the staging record.
Fastpath:

Refer to To Do Entries Instead of Exceptions for more information on how To Do entries are used to capture processing errors.

Note:

This step is designed to support execution in parallel threads based upon the sequence number portion of the staging table prime key.