Config error with object reference error

config file is not readable
i have created arguments and given in_config(“url”).tostring in readrange it is throwing object reference error i have used config and worked on it but it is not working for now
what will be the error?

please check which variable/argument has to use - Config or in_Config

Make sure that arguments are assigned in the invoked workflows.

Regards,
Karthik Byggari

I tried it but it is nt taking the values…i dont hv any workflows in init or in transaction im having workflow in process only so where i can check it went wrong?

When you created a project in REF, by default there will be activities in Init state which reads the config file into Config dictionary object.

In process state (process.xaml), create one argument with a name in_Config of type Dictionary<String,Object>
Click on Import arguments and then assign the value of in_Config to Config.

Now you can use the values of config object using in_Config(“url”).ToString

Regards,
Karthik Byggari

i have another xaml in process.xaml so what do i do now?

1 Like

my ref flow starts only from process transaction so how ill give mt config file?
can anyone explain @lakshman @supermanPunch

@Jebarohith19 Are you able to read the values from the Config File?

@Jebarohith19

Are you using REFramework or not ?

If yes then it will start INIT state but not Process state. And also delete in_excelpath argument in above screenshot and pass Config value to in_Config argument. And inside you can read values from config file based on name. And it should be like below.

                       in_Config("Name").Tostring
1 Like

no i cant be able to read the values

im using reframework only what im saying is i have no xaml needed in init and getransaction states
then i have already did tht placing config to in_config bt still error there

@Jebarohith19 In RE Framework in InitAllSettings, The Reading of the Config File is done, and is assigned to a Dictionary Variable (Config). So if you can Find the InitAllSettings xaml, you can Check if the Config variable is being given as arguments to the Other xaml Files.

1 Like

The configuration variable is set in the Initialization state. If you removed it you’ll get problems. In the ReFramework the Config variable with type Dictionary<String, Object> is passed to Process.xaml using the Invoke Workflow activity as in_Config. It is important that the Config variable is set, the default value is Nothing and it becomes a new Dictionary<String, Object> inside InitAllSettings.xaml:

You could try with a new ReFramework project and do not change a single thing. Change the config file and read your value. It should work just fine. Then look at the differences to learn the pratical way.

yes it is given only but i couldnt able to read it in my process.xaml

it is all same in there but i couldnt get it

@Jebarohith19 I guess you’re not passing the arguments properly :sweat_smile:

i want to know one thing like
if i run the framework without having workflows in init and gettransaction main should run right?

@Jebarohith19 When you say Init , You mean the InitAllApplications right ? If So , I don’t think it poses a problem, But then again it depends on the way you’re handling the flow. :sweat_smile:

initall application only
i hav used activities only in process only
but it doesnt run the workflow it just ends

@Jebarohith19 What are you passing to the Process xaml?, What about Get Transaction Data xaml?