I'm not familiar with the differences between microstation 7 and 8, but if you're using a reader then any validation would have to happen in a startup script.
I would suggest instead that you use a Creator connected to a pair of FeatureReaders (one for V7, one for V8) the correct version will output data, the incorrect version should send the trigger feature out the Rejected port.
I'm not familiar with the differences between microstation 7 and 8, but if you're using a reader then any validation would have to happen in a startup script.
I would suggest instead that you use a Creator connected to a pair of FeatureReaders (one for V7, one for V8) the correct version will output data, the incorrect version should send the trigger feature out the Rejected port.
If you only want a specific version, just use the one feature reader, and you can do what you want to the rejected feature, rather than just have the workspace fail on read.
I've faced this problem before. I did pretty much what @jdh suggested above, except I was finding Workbench would bail completely rather than sending things to the Rejected port. This may no longer be true, so I'd try that first.
If you hit problems with that, what I would try now would be this:
- Set up a workspace with two parameters: filename, and a choice between V7 and V8. Root a Creator into a Tester which splits the V7 and V8 into two different FeatureReaders, and add whatever workflow makes you happy after that
- Run that workspace from a second Workbench using a WorkspaceRunner. If a feature fails the V8 version, try it with V7 instead
Also, there seem to be some cases when V8 files can be read by the V7 reader and/or vice-versa, which may (or may not) cause problems. Give some thought to whether you want to try a file as V7 or V8 first.
I've faced this problem before. I did pretty much what @jdh suggested above, except I was finding Workbench would bail completely rather than sending things to the Rejected port. This may no longer be true, so I'd try that first.
If you hit problems with that, what I would try now would be this:
- Set up a workspace with two parameters: filename, and a choice between V7 and V8. Root a Creator into a Tester which splits the V7 and V8 into two different FeatureReaders, and add whatever workflow makes you happy after that
- Run that workspace from a second Workbench using a WorkspaceRunner. If a feature fails the V8 version, try it with V7 instead
Also, there seem to be some cases when V8 files can be read by the V7 reader and/or vice-versa, which may (or may not) cause problems. Give some thought to whether you want to try a file as V7 or V8 first.
According to the docs:
<Rejected>
Upon reader error, outputs the original Initiator feature with the addition of the _reader_error attribute which contains the last error message from the reader.
I'm not familiar with the differences between microstation 7 and 8, but if you're using a reader then any validation would have to happen in a startup script.
I would suggest instead that you use a Creator connected to a pair of FeatureReaders (one for V7, one for V8) the correct version will output data, the incorrect version should send the trigger feature out the Rejected port.
Thanks. I failed to mention that I am trying to do this in FME 2014 and the FeatureReader has no rejected port. This works in 2016, but our server is still 2014.
I've faced this problem before. I did pretty much what @jdh suggested above, except I was finding Workbench would bail completely rather than sending things to the Rejected port. This may no longer be true, so I'd try that first.
If you hit problems with that, what I would try now would be this:
- Set up a workspace with two parameters: filename, and a choice between V7 and V8. Root a Creator into a Tester which splits the V7 and V8 into two different FeatureReaders, and add whatever workflow makes you happy after that
- Run that workspace from a second Workbench using a WorkspaceRunner. If a feature fails the V8 version, try it with V7 instead
Also, there seem to be some cases when V8 files can be read by the V7 reader and/or vice-versa, which may (or may not) cause problems. Give some thought to whether you want to try a file as V7 or V8 first.
Thanks for the details. Seems like the feature reader is different in 2014.
Thanks. I failed to mention that I am trying to do this in FME 2014 and the FeatureReader has no rejected port. This works in 2016, but our server is still 2014.
In that case go with @rollo's suggestion of a workspaceRunner/fmeServerJobSubmitter
Thanks for the details. Seems like the feature reader is different in 2014.
Aha, in that case, definitely use multiple workbenches.
If you're having trouble with the FeatureReader, another approach to try would be:
- Set up a V7 workbench and a separate V8 workbench
- Set up a third workbench which uses the WorkbenchRunner to call the V8 one. If that succeeds, carry on. If it fails, call the V7 one