How to Set All Queue Items To In Progress

Hello and thank you in advance.

I am trying to figure out how to bulk set/ or set all retrieved Queue Items to In Progress
I have the following in my workflow with v_out being the output of my Get Items Activity. I want to set all the retrieved items status to “In Progress”. I cannot use Get Transaction items because i need to retrieve multiple items at the same time based on the reference. Please assist. Thanks

@hatakora

You can use a while loop
Code flow as below:

__Get Transaction Item → set value to qItem variable
__While Not IsNothing(qItem)
____Get Transaction Item → set value to qItem variable

1 Like

@Doanh this makes sense but it will not work for what i am tryng to achieve. The QUeue rows of a datatable in it . For each row there is one Item. The problem is that the datatable looks like this as an example but with more columns.
Screen Shot 2020-03-17 at 11.07.51 PM

The reason why Get Transaction Item will not work is that i need to be able to get multiple items at the same times and iterate through them. For for ORD1 in the Queue there will be 4 items with the same reference. I need to be able to get all four at the same time and set them to in progress instead of one by one.

@hatakora
You can use Set Transaction Progress for your purpose

  1. Get Transaction Item
  2. Check if qItem.Progress = “abc” (any value you want)
    2.1 if qItem.Progress = “abc” → Do Nothing with it
    2.2 if qItem.Progress <> “abc”
    2.2.1. Get Queue Items with filter to get related transaction items (status = New, In Progress)
    2.2.2. Loop all items & Set Transaction Progress = “abc”
    2.2.3. Do your data process logic
    2.2.4. Finish : Set Transaction Status for current qItem & for all related items
1 Like

@Doanh the logic makes sense but here is my problem based o what you listed. Currently my Get Items activity gets all the Queue Items based on however many columns there are for one order.
Meaning if there are five ORD-1 columns, it will get all the items with reference ORD-1 as that is how it set to be uploaded in the Queue.
You first option Get Transaction Item can only retrieve one item at them time. The goal here is to set the status of the item to in progress and use the content of each item to place an order. Doing it one by one will not work because the number of column for each order is not fixed,

@hatakora
" 1. Get Transaction Item" is not my first option - it’s first step.
My logic will have risk if you have 2 robot (robot A & robot B) , and robot B get item of same order before robot A update Progress of all item of that order.
Incase you have only 1 robot, i think it will work fine

@Doanh i will have only one robot running. Maybe i didn’t understand well then. So let me go through it again

  1. Get Transaction Item. ====> This can only get one item from the queue
  2. Check if qItem.Progress = “abc” (any value you want) ====> This is fine because that one item will not have any progress
    2.1 if qItem.Progress = “abc” → Do Nothing with it ====> this is fine too
    2.2 if qItem.Progress <> “abc” ====> This is fine
    Until here i will only have one item from the Queue so far
    2.2.1. Get Queue Items with filter to get related transaction items (status = New, In Progress)====> Now here i will be able to get all the items but they will all have status = New
    2.2.2. Loop all items & Set Transaction Progress = “abc” ====> This will not work because you can only use Set Transaction Progress on item that are in status= In Progress and all my items would have status= New
    2.2.3. Do your data process logic
    2.2.4. Finish : Set Transaction Status for current qItem & for all related items

Or maybe i am wrong? I appreciate you taking the time to explain and help btw

What do you think @Doanh

I know I am bumping a 10months old topic up but from what i read i concluded no specific answer was given for the question and thought maybe i could toss my coin in.
if that was my dataSource to work with, these would be the steps i would take;

  1. read excel into a DataTable and group your order numbers into seperate datatables
  2. make a JSON out of that datatable and assign whatever residual info you have left to their variables
  3. add your queueItem with what you have from steps 1 and 2

when you get transaction item, each time 1 transaction item, only 1 transaction item
you will have your grouped order numbers in a json
deserialize your json into a datatable and carry on with your initial logic

after you’re done, assign your output, if you desire you can json your datatable again and include in your output too
set your tansaction status
done.

I should have mentioned to loop steps 1→3 for each grouped order-number of your initial excel dt

I had the same issue, because I used “Get Queue Items” in order to filter out items that I want to process.

Solution is to assign every queue item uniqe reference.
After that you can you “Get Transaction item” with reference filter to set queue item to inProgress (I didn’t even have to retrieve output from “Get Transaction item”, as I already had QueueItem variable from previous activity)

I hope this help someone.