Step Vocabulary
The vocabulary of atomic steps is effectively unbounded; anything that implements the step API can be used as an atomic step. The vocabulary of compound steps, or containers, is limited to what the current version of JAFPL provides.
The pipeline
The pipeline
is the top-most object in your graph.
You can bind an arbitrary number of external inputs, outputs, and
options to it.
group
A group
is simply a container. It has no special
semantics.
choose/when
The choose
object takes one or more
when
objects. Each when
object has a guard
condition, “test”. When the choose
runs, each
when
’s test is evaluated in turn (in the order that they
were added to the choose). The first when
for which the
effective boolean value of the test is “true” is run. No other
when
runs. It is an error if no when
matches, so make sure you put a “true” condition at the end.
try/catch/finally
The try-catch
object takes a try
object, zero or more catch
objects, and, optionally,
a finally
object. Evaluation of the try
is
attempted. If that fails, its output is discarded and one of the
catch
branches is selected and run. In either case, the
finally
runs after the try/catch is otherwise finished.
For-each loop
A for-each
loop iterates over a sequence of inputs,
applying processing to each one.
For loop
A for
loop iterates a fixed number of times. (You
specify the start, which defaults to 1, the limit, and the increment,
which also defaults to 1).
while loop
A while
loop takes a single input and a tester.
If testing the input returns true, the loop is evaluated. The tested
input appears on the “current” port of the loop. The
body of the loop must write exactly one result to the “test” output
port of the loop. When the loop finishes, the result written to “test”
is tested again. Iteration continues until the test returns false.
until loop
An until
loop takes a single input and a comparator.
The body of the loop is evaluated once using the input as the
“current” input. The body of the loop must write exactly one
result to the “test” output port of the loop. When the loop finishes,
the comparator is passed the original input and the result.
If it returns true, the process begins again with the result as the new input.
viewport
A viewport
decomposes an input into a series of
fragments. How the fragment are constructed is determined by the
implementation. Each fragment is processed by the pipeline that the
viewport contains. The resulting collection of fragments (both the ones
selected for processing and the ones not selected) are stitched back together
to produce the result.