UiDemo Walkthrough Assign Problem


#1

Hi, I am having trouble understanding the walkthrough instructions in Academy Advanced course UiDemo Walkthrough page 8.
Are we suppose to create these new variables CashIn, OnUsCheck and NotOnUsCheck? And what variable type are they, what is their scope?
How do we assign them into in_TransactionItem? It is a QueueItem, so how?

Thanks for help!


#2

Hi,

Queue item variables have a method .SpecificContent. When you sent the queue items to the orchestrator with the dispatcher you have also sent those three variable values. If you actually go to the orchestrator and press the info button you can see the actual values.

So if you are using in_TansactionItem.SpecificContent(“CashIn”).tostring it will retrieve the CashIn(this is exactly the name you have used in the dispatcher, in the Add Queue Item activity in the collection parameters) value from the queue.

Bogdan


#3

Hi,
I did send the values with the Dispatcher to Orchestrator, and I can see them there in the queue I created so that part is okay.

I tried to Assign: CashIn = in_TansactionItem.SpecificContent(“CashIn”).ToString
but if the CashIn is not declared in the Studio it gives an error. Why? And how can this be fixed?

(sidenote: It’s also funny that the Walkthrough document did not tell about SpesificContent but I guess it’s still a bit unfinished… at least seems that way)


#4

Hi,

but if the CashIn is not declared in the Studio it gives an error.

Can you explain a little bit better? From what I can see in the screenshot you have cashIn variable declared.

Bogdan


#5

Yes I declared it but it wasn’t in the instructions to declare, so I am confused :smiley: I still have lots of other problems with this assignment so I am not sure if this works…


#6

another problem that I am having: Advanced Training(Academy 2) Practice 1 (UiDemo) InitAllApplications xaml help


#7

Right, the walkthrough is just a little help so they won’t provide you with the full solution. For the other error it seems that the dictionary does not load the path value.

So the path value should be declared into the Settings sheet in the Config.xlsx. After that you could use the in_Config(“UiDemoPath”).Tostring in order to get the value into the Path field in the Open Application activity. Of course you have to declare the arguments and so on but I guess you know about those.


#8

Yeah i guess it’s good to try to figure out the problems yourself, this is a good way to get familiar with the Framework.
I though that in the other problem, the path was supposed to be retrieved from Orchestrator Assets.
I added the path in Config.xlsx Setting sheet: Name: UiDemoPath Value: C:\Users\trixy…etc
I logged it, and it is correct. But still I get the same error.
If I run it from Main, the error is:
screenshotError
What might be the problem here? Thanks for quick answers, very helpful :slight_smile:


#9

Can you try to attach the framework folder so I can take a better look at it?

That error is because perhaps the path you are providing the Open Application activity is not correct. You can try to output the in_config(UiDemoUrl).Tostring using a write line and see if that is correct.


#10

Hmm, I could not upload the framework because I am “a new user” here.
I did Write Line the path and it comes correctly to Output. I also tried just putting the path in the Open Application FileName and it is still giving the error. Might I have a problem in the selector?
It is: wnd app=‘uidemo.exe’ cls=‘HwndWrapper*’ title=‘UiDemo’


#11

Create a new test sequence in which you have only the open application with the static path and the working selector.

If that is working then make sure you copy the selector into your open application in the framework and you copy the exact filepath into the config file.


#12

Okey yeah! I did do a separate sequence and it works fine with the same data. The problem is else where.
If I run it now and give the path directly to File Name, it opens up the app. But the same path doesn’t work from Config. It does not understand in_Config(“text”).ToString? because it gives the next error again from this. Is there problem in my in_Config argument? :smiley:


#13

I’m guessing I have something wrong in the arguments…? Init (where its invoked) looks like this:


#14

The argument inputs seems to be fine. Can you add in a write line between the “Opening applications…” log activity and Open application and inside write in_Config(“UiDemoPath”).tostring and take a screenshot to the excel file as well? Just the Settings sheet.


#15

I found the answer: it was about the rights of the excel document. I set the right so that ‘Everyone’ can access and it works now :slight_smile:


#16

@trixy and @bogdan.nastase
were you using UiPath Studio 2018.1.0 to run the workflow InitAllApplications? I have had some issues where 2018.1 doesn’t work, but 2017.1.x will work.
I am still stuck on this part with the InitAllApplications. My Config.xlsx has the right permissions, so I don’t think that’s the issue. I have tried the solution in this post, but I still get the NullReference error.
I have run the InitAllSettings workflow with a writeLine "out_Config is: " + out_Config(“UiDemoPath”).ToString, and it writes out the correct path to my UiDemo.exe.
But trying a writeLine for in_Config in the InitAllApplications workflow always returns a NullReference error. Any other ideas?


#17

Yes I am using 2018.1.0

I ended up moving the whole project and app to local disk, changing also the permissions of the app for Everyone. This is what my path looks like in config in the settings sheet:

I got the robot working yesterday. It only runs one time, and after that you have to clean the queue in orchestrator and run the dispatcher again to create the queue again. I was trying to run it after a succesfull run and it would not run again :smiley: just something to mention if someone else is as confused as I was.


#18

Hi crobinson,

I haven’t tried it using 2018.1.0 version. The problem might be in InitAllSettings.xaml because there is where it loads up the dictionary with the values in the Config.xlsx file. Can you test InitAllSettings.xaml alone and check if you get something into the dictionary variable? test it at the end with a write line and a dictionaryVariable(“nameInTheConfigFile”).tostring

Bogdan


#19

Did you pass the test?


#21

Was there a test in Academy for assignment 1? Isn’t there only a test for the assignment 2?