I want to use a list of strings in place of queueitem in get transaction data using REFRamework template.
Which steps i should follow?
Hi @oumayma_lajili1 welcome to forum
Change the transaction item variable to string type
May I know ur use case what u are automating
the list of string is the list of paths the result of GetFiles of directory , after i will use each path in another process.
Can you help to create the process!
I can also store these paths in datatable so in the TransactionData argument and my transationitem (the path) will be datarow , i can accept this solution also
For that
In get transactiondata state
Disable get transactionitem activitiy since u are not using the queue
After that create a sequence
In this sequence u have to retrieve the list of path from folder
For that u have to use if condition
Condition should be in_TransactionNumber = 1
In then section
Use assign activity to retrieve the value of all path to transactiondata variable which should be list of strings
io_TransactionData = Directory.GetFiles( folder path)
Create next sequence to assign transactionitem
Inside this sequence
Put a if condition,
Condition should be in_TransactionNumber<= io_TransactionData.Count
In then section use assign activitiy to assign the transaction item
out_TransactionItem = io_TransactionData(in_TransactionNumber-1)
In else section use assign activitiy to assign transactionitem as nothing
out_TransactionItem = Nothing , which helps to end process after all transactionitem has been processed
Note : change variable type of transactionitem as string and Transactiondata as array of strings
Hope it helps
Mark it as solution if u got it
Nived N
Thanks a lot
But i have a question i can use the result of the transaction item only in process.xaml or i can use it in an other process ?
Defaulty we are setting transactionitem to go to process xaml file, u can set the process or sequence in process.xaml file of what u want to do with transactionitem
Actually in get Transactiondata state you are retriving each Transaction item
Using that transaction item Everytime, we are processing in the process state
Processing.means what we are going to with that file path
For eg u have set of PDF files in folder , u want to retrieve data from each PDF file and write in a excel file
In this case the transaction item is each PDF file path
In process section using each file path or transactionitem, we are retrieving values from. Each PDF and writing in excel file
Hope u got the idea
Nived N
It’s very clear.
Really, thanks a lot.
I have a problem , only the first transaction is succefull and then the process finished and i found this log "Process finished due to no more transaction data
It may be due to no Transaction data
What condition u put to assign transactionitem
in_TransactionNumber <= io_TransactionData.Count
Hi u have made a mistake
Why u assign transaction number =1 as condition
If u did like that , ur Transaction will end after first transaction
I will attach one of my work on reframework
Here look at get Transactiondata state, this is case of datatable, but u can generalise it for ur files system, how I created sequence for getting all Transactiondata and after that assigning transactionitem
Hope u will find it as useful
Nived N
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.