in_Config("VarName").ToString not working

Initialize All Settings will return the Config (Out Argument out_Config) to the Main
Main is calling / invoking Initialize All Settings and stores the returned out_Config under a particular Variable (e.g. VarName = Config)

When calling / invoking Init All Applications form Main we pass the Config to the in_Config
And will use later in_Config when calling / invoking other XAMLS from there

Short Version:
Main → InitAllSetting: out_Config will get returned: we store it under the Variable: Config
Main → InitAllApplication: we pass the Config to the in_Config
InitAllApplications → AnotherXAML

  • AnotherXAML defines an in Argument: in_Config
    we forward the in_Config from InitAllApplications to the in_Config from AnotherXAML

I checked it, it already was like that.

i updated the post above
In case of trouble also do debug the implementations (Main and other XAMLs) and inspect where the Config is lost / turns to null

I think the problem sits somewhere else. Because all you say is within the Framework, but I did not change a single thing in it. So i don’t think the problem lays there.

Im getting the Error from above and also this:
Invoke ACME_Login workflow: Object reference not set to an instance of an object

I feel like the problem is in the in_Config(“VarName”).ToString
Because as soon as i put this ii, I get the Error. If I pass the real URL instead of this, it works.

Dear Mahrie,

Did you pass this Config to the input argument in the Invoke workflow where you are getting the error.
And before the invoke workflow activity add an activity MessageBox and write Config(“ACME_URL”).toString and keep a debug breakpoint — whatever name you have kept in config excel so as to check if config value exists

Could you please share the screenshot of the above Invoke workflow activity with arguments pop up

Thanks,
Geetishree Rao

Thats exactly why i think, the Problem lays in the in_Config(“ACME_URL”).toString
Because even if i comment out the invoke and start the InitAllApplication.xaml with nothing but the comment and a log message, i get the same error.

Here the wanted screenshot: (i hope this is what you mean, its from inside InitAllApplication)

No … I meant the one in main.xaml

@mahrie
the fastest way to get it sorted out would be to debug it along with breakpoints and partly stepwise debugging.

Thats the common and best practive in case of analysis will not clear it.

While debugging we also can benefit from manipulating variables etc. have alook here:

2 Likes

Alright! I’m sitting down now with my work team to find the solution. If we find it, I will let you all know.

Mahrie :bear:

Please keep breakpoints and debug :slight_smile:

Hi @mahrie

Can you check whether you have created a variable named “ACME_URL” in the Login.xaml file?

Before invoking login.xaml, check whether any items present in the in_Config dictionary

Hi @Shivaraju,

Please verify below:

  1. Initallsettings invoke workflow activity, out_config is assigned to Config.
  2. Initallapplications jnvoke workflow activity, in_config is assigned the value config.
  3. Login acme invoke workflow activity, in_config is assigned value in_config. If you don’t want to pass whole config to this workflow, the way you are passing config value is also right.

And then check that acme URL defined in the config has a value defined there.

One thing you can do to verify is before calling acme login invoke workflow activity, using log message, print the value in_config(“variable”).tostring and see if it exists?

If it doesn’t, make sure step 2 is verified and done.
Also if you can show screenshot of step 2, we can help you further.

Regards
Sonali

You have to initialize in_Config.

Go to your variables pane and in the default for in_config put new dictionary(of string, object)