I have data scraped from excel into an output DataTable argument (out_dtTable) in 1.xaml file and after which I am invoking the 2.xaml file where I have assigned the input DataTabe argument(in_dtTable) to out_dtTable.
But while debugging I noticed that as I come out of 1.xaml the out_dtTable becomes NULL and it throws an exception.
How do we resolve this situation? I appreciate any inputs here. Thanks!
In the first Xaml dont have the datatable variable in variable sectionā¦just have it in the argument sectionā¦Use in/outā¦Likewise in second Xaml as wellā¦Have the variable in the main sequence where these workflows are usedā¦
Also create the same argument name sin invoke workflow section
Be sure that you created out_dtTable in 1.xaml as an argument of type āOutā. Im assuming that youll invoke this xaml in another part of your code, so u will see the āedit argumentsā button when you use the invoke activity, inside the edit arguments you need to set a new global or local variable that will hold the content of āout_dtTableā that you are exporting from 1.xaml. When you create this variable, the last thing you will have to do is set the āin_dtTableā of 2.xaml receiving the variable that you create.
So finally I could fix this. Thank you all for the inputs. Here it isā¦
Created one āio_dtā argument of type I/O in the top Process.xaml.
Created one āio_dt1ā argument in 1.xaml file.
Created one āin_dt2ā argument in 2.xaml file.
Invoke both 1.xaml and 2.xaml inside Process.xaml.
While importing argument for 1.xaml assign āio_dt1ā=āio_dtā.
Then read the data from excel or scraping into āio_dt1ā.
Finally, import argument for 2.xaml by assigning āin_dt2ā =āio_dtā.
That will pass on the data table from one xaml to other.