How to Add Queue item to Reframework

Where exactly should the Add Queue Item activity be placed in a UiPath workflow?
Should it be inside InitAllApplications.xaml, or within the block that checks If Config is Nothing?

if a system exception occurs, I hope the workflow will return to InitAllApplications.xaml and try to add the queue item again.

Hi, @Mohammed_Shabaz

Put the Add Queue Item part in the Init state, inside the “If Config is Nothing” block, as a separate workflow you invoke from there.
This way the bot loads items into the queue only once at the start (or when Init runs again after a system exception) and it will not create duplicate items for every transaction.

1 Like

You are correct there–> Add queue item should not be part of initallapplications as everytime system exception occurs, it will try to re-add the queue item..

For re-framework → you should have add queue item workflow created under section “if config is nothing”, which means items will be added only initially when process starts.

2 Likes

Hey @Mohammed_Shabaz,

In the init state you will a sequence as “First Run” try to place the add queue item activity there so that will not reload the same input again and again.

1 Like

@Mohammed_Shabaz

two things if you want to combine dispatcher and performer

  1. Place it inside the if block which checks for config is Nothing
  2. Also to ensure duplicate are not added if already a item is present you can stop adding item again by using get queue items with new filter and then use if condition to check and add item if needed

cheers

1 Like

Put Add Queue Item in your Dispatcher workflow after the Config is loaded, not inside InitAllApplications.xaml.
Init is only for environment setup.
If a System Exception happens, REFramework returns to Init and your dispatcher logic will execute again, so the queue item will be retried.

@Mohammed_Shabaz
Inside Init state, in this order:

  1. InitAllSettings.xaml
  2. Your dispatcher workflow → LoadData_And_Dispatch.xaml
  • Reads Excel/DB/API
  • Uses Add Queue Item in a loop
  • Has its own retry logic
  1. InitAllApplications.xaml
  2. Then normal flow continues to Get Transaction Data / Process Transaction

But you must make sure dispatcher runs only once, even if the state machine goes back to Init after a system exception.

Hi @Mohammed_Shabaz

Place the “Add Queue Item” activity inside the Init state, but NOT inside InitAllApplications.xaml.

Instead, add it inside the Main.xaml → Init State → After “If Config is Nothing” block.

Use this Structure-

Init State
├── If Config is Nothing
│ └── Load Config
└── Add Queue Item Logic (reading your source data + queue insertion)

So the recommended place is:

Main.xaml → Init state → Outside “If Config Is Nothing” but still inside the Init state.

This is the standard REFramework design used in enterprise solutions.

1 Like

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