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 new deposit and tender control records, and then updates the payment event upload staging records with the corresponding Tender Control ID.
The Tender Account ID field is populated. If left blank, 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.
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.
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.
Refer to ToDo Entries Instead of Exceptions for more information on how ToDo entries are used to capture processing errors.
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.
If no tender account has been assigned, the process executes the Determine Tender Account algorithm defined on the distribution rule and populates the record with the returned account ID. 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 ToDo cleanup processing takes place to complete ToDo entries previously raised for the staging record.
Refer to ToDo Entries Instead of Exceptions for more information on how ToDo entries are used to capture processing errors.
This step is designed to support execution in parallel threads based upon the sequence number portion of the staging table prime key.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.