I'm using modelbuilder to do upstream traces from several points/flags in a feature class. I'm iterating each point in the fc using the feature selection iterator so that I can calculate/transfer the inline variable/point ID to the trace results. My question is, I have the output of the trace tool connected to the collect values tool which then outputs to the merge tool. I want the merge tool to run only after all points have been iterated/traced and output into the collect values tool. I thought this was the point of the collect values tool, that it would hold/collect all iterations and after the iterations were complete, only then would it continue to the next tool. Currently the model iterates through all tools including the merge tool which then puts the error:
Failed to execute. Parameters are not valid. ERROR 000400: Duplicate inputs are not allowed WARNING 000725: Output Dataset: Dataset E:\Workspace\ScratchWorkspace.gdb\Merged_SSO_Assets already exists. Failed to execute (Merge).
I'm guessing this error is due to a merge being performed at each iteration because when I run each tool individually in sequence, the model runs correctly and w/out errors. I've tried using preconditions but they have not resolved the issue, I could be using the wrong preconditions.