Appendix 11 - List of output and log files

Input files

Once the input files are processed they are moved to a subdirectory named success (ACQ_BATCH_SUCCESS_PATH) or error (ACQ_BATCH_ERROR_PATH) by default, depending on the processing result.

There are 2 scenarios where a file remains inside the input folder

  • the naming convention is not complaint: the files are ignored and the batch service does not process them

  • the sender code check (between the sender code in file name and the sender code in the file records) fails: this may happen if the sender code is not set correctly or if every rows inside the file is discarded during the process. In this scenario the file will remain in the input folder and has to be removed or fixed manually.

AdE Output files

AdE output files are sent to Centro Stella APIs, a copy of the file may be saved locally according to the value of the variable ACQ_BATCH_DELETE_OUTPUT_FILE that defines the policy applied to the output files:

  • with the value ALWAYS the files will be deleted at the end of the batch execution

  • with the value ERROR the files will be deleted only if the batch ended with an error status

  • with the value KEEP the files will be kept inside the ACQ_BATCH_OUTPUT_PATH folder

Log files

The log files generated by the batch service, inside the folder ACQ_BATCH_TRX_LOGS_PATH, are:

NamingDescription

[timestamp]_Ade_FilteredRecords_[input_filename]

records discarded for parsing* errors in ade flow

[timestamp]_Rtd_ErrorRecords_[input_filename]

records discarded for validation* errors in RTD and ADE flows

application.log

application logs

* Please note the difference between the two steps: the parsing occur when the file is loaded and the rows are read, the validation step looks inside the fields and evaluates the content

By default the batch service deletes the empty log files at the end of the batch.

Pending files

When a file upload fails the batch service moves the file into the pending directory. By default the directory is located in output/pending but the position is customizable with the env var ACQ_BATCH_PENDING_PATH.

The files will be send with an automatic retry in the next runs of the batch service and will be deleted once the upload is completed. It is recommended to not remove these files or the folder manually.

File Reports

The report contains the list of the files recently uploaded (last 15 days) with some related information in json format.

The fields in the report are:

FieldFormatDescription

fileName

Alphanumeric

The output AdE file name sent (with pgp extension)

status

Alphanumeric

Status of the file

size

Numeric

Dimension of the pgp file in byte

transmissionDate

ISO Date (e.g. 2022-12-02T15:35:55.586)

Transmission date of the pgp file

dataSummary

Object

Summary about the file content

The possible status values are:

ValueDescription

RECEIVED_BY_PAGOPA

The file has been sent and received by PagoPA

VALIDATED_BY_PAGOPA

The file is formally correct and validated

SENT_TO_AGENZIA_DELLE_ENTRATE

The file has been sent to AdE

The field dataSummary is composed by:

FieldFormatDescription

minAccountingDate

ISO Date (e.g. 2022-12-02)

Value of the oldest operation_date

maxAccountingDate

ISO Date (e.g. 2022-12-02)

Value of the latest operation_date

numberOfMerchants

Numeric

Count distinct of the field merchantId

countNegativeTransactions

Numeric

Sum of all transaction_number of negative transactions (operation type 01)

countPositiveTransactions

Numeric

Sum of all transaction_number of positive transactions (operation type 00)

sumAmountNegativeTransactions

Numeric

Sum of amount of the negative transactions in cents

sumAmountPositiveTransactions

Numeric

Sum of amount of the positive transactions in cents

sha256OriginFile

Alphanumeric

sha256 of the input file with transactions with the format "#sha256sum:xxxxxx"

An example of a report containing one file:

{
    "filesRecentlyUploaded": [
        {
            "name": "ADE.12345.TRNLOG.20240510.150000.001.01.csv.pgp",
            "size": 104000,
            "status": "SENT_TO_AGENZIA_DELLE_ENTRATE",
            "transmissionDate": "2024-05-03T13:31:17.587",
            "dataSummary": {
                "minAccountingDate": "2024-04-30", 
                "maxAccountingDate": "2024-05-03",
                "numberOfMerchants": 8,
                "countNegativeTransactions": 7,
                "countPositiveTransactions": 27,
                "sumAmountNegativeTransactions": 1825110,
                "sumAmountPositiveTransactions": 4642246,
                "sha256OriginFile": "#sha256sum:xxxxxx"
            }
        }
    ]
}

Last updated