In last week’s blog post titled FlowForce Server Supports RaptorXML, we created a FlowForce Server job that defined a RaptorXML execution step to validate XML files, and we called that job as a step at the end of our job that processes camera GPS data, as a final check on the output. That was a quick way to demonstrate integration of FlowForce Server and RaptorXML Server, but for real-world production we would want to perform the same task more efficiently.
If we insert the RaptorXML validation function at the top of the job, right in front of the On error definition as shown above, we can apply the same error handling steps for failures of either the data mapping or the validation step. In other words, an error in any one of a series of steps before the On error definition forces the job to take the error path.
If by some chance the mapping was successful but the .gpx output file was not valid, catching it here instead of at the very end of our original job avoids sending bad data on to StyleVision Server for report generation.
When we run the revised job and encounter an input file with bad data, the mapping function stops immediately and the validation step fails as well, indicated on line 3 and line 6 of the partial FlowForce Server Log view shown below where job steps “completed with status: 1.”
We can click the more link for the RaptorXML validation step for details of the validation error:
When MapForce Server encountered an error in the data mapping step, it terminated immediately and left the XML output file incomplete, and therefore not valid.
We could define job steps to delete the invalid data, but remember, these partial output files can be helpful for diagnosing errors, as we described in Expect the Unexpected – Altova MissionKit Solves a Number Format Mystery.
Our next post on FlowForce Server will cover all the built-in filesystem and other functions you can apply to make your data transformation, report generation, and XML and XBRL processing workflows efficient and productive.
FlowForce Server, RaptorXML, and RaptorXML+XBRL are available for Windows, Linux, and Mac OS platforms. To check them out for yourself, click here to download a free trial!