System error at initialization: Object reference not set to an instance of an object - InitAllApplications


#1

Dear All,

Please help. I am stuck at assignment calculating client security hash. Problem is located in InitAllApplications script with the following error message:

System error at initialization: Object reference not set to an instance of an object. at Source: Anonymously Hosted DynamicMethods Assembly

By further debugging I receive the following error message:

This is the argument of my System1 Login:

And this is the invoke argument in InitAllApplications:


What did I do wrong? Please help, thank you so much.


#2

@Nazarius,

You are not passing the “config” object to in_config for initAllApplicaitons. So it is resulting in null object reference when the process is invoked.

Hope this will solve your problem.

Best!
Sid


#3

Hi @siddu509 ,

Thanks for your fast reaction. However, could you give me a hint, what kind of “config” object do I need to pass in the in_config? (rookie :p)
Thank you for your help.


#4

In Main.xaml file inside the init state you need to pass the config object to the initallApplication process as an input argument. The config object holds all the properties in the form of dictionary object from the config excel file when the application is initialized. It is an output argument from initAllSetting process and already exists in the Initstate.

Please let me know if you need further more clarification.


#5

@siddu509,

I am at work now. Tonight I will try it again and inform you when it is succeeded. Thank you very much for your help!


#6

Hi Siddu,

I tried many times to assign the config. Still faulted and process is ended. Could you please help me, how did you set the config argument in init file? Mine is as following:

and this is the passed argument in my InitAllApplications:

Please help, Siddu…I am so tired puzzlings things around.:slight_smile:
Thank you.


#7

Can you please check are you passing the correct values to “ConfigFile, ConfigSheet” variables. It should contain the values like below.

Thanks,
Sid


#8

Hi Siddu,

I found the mistake: it was originated from my login workflow. I did not assign the config instead putting the website address literally. Every initalization process runs now smoothly. However, I get another problem with the next flow: Get transaction data. The error message is:

Error getting transaction data for Transaction Number: 0. Value cannot be null.
Parameter name: source at Source: If more items.

If you have time, please assist. Thank you bro!


#9

Can you post some screenshots or your xaml file so that i can check what causing you the error.

Thanks,
Sid


#10

Hi Sid,

Yes sure, this is my Get transaction data process:

and this is the variables of my main:


i did not remove the default variables/arguments from the template as I am afraid I remove something essentials for the process.
Thanks again for helping


#11

Please check that there is some data in in_WIList argument which you are using.
There have to be some when you invoke Extracted Work Items and assign it to an array of datarow


#12

HI prankurjoshi,

I found the mistake…the scope of the WI_List should be set to Business general so that the value can be pass to get extract data flow…duh…beginners mistake xD I almost done with this headache thanks boys


#13

Hi Nazarius, I met the same problem, after the system successfully got all transaction items, I found the error in Output Panel, could you please help me check my .xaml files?I’m afraid that I miss something important. Thank you!

Main.xaml (53.2 KB)
GetTransactionData.xaml (7.9 KB)


#14

@Ilemon,

I cannot go through your code and search for it, simply no time for that. Can you run and provide the error message? I hope then that I can help you. Otherwise you can create a post with this issue. Please be reminded that I am not expert, we are on the same Level.


#15

Actually it’s the same error message as you post before, but I already fixed it. Thanks for your response.


#16

Hi Nazarius,

awesome that you found the mistake but unfortunately I have exactly the same problem as you. How did you “assign the config instead of putting the website address literally”? How did you do it? I am currently putting the website literally but I don’t know how to assign the config. Thanks a lot for your help

Kind regards

Gennaro


#17

Gennaro,

Try to understand how the arguments in invoke initallsettings work. It reads data in your config.exe. There are three arguments in which two of them needs to get value from your variables in Main state and one variable which needs to pass value to Main state (hint: in_ConfigFile, in_ConfigSheets and out_Config).
Please search for more information about how arguments work. Good luck


#18

Hi Nazarius

many thanks for your reply. in the workflow “System1_Login”, I have the following:


Which I think is what you were referring to. But in “InitAllApplications” workflow, I correctly defined the 3 arguments that you mention:

Unfortunately, I get the following error when I run:

In attachment here, the portion of the exercise that does not work. Client_Security_Hash.zip (864.9 KB)
Could you please have a look? It would be extremely helpful because this is driving me crazy since days.

Thanks

Kind regards

Gennaro


#19

Hi Gennaro,

I am not able to help you before the end of the week. In the mean time try to search it by yourself. I promise to get back on you on Sunday.
cheers


#20

Hi Nazarius,

thanks a lot your help it is very appreciated. My error is probably exactly the same as yours but I can’t find any mistake. At least, if you look at the first screenshot, what did you use as the default value for the SystemURL argument? If you didn’t put the link to the website, what did you put?

Thanks a lot
Gennaro