I’m working on a UiPath automation where the robot needs to run different workflows based on the type of scenario — like “Approve”, “Reject”, or “AutoProcess”.
I want to avoid using multiple if or Switch statements to keep things clean and easier to maintain.
What I need:
The unattended robot should log in, do some tasks in an application, and log out.
Based on a scenario name (from config or input), it should call the correct workflow.
I’d like to manage this using a dictionary, config file, or naming pattern — something flexible without hardcoding each condition.
My Questions:
What’s the best way to do this kind of dynamic workflow call?
Can unattended robots handle this approach reliably?
Any tips, best practices, or sample designs would be really helpful.
I believe system package should be >23.10 for using variables in workflows
Alternately one thing you need to bear in mind are the arguments and make sure they are dynamically mapped or use same argument names across so that only workflow name variables can be handled and the job is done
Even you store the scenario and workflow mapping in the config or dictionary, you will require to use if, switch or other control statement to direct the execution flow to correct workflow.
What’s the best way to do this kind of dynamic workflow call?
Use Process Arguments - it can easily be changed while running from orchestrator or scheduling a trigger. (We have a similar use case, where we use the same workflow for different location code with different arguments set in trigger)
Can unattended robots handle this approach reliably? -
Yes.
In your case, it seems like you are using same application, and even if the processing screens ae also same, except 1-2 steps → you can use flowchart with the process workflow of Re- framework- and use Flow decision to keep the workflow clean and understandable
but if the steps\ screen involved are mostly different, it is better to have three different processes for each of these “Approve”, “Reject”, or “AutoProcess”.
Any tips, best practices, or sample designs would be really helpful.
Use Dispatcher (add to Queue with Type attribute) and Performer (Process specific step)
It would be easy to scale if volume increases.