Skip to main content

Hi Team,

I am new to FME and would appreciate if you could help me by giving some tips on Error handling in FME, Below is my scenario,

My FME application reads the data from Database and writes to arcGIS Feature layer. Application overwrites the data to feature layer everytime it runs.

If application fails for some reason, is there any transformer (or any other method) to retry running the workspace again or add some kind of Try/Catch mechanism?

Below could be possible error scenarios in my application,
    1) Error connecting to Database
    2) Error occurred during transformation
    3) Error occured writing to arcGIS Online
    

Thank you in advance,

Regards,
Syed
    

I am assuming you are doing this on desktop/form.

You could create another workspace and use a couple WorkspaceRunners. This master workspace could include the first WorkspaceRunner as the first attempt, then maybe some Loggers or FeatureWriters to create a log file of the failures. And then you can pass them into another WorkspaceRunner to re-attempt the same workspace.


It sounds like you have a programming background. There’s a lot of concepts used in developing software, that do not really apply to FME. And there are a number of mechanisms that you can use in FME that are similar, but slightly different. So keep that in mind, when working with FME.

 

Apart from what Liam recommends, I am wondering why:

    1) Error connecting to Database

If there is an error connecting to the database, why would you want to retry? 99 out of 100 times retrying will still not connect to the database, because something is wrong (network outage, password expired, machine name has changed, etc etc etc...). So a blind retry without knowing why is not very useful.


    2) Error occurred during transformation

More or less the same goes for this one. If an error occurs during transformation, that means that some data entered the workspace that you did not foresee, or the upstream datamodel has changed without your knowledge. And that again means action on your side: you need to change that workspace. A lot of transformers have Rejected ports, and there are other ways of validating data and making sure any errors get logged - so again retrying without investigation and possible action does not seem prudent.

    3) Error occured writing to arcGIS Online

See my answer for the first point.

 

Now, having said all that: There are ways of catching if something goes wrong. Not always, and some transformers will still halt the entire process, but you can deal in some way with most foreseeable errors, using testers, validators, and the Rejected-ports. Then you will want to either log those occurences, or possibly even send a notification of some sort - which is possible especially if you use FME Flow.

 


Reply