Calculate queue item runtime?

I’m trying a build a queue reporting process which takes in the queue items’ reference, status, start and end date, and runtime and displays them in a data table. However, all of them except the runtime can be accessed through the item’s properties. I was wondering if there’s a calculation I can make which would subtract the item.LastProcessingOn from the item.StartTransactionTime to get the total runtime of a queue item? I’m fairly new to RPA development and development in general, so please excuse me if there’s already an answer to this (I personally wasn’t able to find one).

Thanks in advance!

@COS

Welcome to forums

For Queue Reporting you can get from orchestrator queues, download the queues, you will get the detailed report for each transaction

Hope this helps you

Thanks

I know Orchestrator offers a report as a .csv file. But the purpose of my report is to email the recipients about the process of the queue’s and jobs. These recipients don’t have access to Orchestrator, and they only need an overview for a certain period of time (ie. all transactions from last week) . But thanks :slight_smile:

Hello COS,

i assume you already have the knowledge how to get QueueItems via API Requests and a QueueID. I also assume you know how to make them into a JSON Array so you can loop through each item.

Once you do this and print the information of a specific QueueItem you should be getting these informations from each Queueitems value:

Screen

Once you have a Queueitem you can simply subtract “Endprocessing” time with the “StartProcessing” time to get the individual processing time for each QueueItem. (Subtracting the values will give you a timespan)

processingTime = currentQueueItem(“EndProcessing”).Value(Of DateTime).Subtract(currentQueueItem(“StartProcessing”).Value(Of DateTime))

Careful though, QueueItems that failed, were abadoned or are still being processed have no “Endprocessing” time and therefore have to be excluded in making a report. You can check this via the “Status” of a Queueitem

strStatus = currentQueueItem(“Status”).Value(Of String)

Hope that helps.

Hi Johann, thanks for your help.

I’m not using an API for this process, just the Get Queue Items activity, but it doesn’t offer much in terms of properties.