Node Types

Complete reference for all available workflow node types

DataSource

Initial data providers and event generators

Purpose

Generates tokens at regular intervals or receives external events. Entry point for all workflows.

Schema

{
  "nodeId": "source_1",
  "type": "DataSource",
  "displayName": "Event Source",
  "position": { "x": 100, "y": 100 },
  "outputs": [{
    "name": "output",
    "destinationNodeId": "next_node",
    "destinationInputName": "input"
  }],
  "fieldMappings": {
    "timestampField": "timestamp",
    "correlationIdField": "correlationId"
  }
}

Field Descriptions

FieldTypeDescription
nodeIdstringUnique identifier for this node
typestringMust be "DataSource"
displayNamestringHuman-readable name shown in UI
positionobjectX/Y coordinates for visual layout
outputsarrayConnections to downstream nodes
fieldMappingsobjectOptional mappings for timestamp/correlationId extraction

External Events Only

DataSource nodes in V3 are purely for receiving external events. They do not generate data internally. Events are injected via the External Event Queue and routed to the target DataSource ID.

ProcessNode

Data transformation and business logic

Purpose

Transforms incoming tokens using JavaScript formulas. Apply calculations, enrichment, filtering, or any data manipulation.

Schema

{
  "nodeId": "processor_1",
  "type": "ProcessNode",
  "displayName": "Calculate Total",
  "position": { "x": 400, "y": 100 },
  "inputs": [{
    "name": "input",
    "interface": { "type": "Any", "requiredFields": [] }
  }],
  "outputs": [{
    "name": "output",
    "destinationNodeId": "next_node",
    "destinationInputName": "input",
    "transformation": {
      "type": "transform",
      "formula": "({ ...token, total: token.data.price * token.data.quantity })"
    }
  }]
}

Formula Examples

Calculate field

({ ...token, discount: token.data.price * 0.1 })

Enrich with API data

({ ...token, category: token.data.productId.startsWith('ELEC') ? 'Electronics' : 'Other' })

Conditional transformation

({ ...token, status: token.data.amount > 1000 ? 'high-value' : 'standard' })

Aggregator

Token aggregation and batching

Purpose

Collects and combines tokens based on time windows or count thresholds. Supports sum, average, count, min, max aggregation methods.

Schema

{
  "nodeId": "aggregator_1",
  "type": "Aggregator",
  "displayName": "Hourly Sales Aggregation",
  "position": { "x": 400, "y": 100 },
  "capacity": 1000,
  "aggregation": {
    "method": "sum",
    "formula": "sum(tokens.map(t => t.data.amount))",
    "trigger": {
      "type": "time",
      "window": 3600
    }
  },
  "inputs": [{ "name": "input" }],
  "outputs": [{ "name": "aggregated_output" }]
}

Aggregation Methods

sum

Sum all numeric values

average

Calculate mean of values

count

Count number of tokens

min / max

Find minimum/maximum value

FSMProcessNode

Finite State Machine workflows

Purpose

Track business objects through their lifecycle states. Perfect for order management, document approval, support tickets, and more.

Schema

{
  "nodeId": "order_fsm",
  "type": "FSMProcessNode",
  "displayName": "Order Lifecycle",
  "position": { "x": 550, "y": 100 },
  "fsm": {
    "states": [
      { "name": "CREATED", "isInitial": true },
      { "name": "PAID", "isInitial": false },
      { "name": "SHIPPED", "isInitial": false },
      { "name": "DELIVERED", "isFinal": true }
    ],
    "transitions": [
      {
        "from": "CREATED",
        "to": "PAID",
        "trigger": "token_received",
        "condition": "token.data.paymentConfirmed === true"
      }
    ]
  },
  "inputs": [{ "name": "order_input" }],
  "outputs": [{ "name": "status_output" }]
}

Real-World Examples

Order Management

CREATED → PAID → SHIPPED → DELIVERED

Document Approval

DRAFT → REVIEW → APPROVED → PUBLISHED

Support Tickets

OPEN → ASSIGNED → ESCALATED → RESOLVED

Multiplexer

Token distribution and routing

Purpose

Routes tokens to multiple destinations using round-robin or weighted distribution strategies.

Schema

{
  "nodeId": "load_balancer",
  "type": "Multiplexer",
  "displayName": "Load Balancer",
  "position": { "x": 400, "y": 100 },
  "multiplexing": {
    "strategy": "round-robin",
    "weights": [1, 2, 1]
  },
  "inputs": [{ "name": "input" }],
  "outputs": [
    { "name": "output_1", "destinationNodeId": "worker_1" },
    { "name": "output_2", "destinationNodeId": "worker_2" }
  ]
}

Sink

Final storage and collection

Purpose

Collects and stores final output tokens. Acts as the terminal node for workflow branches.

Schema

{
  "nodeId": "final_sink",
  "type": "Sink",
  "displayName": "Completed Orders",
  "position": { "x": 1000, "y": 100 },
  "inputs": [{
    "name": "final_input",
    "interface": { "type": "Any", "requiredFields": [] }
  }]
}