Designing processes with UI

In this section you will learn how to create Nussknacker processes using defined model. In the examples we'll use sample model that comes with Nussknacker distribution. You can find latest sources here.

If you want to learn how to develop your own model, please see API section

Global process properties

These include:

  • parallelism (see Flink docs)
  • checkpoint interval (see Flink docs)
  • should state be kept in memory, or should RocksDB be used (see Flink docs)
  • properties for configuring ExceptionHandler of model

Process variables

At beginning there is only one variable - input, contains single record for processing.


Currently expressions in Nussknacker can be written using Spring Expression Language. You can find extensive documentation here.

Basic nodes

Node works with data stream. It can produce, fetch, send, collect data or organize data flow.

Each node has at least two parameters: Id and Description. Id has to be unique in process. It identifies node usage. Description is just comment for node.

Depends on type, node could have input and output. Input if exists has to have exactly one assigned flow from another node. Output could have multiple flows, or none, or could have at least one obligatory.


Filter passes records which satisfies its condition. It can have one or two outputs. First output is for records satisfying the condition, second (optional) is for others. filter graph Records from source which meets condition go to true sink, and others go to false sink.

filter graph single

Records from source which meets condition go to blue sink, and others are filtered out.


filter window There are two parameters: Expression, and Disabled.

Expression is written in SpEL. Should be evaluated to logical value. Outgoing data flow depends on expression result.

Disabled has logical value. If is checked, expression isn't evaluated, and returns value true.


Has input and one or two outputs.

If there is one output, only outgoing pipe is named true, and each record which expression evaluates to true passes. Otherwise record is gone.

If there are two outputs, one pipe is named true and another false. Each record which expression evaluates to true goes to true pipe, and other record goes to false pipe.


It doesn't have additional parameters. Each output receives all records and processes them independently. split graph

Every record from source go to sink 1 and sink 2. filter window


Have at least one output. Each output has same record as input, so all outputs are identical.


Distributes incoming data between outputs. split graph Each record form source is tested against condition defined on edge. If color is blue record goes to blue sink. If color is green record goes to green sink. For every other value record goes to sink for others.


split graph

There are two important parameters Expression and exprVal. Expression contains expression which is evaluated for each record, and expression value is assigned to variable named like exprVal value.

In Switch node edges can be of one of two types.

split graph

Edge of Type Condition has Expression. Record go to first output which condition it matches.

split graph

There can be at most one edge of Type Default, and it gets all records that doesn't match to any Condition edge.


For each record from input switch Expression is evaluated and result is assigned to exprVal variable. After that records are tested against condition Expressions from output edges one by one. Record goes to first output which condition it satisfies. If record doesn't match any conditional output, and default output exists, record goes to default output. Otherwise mismatching record is filtered out.


Evaluates Expression, and assigns to Variable Name.

split graph

Doesn't change records flow. Have to have exactly one output. Variable once defined cannot be overwritten.

split graph

Map Variable

Defines new variable with one or more fields. Each field value is evaluated by using Expression.

split graph

Doesn't change records flow. MapVariable once defined cannot be overwritten.


Subprocesses let you abstract common used parts of process. See subprocesses for more detailed description of how they work.

Using custom transformers

Sometimes basic building blocks are not enough - you may want to code custom aggregations or other statuful processing in Flink. See below for more detailed guide:

results matching ""

    No results matching ""