Select to view content in your preferred language

Model Builder - Only run if it will complete successfully

168
1
a week ago
LukeGilner1
Frequent Contributor

Hi Everyone,

I have a fairly complex model with several joins, calculate fields, remove joins, appends, etc.  I have a bunch of preconditions to check that certain attributes are filled in correctly before the model processes run (otherwise the model will fail).  However, there are times the model will still fail for other reasons (mostly while building it through trial and error).  When it fails, the first parts of the model still do what they're supposed to and update attributes or whatever, but if it fails I would rather that nothing completes, and everything goes back to its original state.  Is there a way to run the model as a "trial" to see if it will complete successfully before actually performing all the operations?  Almost like a precondition to run the model is that it will complete successfully without errors or warnings.  Is there something I can put at the end of the model that says, if model completes then perform all the operations, if not then do nothing?

I am using hosted feature services in Pro 3.3.

0 Kudos
1 Reply
Nick_Creedon
Regular Contributor

This would be interesting to know, I ended up turning my model builder into a script then added if statements at the end of each tool that runs so that it would terminate the script if one tool failed, this keeps if from running the next tools down the line. 

0 Kudos