Error While Reading config File

Hi All,

I am trying to read a credential from my Orchestration and for the same I have reused the REFramework component. I have defined a variable ‘config’ in my workspace for the same but whenever I am trying to use this variable I am getting the below error. I do understand that somehow the value is not being set to this variable due to which I am getting this error but I am not able to figure out where.

“Object reference not set to an instance of an object.”

I have attached the workspace , kindly look into it and assist. (32.9 KB)


Your file path to the config file is not correct.
In your zip file at least, there is no ‘data’ folder as you have in your path



1 Like

if you are using the REF then that folder will always be created and config will be stored in there as default. If the filepath didn’t exist then a different error message would be displayed.

@Chetan1809 the error you have is that you have either not initialised a variable or have not passed a value to an in argument.

Sorry, I can’t download your xaml to check which one is missing

1 Like


I checked your workflow and you are trying two pass different paths for config.xlsx file. At the time of invoking excel file you are passing one path and inside the workflow you are passing different path under default value. It is taking inside workflow file path and there no config in that location. So you are getting that error. Please find the attached workflow. (28.7 KB)

1 Like

Even after changing this path it did not work…

1 Like

I have changed the path of excel in both the places to have it consistent. Still it is not working.
I have looked at your solution but here also I have a doubt that , since we have got the asset value from the config value, why are we not passing that value in ‘GetAppCredentials.xaml’ to fetch the value of the username and password from the orchestration. With your solution it is prompting me for the credential and adding it

1 Like (32.9 KB)

Attaching again for your reference

1 Like


Yes Get App Credential workflow will try to fetch credentials from Orchestrator. If it is not found then it will read from Windows Credential Manager and here also not found then it will ask you to enter credentials.

In first run, it will ask you to enter credentials then it will add there in credential manager. From next time onwards it won’t ask you to enter it again and will read from credentials manager.

The workflow I provided you will work and could you please check again.

1 Like

@lakshman : I still have a doubt, please help me with the understanding.
We call “InitAllSettings.xaml”, to read the config file and store the value of config file in a map in an output argument ‘out_Config’.
However ideally when we call “GetAppCredentials.xaml”, we should pass the output of the map from "InitAllSettings.xaml to GetAppCredentials.xaml’ but I am not sure how are we achieving it here.
Kindly let me know, I am very new to UI path.

1 Like


We will use this “InitAllSettings.xaml” file in Init state to read config.xlsx file and then will store result in argument of type Dictionary and say ‘out_Config’ and specifying direction as ‘Out’.

And then we are storing this output argument value in ‘Config’ Variable and specifying scope as ‘General Business Process’ i.e. we can access this variable from any state in the process.

Now all config excel file values are stored in variable of type Dictionary and we are calling it as ‘Config’. Where ever you want to use this config file values just we have to create one dictionary argument and we have to pass this Config value to other workflows.

Eg. Here, i want to use Config values in InitAllApplications workflow. For this i created one argument of type Dictionary and say ‘in_Config’ and passing Config value to that. Make sure you have to specify directions properly whether it is In, Out and In/Out.

Thanks @lakshman for the explanation really helped a lot, I was more confused because the workflow which you attached and sent did not had this config variable (output variable).

1 Like


In the current version 2019.5.0, Edit Arguments option is missing. For this we have to go to properties of Invoke Workflow activity and go to arguments section and create variables and save it. Please check below thread.

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