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.
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.
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.
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.
two things if you want to combine dispatcher and performer
Place it inside the if block which checks for config is Nothing
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
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.