I’m working on Assignment 2 and I was able to successfully get my System1Process.xaml to work using the Open Browser activity and the string “https://acme-test.uipath.com/account/login”. However when I try to store the https://acme-test.uipath.com/account/login url in Orchestrator and then call it using the in_Config method, I am getting an “Open Browser:Object reference not set to an instance of an object.” message.
My settings in the config file are:
Name: System1URL
Value: System1_URL
Asset name in orchestrator: System1_URL
Asset value in orchestrator: https://acme-test.uipath.com/account/login
I’m calling it in my process with:
in_Config(“System1URL”).ToString
But I’m still getting an error.
These are my current properties:
The problem might be with the assets on the config file, I encountered such a similar strange scenario as well. Please delete the record from the config file and recreate the row on the config file.
By the way, to verify the values are retrieved correctly try printing them before passing to Open browser.
To Test your asset values are retrieved correctly use the Get Asset activity to fetch the values and print them. Troubleshooting step by step will always help you identify where the problem is and then you can rectify.
If you are storing the value in Orchestrator you need to add the entry in Assets tab and not Setting.
This was it will fetch it from Orchestrator during the Init and then your value in_Config(“System1URL”).ToString will get you a result.
I tried deleting and re-adding them. That didn’t work. I was also having trouble with the get assets activity. I’m not sure how that activity works and the knowledge article in UI Activities guide wasn’t very helpful.
Maybe I’m not understanding the way in_Config is working
InitAllApplications:
arguments: the info that is passed into the System1_Login workflow. This is where I put the in_Config(“SystemURL1”).ToString command
System1_Login worfklow
Activity: Open Browser
in_System1URL (This is how I am telling it to open the browser)
Arguments: The in_config info I wrote in the in_System1URLArgument is passed into System1 Login from the InitAllApplications. Is this correct?
I stored the url in the System1URL key in the settings tab of the config file
Using the in_config, I pulled the System1URL key to the Import Argument in_System1URLargument value for the Invoke System1_Login workflow. the url should now be a string. is that correct?
The url string is now passed into the System1_Login workflow.
The variable in_System1URL is then set with a value of in_System1URLArgument (url string now)
use the variable to open the browser
Of course you can; place the name and value in the Settings tab and use them from the Config dictionary. You had mentioned in your initial problem statement that you were trying to get from Orchestrator assets.
In your initialization Sequence, after the first log message that says “Opening applications…”, add another “log message activity” to print the value as a string: in_Config(“System1URL”).ToString
Inside, System1_Login worfklow print the “in_System1URL” value to check if the URL is correctly passed.
The error is caused because the in_Config variable was not initialized to anything when it tried to use it.
I would need to see more of your framework model, but check to make sure you are storing a dictionary to Config before you use it, and also check before the Invokes to make sure you have passed the dictionary correctly through the Main. —It should be an out argument in the workflow where the Config is stored from the Excel file.