What is the best way to have once place to keep config values (email adresses, username/password, etc etc). This to make it easy to change these values.
However, in my project I would then have to do the following for everywhere a config value is needed:
Use Invoke Workflow to make a call to InitAllSettings.xaml, this will read all the config values every time.
Assign the Out-Config to a variable.
Get the correct value from the variable.
To do all that every time a config value is needed (in different workflows) seems like it will make the workflow to look a bit messy. Is there a cleaner way to do this?
I would want to do step 1 and 2 only once globally for the project, and then only step 3 wherever, in the project, I need a value. Kind of like a static initiation.
Well having config file is always a best practice to be with a project because whenever a change in input has to be made we can do it very easy and it is available for others as well to make changes
and config file is read in terms of dictionary format that is out_config file is a dictionary variable defined globally in the variable panel
–or if it is invoked inside a workflow like initsettings get the out_config as a OUT argument and assign it to a config named dictionary variable and i hope that is how we do usually in a REFramwork kind of template
–so once if we have the config variable ready we can use any where within that project as that is a global variable and can be used in other invoked workflows as well by passing config with some keys mentioned like config(“keyname”).tostring as a value to any IN argument for a invoked workflow
This is also an option, but then this has to always be sent as an in_argument to all other invoked workflows… and into the ones they in turn are invoking and so on.
But maybe this is the only way to do this.
Being a Java-developer, I feel like it would have been nice to have a “global project variable” or a static one that is always accessible by all workflows in a project.
well yes unless we dont invoke any workflow we dont need to send them as a IN argument rather we can directly use that variable config along the process
–invoke workflow file is like calling another class in our current class so if we want to make use of the variables defined in the first class we need to assign it here in the new calling class,
And we need a config value in WorkFlow A4 and WorkFlow B1, then we need to initiate the config in Main_Workflow and then send it to A1, A2, A3 and A4 (although not needed in A1, A2 nor A3).
I hope there soon will be an easier way to work with config files and values.
Take a look here: Global Variable
Looks to me, like the UiPath Team is already considering something like this. Maybe @ovi or @loginerror know something more?