cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding of queue and loading data

GeorgiosStakias
Level 2
Hi All,

I just completed the foundation training and the topic I struggled most was the queues and the data loading. Most likely it's me, but I'm finding it difficult to get my head around what exactly is a queue and how does loading it works, as well as its connection to a data set.

The foundation training provides an exercise that is a good challenge to digest that and  as you can imagine, I'm struggling to get through it - most likely I'm doing something wrong.

I would very much appreciate if you could provide some more insight on the queues and I paste below the example provided in the training.

So, initially, the exercise has the simple ask to read the data from an Excel document, which I have done and works perfectly

32088.png

and here is what the diagram looks like

32089.png
The part that I'm struggling with is the exercise 11.1.3-4 where it is asking to load data into a new queue (which I have created). More specifically, I'm not sure if I execute the "pending" and "next" item steps. 
32090.png
Here is what my diagram looks like

32091.png
The part I'm not sure about is the Decision, where the expression I have entered is this: 
[Pending Items]<>0
I have also tried [Pending Items]<>"" but it didn't work either.

I'm sure that if I get my head around how queues work, I will understand and overcome this, but so far I haven't managed to.

Any help would be very much appreciated.


------------------------------
Georgios Stakias
------------------------------
2 REPLIES 2

PabloSarabia
Level 11
Hi @Georgios Stakias

In this case, the most common expression is using the "Item ID" that you get as an Output from the "Get Next Item" action.

If this value is distinct to "" (something like this: [Item ID] <> "") you have an item loaded in your process.

Just one final thing. In the exercise told you about mark as completed the Item that you get form the collection. So, you must to put a "Mark as Complete" action if the decision is true.


Hope this helps you!!


See you in the community, bye :)​

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

John__Carter
Staff
Staff
Hi Georgios  - the easiest way to think of a queue is as a 'list of cases'. And a case is just a group of data fields. To add cases, you need to have a collection with fields and rows. Each row will represent one case. So if you use a collection with 1 row, you add 1 case. If the collection has 20 rows then you will add 20 cases.

Once cases are in the queue, the collection you used to add them has served its purpose and can be ignored. The main point of having a queue is so that digital workers can share the workload without colliding with each other. Each DW simply asks the queue 'get me the next item' and the queue will make sure the item is locked for that DW. The secondary purpose of the queue is to provide a record of how and when work was completed, which DW worked which case and whether there was any problem.

One of the problems when learning about the queue is that you are working on only 1 DW, which makes it hard to imagine having 10 or 100 DWs all sharing the same queue.

As Pablo says, an important output from Get Next Item is the ID. If this value is blank, it means the queue had no item available - ie the queue is empty or all items have been worked. If the ID is not blank, then that means the queue has locked an item for you and you are safe to proceed and work that case. At the end of the case you update the queue with the Mark Completed action, which updates the queue item and removes the lock.

I hope that makes sense, and don't worry if queues seems hard - most students struggle with the concept at first.


------------------------------
John Carter
Professional Services
Blue Prism
------------------------------