We are converting files from KML/KMZ format to MapInfo in a batch operation. We have our C# program calling the FME as a console application with parameters, for every file. Everything works fine except sometimes the the KML input file has errors in it and the FME convertor exists with an error I can see in the console screen.
Is any way I can programmatically detect when the convertor has problems and skip the file from my side of the code? Is any message send back to the console in case of success or fail?
It should be a correct way to get the result since I can see it in the console, i am just looking for the supported way.
Below is an example how we call the FME workflow:
string inputPath2 = "C:\\Users\\Breazuo\\Documents\\FME\\Workspaces\\ogckml2mapinfo.fmw" +
" --SourceDataset_OGCKML " + "\"" + path + "\"" +
" --DestDataset_MAPINFO " + "\"" + FMEOutputDirectory + "\"";
System.Diagnostics.Process pProcess = new System.Diagnostics.Process();
pProcess.StartInfo.FileName = FMEPath;
pProcess.StartInfo.Arguments = inputPath2;
pProcess.Start();
pProcess.WaitForExit();
pProcess.Close();