workflow-terminate
A more powerful iteration directive that allows the user to compute when a workflow iteration should terminate.
The directive workflow-terminate indicates to Flow's orchestrator when a workflow should terminate.
The presence of this directive in a spreadsheet marks it as an iteration spreadsheet. A given workflow can only have one iteration spreadsheet. The iteration spreadsheet is executed by the orchestrator. The iteration pebble is executed before every workflow execution including the very first execution.
pebblestream:workflow-terminate:10This will execute the workflow no more than 10 times before stopping. This is a fail safe iteration upper bound to protect against endless looping if the terminating condition is not met. On each iteration the whole input set will be resubmitted unless workflow-filter is applied.
Currently, the fail safe iteration upper bound is hard coded. In a future release the number of remaining iterations could be derived from a cell reference.
This directive is not compatible withworkflow-iterateDo not place this directive in the same spreadsheet as
workflow-iterate
The power of workflow-terminate is that it evaluates the cells in the column it is placed. If any of the cells in that column contain the value TRUE, the workflow will terminate, similar to how pebblestream:stop works. This means that termination is computable; termination is a function of the worksheet formula in its column.
Look at the example below.
Updated 20 days ago

