Get transaction item after checking the queue (REframework)


I’m currently building an automation using the REframework. I need to process transactions one by one. So after finishing one transaction I need to load the queue with a new item (from application X). Before loading the queue with a new item I want to perform a check. If there is still a transaction in queue then don’t load a new item. Only load a new item if there are no transactions.

I can’t figure it out how to adjust the get transaction step with the try catch activity.

Default situation:
If there are no transactions after the get transaction activity an exception will be thrown after the catch.

Needed situation:
Get transaction activity
Try: Get transaction. There is a transaction. So no catch. Process transaction.
Try: Get transaction. No transaction, so catch exception. Load queue sequence (with it’s own try catch I think). Another Get transaction. There is a transaction. So no catch. Process transaction.

How do I make this work? Or are there other alternatives?

Could someone help me with this.

Regards Richard

Hi @leobot.dafinci

You can validate the presence of data after getting the transaction in the process state as well.

Let’s say you get the data in the get transaction state & want to verify whether there are any certain conditions you want to check, you can do this by taking decision making activities in process state. If the desired data is available, proceed with the process state. If not, shift the control to the exception handling block.

Hope this helps,
Best Regards.


But when will you stop the bot then?

When there is transaction you are processing and when no transaction you are adding an processing it…

So there is no stop for the bot?

You can actually first do a get queue items and check if it is zero then add wueue items if not zero then proceed to get transaction item

Hope this helps


@leobot.dafinci Hi. RE framework have the GetTransactionItem within Retry scope. If no item in queue, out_TransactionItem is Nothing. Add an If condition as shown in image, then place the logic to get the data and add new transaction item. Hope this helps

Thanks Devi,

If I understand it correctly.

Place an If activity after the Retry Get transactionitem (delete rethrow from catch section)
The If activity will check whether there are transaction or not.
If there’s no transaction item I have to put my load queue item sequence into the then section with its own try catch
But I still have to put another Retry Get transtransaction (with rethrow in catch section) after that


Hi Anil,

Thanks for your reply.

The bot will stop with a time trigger. It has to run 55 minutes or so. Or until the workload of application X is empty.

You mean something like this:



Yea this is what i was mentioning …but not sure what you are using the for loop . After get queue items…if you are using it to count actually you can do queueitems.count …here queueitems being the output of get queue items

And actually when wueue is empty you wanted to add queue item i guess…but I dont see that may be you can check if that is missing or is it fine


Hey Anil,

I did used an for each to count the queue items. Yes indeed a queueitems.count is much better ;).

An add queue item when queue is empty is not missing. It’s inside the Load queue with workload (I know it’s a log message. This should be an sequence ;)) I had to build a flowchart quickly.


1 Like


Perfect…so I hope this helps your wuestion

Happy Automation

Feel free to mark solution and close if everything is working else happy to help


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.