mag-letex / xprocedit

Other
14 stars 1 forks source link

Specify alternate pipelines for multi-container steps #4

Open mkraetke opened 5 years ago

mkraetke commented 5 years ago

In contrast to compound steps, multi-container steps include alternate subpipelines. There should be a way to specify these subpipelines in the editor. The spec names two multi-container steps, which work differently: p:try and p:choose.

p:try has two alternate subpipelines which are specified by the wrapper elements p:group and p:catch. The subpipeline wrapped by p:group is the first to be evaluated. If a step in this pipeline raises an error, the outputs of the pipeline are discarded and the alternate subpipeline in p:catch is automatically executed.

p:choose includes at least one subpipeline which is specified by a p:when and a test attribute which is evaluated as a boolean value. If the value of the test attribute evaluates to true(), the subpipeline is executed. A p:choose can include one or more p:when branches. You can also specify a default branch with p:otherwise. This branch doesn't have a test attribute and is executed if no p:when is selected.

It applies to both p:try and p:choose that you can specify zero or more output ports for the subpipeline wrappers (p:group, p:catch, p:when, p:otherwise). However, the output ports of the alternate subpipelines must match (equal port name, primary/secondary and sequence values).

gimsieke commented 5 years ago

Sketches for choose and try