I’m looking for a bit of help here.
I have developed a UiPath process that uses the App Integration Database Execute Query to check for an update to a SQL table and if it finds one, gets data from the table and creates a transaction in an Orchestrator queue (using Add Queue Item) containing the data as an ItemInformation collection. This works perfectly and I can see the transactions in Orchestrator with the data shown as an object containing Specific Data;
That queue Triggers a second process and I want to grab the Transaction data to use in that process. I thought it would be simple to use Get Item Data or Get Queue Data or even that it might be available as an Argument, but nothing seems to work for me. Can anyone give me any pointers? What am I missing?
Also, the transaction, once created retries every 30 minutes, even though the queue is set to NOT retry. Have I missed a configuration setting, or do I have to mark the transaction as complete from the process?
Thanks in anticipation.
You do have to mark the transaction as successful, or it will be considered as being processed under the Orchestrator logs. To get specific data from the transaction item, you need TransactionQueueItem.SpecificContent(“Name_Of_Field”) to pull data from the queue item. “Name_Of_Field” is the variable name you passed as a parameter to the queue item when you uploaded it to Orchestrator.
If you know a value that you can use that is in the Transaction, then you can find the Transaction using it.
Let’s say Process2 uses a Transaction with FirstName “John” and LastName “Smith”. By using the GetQueueItems activity, you can filter this to the individual Transaction that meets that criteria.
queueItems.Where(Function(q) q.SpecificContent("FirstName") = firstName And q.SpecificContent("LastName") = lastName).ToArray
This will give you an array of transactions that meet that criteria, so then you would want to check its .Count to make sure you found a match.
Also, consider that GetQueueItems will only pull in max of 100 items, which means you would kind of need to use the Reference or other properties to narrow down the number of items on the GetQueueItems activity, if that becomes an issue.
Anyway, you can filter the queueItems by any criteria you wish. Note: you don’t really want to process a Transaction more than once… if you have a second process, then you might think about using another Queue, and process1 would populate that queue for process2 to complete.
EDIT: If you have the queue item, then just pull in the data from it you need. Like:
Hope these tips help.
Thanks for taking the trouble to provide your help and advice.
Since posting have worked out most of what I need to by trial and error. I was expecting to get a job ‘triggered’ for each Item in the queue in turn, but I see that is not the case and I need to loop for each entry in the queue.
However, I’ve observed that, if I don’t interfere, Items sitting in the queue will get triggered one at a time every 30 mins, on the hour and half hour precisely. I don’t think I set that up anywhere, but it must be a configuration setting. Any ideas where that is?