Hi,
I have a problem that I can't figure out yet, and maybe someone else has dealt with a similar issue.
The issue I encounter is that I have one big main model build in ModelBuilder that contains a number of disjunct / unconnected process streams of submodels and tools. This is intentional, as the output of one process flow is not the input for another one.
In total, there are five of such "unconnected" process streams in this main model. The order in which they are run, is actually irrelevant, as long as everything is run.
Now I can run this model fine directly, and it does exactly what it needs to do, and all process flows are run and output data properly created. So no problem here.
However, since I wanted to implement some Python validation code for the model's inputs, I thought I could simply "wrap" the model in a Python script, duplicating all the input variables in the Python script settings, and add validation code there, as you can't define custom validation for a ModelBuilder model
Fine, that seemed easy enough... not so! After implementing this, I discovered that after just one of the five process flows is finished, somehow ModelBuilder returns back to the script... This means that four of the five unconnected process flows aren't being executed!
I have no idea why this is. I have made several attempts at fixing this, for example by using the ModelBuilder specific Collect Values tool to collect all outputs of the unconnected subprocesses, setting preconditions, and set the output of the Collect Values tool as the only output for the model, but all of these attempts, proved futile. In all cases, the model bails after the first process flow is executed, returning back to the script. The script then simply reports being "Completed" without any errors...
Anyone know of how to solve this, or is it really impossible to call such a type of ModelBuilder model with multiple unconnected process flows from within a Python scripts, and do I really need to split it all up, and call five separate models from within my script?