Handle multiple queues in ReFramework

Hello,

I am using Re-Framework and I am beginner with UIPath.

What I have :

File:

  • c:/data/A/a.xlsx
  • c:/data/B/b.xlsx
  • c:/data/C/c.xlsx

Queue name :

  • A-queue
  • B-queue
  • C-queue

What I want :

For each file, select the file and process.

It’s work great for A.xlsx. But it’s doesn’t go for b, and c :frowning:

Q1 : How to process all the files and not only A.xlsx ?

What I do :
I have built my array tab_queue_name where all queue name is here.

Can you help me to handle multiple queues in ReFramework please ?

Advance thanks,

1 Like

Hey @MasterSinge

You need to use conditional IF with file name check to choose the queue name !

Thanks
#nK

1 Like

Hi

If you want to add those excel to queue then first read all those excel file and have it as a datatable like
dt1, dt2, dt3 for each excel

Now use BULK ADD QUEUE ITEM activity where pass those datatable one by one so that datatable gets added as a queue items
Which means use three bulk add queue item activity

And to get those data back from queue have the queue name in a array variable like this

Inside Get Transaction state

arr_queuename = {“A-queue”, “B-queue”, “C-queue”}

Where arr_queuename is a variable of type array of string defined in variable panel

Now use a FOR EACH activity and pass that array variable as input and change the type argument as string in property panel

Inside the loop use a GET QUEUE ITEM activity to get bulk queue items

If you want GET TRANSACTION ITEM activity if you want to get one queue item

As we are keeping in a REFramework use IF condition where use transaction number as a condition

Cheers @MasterSinge

1 Like

Hii @MasterSinge

you can implement like this first upload 3 files data into 3 queues , now you have 3 queue names and data inside it

then

use int variable as Queue Counter (default value as 0)

you use get queue items activity(here use fiters as state is new and output as StrQueueItems) and pass first queue name

in if statement pass StrQueueItems.count>0

if count is greater than 0 then get item from the queuename

if count is less than 0 the increment queue counter with 1

and put one more if condition below that if condition
queue counter shouldnt be more than number of queue names if yes then assign transaction as nothing

1 Like

Thank you for your reply @Palaniyappan @amalmarella !!
Here my algorithm :

Can you check if it’s correct please ?

in_tab_queue_name = {“A-queue”, “B-queue”, “C-queue”}

For Each “item” in “in_tab_queue_name”
Get Queue Items

  •   with Queue name : item and Queue items : StrQueueItems*
    

End For each

IF StrQueueItems.count>0
(GetTransactionItem)
With Queue Item Name : in_tab_queue_name(queueCounter) and Transaction Item : out_TransactionItem
Else
Assign queueCounter = queueCounter + 1
End if

IF queueCounter > in_tab_queue_name.count
Assign out_TransactionItem = Nothing
End IF

hey@mastersinge,

if you use for each you will get items related to the last queue in the queue name array,

remov for each and use integer variable called queue counter increment with 1 if there are no items in the queue

in second if it should be greater than & equal to

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