If the use case is to parse a csv file which is uploaded by an enduser then it is better to make use of Service File as it has options to parse each record from csv and process on them.
So the following steps can be used to invoke a service file from an activity:
Its interesting article if you want to write the same article in 2026 with lot of AI development and pega platform upgrade features. what kind of solution you give for the same problem in 2026. I have revisited lot of my posts after 2026 to give better solutions using AI just curious to ask for same exercise from your end. Even i worked for JPMC for 5 years from Mphasis company.