- Create a workflow, say bug.xaml
- Create an output argument say “Arg1”
- Create a variable named “Arg1”
In the workflow, assign “Bug” to Arg1.
You will notice that the variable Arg1 will now have the value “Bug”, not the argument named “Arg1”.
So there are two things going on here.
- UiPath is allowing both variables and arguments with the same name
- When you assign a value, the variable is taking precedence.
This is leading to serious bugs. I created an workflow to return a database connection to an argument that I created “DBConnection”. Inadvertantly, I had created a variable also of the same name.
When I used this, it was not returning the Database connection object. It was returning null.