Try (Multiple) (Operator Toolbox)
SynopsisThis operator tries different subprocesses until one finishes without an error.
This operator can be be used to try different processing variants for a given input. Examples for this are different read operators if you do not know the type of the incoming file. Another example is to try different date parsing options until something works.
If all inner processes fail, an error is thrown. This error can be handled using the Handle Exception Operator.
In contrast to Handle Exception this operator allows you to try more than one subprocess. You could get a similar behaviour with Handle Exception by stacking various Handle Exception Operator into one another. In contrast to Select Subprocess this moves on to the next process if one failed.
- input (IOObject)
The Try (Multiple) operator can have multiple inputs. When one input is connected, another input port becomes available which is ready to accept another input (if any). The order of inputs remains the same. The Object supplied at the first input port of the subprocess is available at the first input port of the nested chain (inside the subprocess).
- output (IOObject)
The Try (Multiple) operator can have multiple outputs. When one output is connected, another output port becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The Object delivered at the first output port of the subprocess is delivered at the first output of the outer process.
This tutorial process first generates a few static dates. Afterwards Try (Multiple) is used to parse the dates. The first two tries use the wrong date format and fail. The third one uses the correct one and works