I'm calling my workspace from the command line (either via Python or .NET to a system/os call). I'm parsing DWGs and pushing attributes to SQL Server in the workspace. Either the data validates in the workspace or it doesn't. I need to return a value of 'pass/fail' to my calling application from my workspace based on whether or not the data validated within the workspace. Is this possible?
Check the exit code from the program; eg echo %errorlevel%
If it is 0 then the workspace ran successfully.
In the workspace, when you locate bad data then terminate the translation with a Terminator transformer. That should change the exit code to be non-zero.
Hence a non-zero errorlevel denotes bad data.
NB Read this first on StackOverflow
Other methods to get that information out would be to write it to a file with the Textline writer, or an AttributeFileWriter transformer. Then you could write your own exit code according to the type of problem.
Yet another method might be to utilize a Python shutdown script in some way.
I think it really depends on what you plan to do with the pass/fail information, and how.
If you want more than a simple workspace pass/fail you could also parse the resulting FME log file. You can control the logfile location with the LOG_FILENAME command line option as described at http://fmepedia.safe.com/articles/FAQ/Batch-Processing-Method-2-Command-File#heading_toc_j_3 (LOG_FILENAME is not just for batch processing).
You should be able to use either