PipeLoopExecutorValve

Valve for executing a Pipe in a loop.

Loop continues until one of the following conditions is fulfilled:

  • Executed flow returns an successful and empty response
  • Max number of iterations are reached (configurable value, default: 1)

Note: This valve was designed for generating unique strings like user ids and email addresses, based on a pattern and an incrementor value, where the incrementor value is incremented in the loop and the uniqueness of the resulting value is verified by calling a pipe. Other usage may or may not be possible.

Properties

Name Description Default value Mandatory Supports property expansion
pipe_id Id of pipe to execute Yes No
value Pattern for the value Yes Yes
param_name Name of value request parameter in pipe request Yes No
incrementor_name Name of item property holding the incrementor. The incrementor is stored on the item so that it can be used in value pattern. "incrementor" No No
incrementor_value Initial value of incrementor "0" No No
incrementor_step Number of steps to increment the incrementor on each iteration "1" No No
max_iterations Max number of iterations allowed "1" No No
dest Name of item property to receive the final value. Optional; if not set, the final value will not be set on the item. No No

Example Configuration

{
  "name": "PipeLoopExecutorValve", 
 "enabled": "true",
 "config": {
    "pipe_id": "validateEmail",
    "value": "{{request.first_name}}.{{request.last_name}}.{{incrementor}}@mycompany.com",
    "max_iterations": "5",
    "dest": "mail"
  }
}

Requirements