More of a question to cover a hypothetical question -
From my Main.xaml file I’ve invoked a workflow to go and scrape data from a webpage. At the end of the process, it passes back a dataTable of all the information it collected.
However; the webpage is finicky and there’s a chance the process will error out and crash. Since it didn’t reach the end of the process, the datatable won’t be passed back to the main workflow.
Is there way to pass back whatever data it did manage to collect?
Like say it’s trying to get the fields “A”, “B” and “C” - and crashes whilst attempting to get “C” value. Is there a way to have it pass back the values for “A” and “B”?
Is there a way to trigger an update to the main processes variables mid-way through the invoked process?
I can think of a few options, but I wanted some more input:
-Instead of invoking the workflow out to a separate file, have it in a try/catch in the main workflow, so it’s updating the variables as it goes, rather than all at once.
-Write the data to an external .csv and read that back in the main file
-Have separate try catches around all of the finicky parts in the scraping workflow so they don’t cause the whole thing to error out and it still passes what data it did collect back at the end