Can i use RE Framework while itreating files

Hello Community

I have a folder in which there are a lot of csv files. I want to iterate through each file.
And in each file i want to iterate through every row and perform some functions on the website. ( the rows contain the skus and i want to enter those skus one by one on the website and place orders). Is it possible to use RE Framework in this?
How can my transaction item be each csv file? Please help! Any help would be greatly appreciated!

@Aditya_Kumar3

You need to some changes in the default ReFramework template to work for your scenario.

  1. Add one extra state in between Initialization and Get TransactionData state to read one by one file and assign the data to TransactionData variable. Here, TransactionData should be of type DataTable and TransactionItem should be of type DataRow.

  2. You need to add one more Transition condition between Get TransactionData and newly added state to check whether any input folder contains any input files or not. If it is there then it will go to Get TransactionData state and will pick one by one item from TransactionData and send to process state else it will go to End Process state.

Or

If you don’t want to do all these changes then you should make one file as TransactionItem and you need to follow below steps.

  1. Change TransactionData variable type from DataTable to Array of String and TransactionItem to String.

  2. Read all the rows from CSV file in Process state and process here itself. Here you need to follow proper exception handling else it will skip the entire file if one row item got failed to process.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.