cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve Resource Name from the Queue Data

BenAnderson
Level 5
Hi there,    I was wondering if it was possible using the "Work Queues" VBO within BP to get the resource name of an item in the queue which has been worked. So ideally, if I have an Item ID which has been worked I would like to retrieve the resource name the item has been worked on, using a process.    Within the Control Room, I can see the Item Key, Resource Name, Status, Priority, Attempt fields etc etc. However, whenever I use the "Get Item Data" from the Work Queues utility it does not return the resource name that the item was worked on - although it clearly shows the resource name in the Control Room.    Using normal actions in a process, is it possible to retrieve the resource name for the item?   Many thanks in advance for any help,   Ben
Benjamin Anderson, Senior Consultant, UK
6 REPLIES 6

david.l.morris
Level 15
Hi Ben, I don't know that there's any native functionality for retrieving the resource that worked a queue item from within Blue Prism. Option 1: We wanted the same thing a while back, and what we ended up doing was querying the BP database directly. But, we didn't need it from inside a BP Process. We were just sending the data to Splunk. But you might be able to do that. I don't know what kind of performance concerns there may be with querying the database directly in this fashion though. We were only doing it once every 20 minutes or so. Option 2: Another way to get this data is through CLI commands. For example, the following command will export an entire queue. It goes into a text file. If you have a way to run CLI commands and read the output, then I guess this could be a possibility. automatec /sso /dbconname ""Connection1"" /exportqueue ""D:\Test\queue_exported.txt"" /queuename ""Queue1"" You can add in the option to filter the queue, but I haven't used that option. I assume it works. The option is like this: /queuefilter ""Filter1"" Option 3: The easiest way to accomplish this, though it requires a sort of contract across all automations, is by tagging every queue item with the Resource that worked it. Perhaps just a tag like this: ""Resource: "" & GetResourceName() Of course you'd have to go back and change all automations to take advantage of Option 3.   If anyone has a better way to do this, I'd like to know. Maybe I overlooked something really simple. =) Dave

Dave Morris, 3Ci at Southern Company

david.l.morris
Level 15
I'm back. So, I was thinking about it. If you had a list of Resources Names already, then you technically can accomplish the goal from within Blue Prism. Let's say you have 20 Resources in an environment. You just need to provide that list to the process somehow. CSV in an environment variable, in a config file, as a startup parameter, or somehow get that list into the process. Then use the Work Queues action 'Get Report Data'. It has a lot of inputs, one of which is Resource Names. You could loop through your Resources Collection and provide one Resource Name at a time to the Get Report Data action. You also have the option of adding tags as a filter here and limited to a certain time frame. I'm not sure what your use case is, but if I remember right from other posts I've seen from you, then you probably know what to do with the list of Item IDs that you get as output. Let me know if this works out for you. Dave

Dave Morris, 3Ci at Southern Company

BenAnderson
Level 5
Hi Dave,   That's really useful. Thank you very much! I don't why I didn't think of your second post - using ""Get Report Data"" and the Resource name within that action. We only have three resources, so this is potentially a very viable option.    I'll have a go at it this week and see how it works out,  Many thanks again for your help,   Ben
Benjamin Anderson, Senior Consultant, UK

david.l.morris
Level 15
Ben, Probably the same reason I didn't think of it either until after the first post, haha! It's kind of backwards thinking. I'll keep an eye for whether it works out for you. Dave

Dave Morris, 3Ci at Southern Company

BenAnderson
Level 5
Hi Dave,    I had a mess around with it and it worked well. I used a collection, hard coded with the three resource names, and every time it looped through each name, it was able to retrieve the data from each queue item and append the resource name on to it, as it looped through the collection.   Many thanks again for your help,  B
Benjamin Anderson, Senior Consultant, UK

david.l.morris
Level 15
Awesome! No problem!

Dave Morris, 3Ci at Southern Company