UiPath Advanced Training(Academy 2)


#1

Hello,

I am having trouble on the UiDemo assignment. I follow the instructions how they appear all the way up to the “InitAllApplications.xaml” portion where you are instructed to use a Open application activity and use in_config(“UiDemoPath”) .ToString in the FileName. I have already put “UiDemoPath” both in the Name and Asset cells in the config file. I have also made an asset in Orchestrator name “UiDemoPath” and set the value to the file path of my local machine that I am running the action on.

Every time I run the _Test file with the test invoking the InitAllApplications file I am greeted with an exception stating “Source: Invoke workflow file: Open application ‘UIDemo.exe UiDemo’ Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized). Exception Type: NullReferenceException”

Does anyone know how to get around this issue? Did I miss something? Is anyone else having this issue or other issues in the “Academy 2” course?


#2

Hi there,

It looks like you’re using the Config dictionary without being initialized somewhere. Check if you pass it as an argument to the InitAllApplications and you read it with InitAllSettings.

Cheers,
Andrei


#3

Can you explain in more detail what you mean by

I am having same error message when I run _Test.xaml file. My work flow looks like this:

image

Thanks for your help!


#4

Hello,

Thank you Andrei for your input. I have the argument going into the InitAllApplications. After further investigation it is not taking in_config(“UiDemoPath”) out of InitAllSettings and then carrying it over to InitAllApplications. As soon as the bot exits InitAllSettings in_config is null!

Studio_Exception_Message|690x371


#5


#6

Put an invoke workflow inside InitallApplications workflow and press import arguments. Add an argument/variable to the value column on the Out_config argument (ctrl + k: set name)

(ctrl+K : name it then use that new variable you just created in the FileName field ie: out_configVariable(“UiDemoPath”).tostring

Also, make sure in the InitAllSettings workflow that the config file is called correctly in the read data table activity like this:

image


UiDemo Walkthrough Assign Problem
#8

Dear @DGold195

thanks for the great explanation. I do not understand the part “name it then use that new variable you just created in the FileName field ie: out_configVariable(“UiDemoPath”).tostring”

Which FileName field? Can you clarify these steps?

thanks

Kind regards

Gennaro


#9

If you use the hot keys ctrl+K, this creates a new variable for you. Name it (the variable) whatever you like. In my example I just named the variable out_configVariable.

The “UiDemoPath” inside the parenthesis () is what the bot will return as the file path for the UiDemo Application assuming you have in your settings tab of your config excel file the file path named UiDemoPath and the actual path under value column.


#10

Hi @DGold195,

thanks for your reply. I did it and configured everything as suggested. Unfortunately it still does not work. Here are a few screenshots:

Any ideas about where the error is? You can see the reference object error message in the screenshot.

Thanks a lot and I look forward to hearing from you

Kind regards

Gennaro


#11

Hi:
The problem comes because UIPathDemo Asset has not been defined in the Orchestrator and the PDF does not explain nothing about it, to solve it, we have to define the UIPathDemo asset into the orchestrator, thats the problem.