Skip to main content
Solved

Terminate Workbench on Condition

  • October 16, 2014
  • 7 replies
  • 379 views

pratap
Contributor
Forum|alt.badge.img+11
Hi All,

 

 

I want to terminate the entire workbench translation, if any feature passes through it.

 

 

I have used the messagelogger and used "Error and Terminate" option but it is providing the message and continuing the other routed translation...

 

 

I have also used "Terminator” and changed the "Terminator Redirector" to Inspection but result is same.

 

 

Are there any transformers / other procedures or I have to change any settings to terminate the translation.

 

 

Kindly suggest...

 

 

Pratap

Best answer by david_r

Hi,

 

 

you will have to check your data flow. From you screenshot it seems that the output feature type did receive 2067 features before the Terminator was triggered.

 

 

Inspection points (http://docs.safe.com/fme/html/FME_Workbench/Default.htm#about_feature_inspection.htm) are your friend for debugging these things.

 

 

David
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • October 16, 2014
Hi,

 

 

the Terminator will stop the running translation. Could you please elaborate what you mean by "continuing the other routed translation"?

 

 

David

takashi
Influencer
  • October 16, 2014
Hi,

 

 

David is right. Retry the Terminator after setting "No Redirect" (default) to the "Terminator Redirect" parameter.

 

 

Takashi

pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • October 17, 2014
Hi David and Takashi,

 

 

Thanks for the reply.

 

 

I have used it but it is not solved. I have attached the screenshot to this query for reference as well as I have provided explanation as required.

 

 

My intention of stopping the workbench is to have control on writing the output in database.  If the condition has failed even for 1 feature remaining features are being written in database which I have to delete and re-translate the workbench. This is a very confused job since we are writing in different tables and we don’t have unique attribute to identify and delete in most of the times.

 

 

Explanation of “continuing the other routed translation”:

 

 

Input features will be supplied to each process ( I have 8 different translation process from single source) and respective translation will be done and connected to different outputs

 

 

 

 

Thank you.

 

 

Pratap

david_r
Celebrity
  • October 17, 2014
Hi,

 

 

There are couple of things going on here, and it's important to separate the flow of data in the workspace and the writing of features in your database. Terminating your workspace will not undo data that has already been written, as you've discovered. To the Terminator will not be your answer in this case. The issue is that your features are written in blocks (transactions), usually 1000 features at a time, so if an error occurs on feature 2067, that means that there are probably already 2000 features that have been committed to the database.

 

 

The best way of importing data is to stage it, meaning that you first writer your data into an import schema and then validate it. If the data is all clean, then you move it into production. I would not recommend doing all this from one workspace, so look into batch processing / WorkspaceRunner to automate the processing.

 

 

(A quick and dirty solution might be to increase the writer transaction size so that the transaction is larger than the number of features, but it's not something I'd recommend for production systems. For large datasets it might also slow things down drastically.)

 

 

Hope this helps.

 

 

David

pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • October 17, 2014
Hi David,

 

 

Workbench wont write the features until all the features comes since I have feature holder transformer at the end (before writer). Untill all the features from different sources reaches they wont proceed to writer. 

 

 

So thatswhy I want to halt the translation in between if it is failed at certain checks.

 

 

Thanks

 

Pratap

david_r
Celebrity
  • Best Answer
  • October 17, 2014
Hi,

 

 

you will have to check your data flow. From you screenshot it seems that the output feature type did receive 2067 features before the Terminator was triggered.

 

 

Inspection points (http://docs.safe.com/fme/html/FME_Workbench/Default.htm#about_feature_inspection.htm) are your friend for debugging these things.

 

 

David

pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • October 17, 2014
Hi David,

 

 

Thank you.

 

 

Pause the script will also do the needful.

 

 

Thank you.

 

 

Pratap

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings