Skip to main content

Decision Blocks

Decision Blocks in cnips are used to evaluate conditions on incoming event data and determine the next step in the pipeline. They route data based on these conditions to specific transformations or destinations. They can be implemented using JavaScript or Go, they must return a boolean value (true/false) to ensure the pipeline continues; otherwise, the pipeline stops at that step.

How to create a new Decision Block

To create a Decision Block:

  1. Login to your cnips instance
  2. Click on Decision Blocks in the left navbar
  3. Click New Decision Block.

Decision Block Creation

  1. Provide a name for the Decision Block.
  2. Provide some configuration.
  3. Select the scripting language.
  4. Modify script.
  5. Make sure to return a boolean value in order to ensure that your pipeline processes it correctly.
  6. Click on sumbit.