I have created a datatable to store the items that are completed for report purpose . I have created this datatable under “First run sequence”. Given the scope similar to the config . but when system exception happens datatable resets . How to ensure all the items are stored in that datable even the system exception records
If it is kept in first run ideally it would not reset…
can you please check if you are using any new Datatable in the main or any other place
cheers
Make sure the variable is defined with global variable scope like the main workflow so that it can get updated without resetting the existing datatable
Also Consider using an external storage method like a database (SQL Server, MySQL, etc.) or a file (CSV, Excel, etc.) to store the data you want to keep. This way, the data will be saved even if an exception occurs, and it can be retrieved when needed.
Hope this helps
@tharani.natarajan
If you place the datatable creation in the first run sequence. If any system or business exception occurs the datatable variable will store the values.
Create a Variable of datatable in the General Business Process and pass this variable values by using arguments.
Note - General Business Process is the Scope for the Whole RE Framework Main scope
Hope it helps!!
Similar to config file scope I need to have scope right ?
There are many records So i would like to avoid opening the excel file and write in it every time Instead i would like to add rows to a datatable and write finally into excel
Well depends
If config has global scope then the datatable u need can be defined with same scope
@tharani.natarajan
the scope should be highest…but as per your description looks like it is resetting on exception then some where the datatable si reset…
are you by any chance sending the datatable into process.xaml?
if yes then when exception occurs the variables are not passed back …may be that might be the reason that the datatable is reset…
instead add the data rows or data in the process transaction only for success and exceptions
cheers
yes ,I pass into process.xml.
can you please tell where exactly i need to add the rows to datatble
For success add it after invoke process.xaml
for business/system exception add it in the catch block of process transaction
Hope this helps
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.