Descriptions: Pega is getting two types of files in the Pega cloud folder location with the same name one is pdf and another one is csv, using the csv files details Pega is creating the case and attaching the pdf of the same name (with only difference in file extension).
Using file listener to reads the csv and create the case, and below is the java code i am using to attach the pdf to the case.
Modifying the csv file as processed by file listener by getting it from Log-Service-File with pdf file extension like TestPdfSample.csv withTestPdfSample.pdf
Observations: 1. The functionalities are working fine and everything is working as expected in Dev environment(case creation and attachment of pdf).
2. The same functionalities are working fine for most of the files in Prod environment, but the pdf attachment is not happening for only very few cases.
I could not figure out the reason of its occurance as it is not that frequent in nature and the same code is working fine for most of the files(includes pdf and csv).
Note: The pdf files are correct only which Pega is getting and tested with the same files(which are causing issues in Production) in Dev env manually, and observed the functionalities are working as expected.
Could anyone help me here with the possible reason of this issue.