IceIce
Home
  • Getting Started

    • Quick Start
    • Core Concepts
    • Architecture
  • SDK Guide

    • Java SDK
    • Go SDK
    • Python SDK
  • Reference

    • Node Types
    • Roam API
    • Server Config
    • Client Config
Playground
FAQ
  • Changelog
  • Upgrade Guide
Sponsor
Community
GitHub
  • English
  • 简体中文
Home
  • Getting Started

    • Quick Start
    • Core Concepts
    • Architecture
  • SDK Guide

    • Java SDK
    • Go SDK
    • Python SDK
  • Reference

    • Node Types
    • Roam API
    • Server Config
    • Client Config
Playground
FAQ
  • Changelog
  • Upgrade Guide
Sponsor
Community
GitHub
  • English
  • 简体中文
  • Reference

    • Node Types
    • Roam API
    • Server Config
    • Client Config

Node Type Reference

Relation Nodes

Relation nodes control how child nodes are executed and how results are aggregated. Each type has both serial and parallel versions.

Serial Relation Nodes

TypeExecutionChild returns trueChild returns falseNo children
ANDSequential, short-circuits on falseAll true -> trueAny false -> false (returns immediately)none
ANYSequential, short-circuits on trueAny true -> true (returns immediately)All false -> falsenone
ALLExecutes all, no short-circuitHas true and no false -> trueAny false -> falsenone
NONEExecutes allAlways returns noneAlways returns nonenone
TRUEExecutes allAlways returns trueAlways returns truetrue

Return Value Notes

  • When all child nodes return none, AND / ANY / ALL all return none
  • TRUE is the only relation node that returns true even with no children
  • none means "does not participate in evaluation" and is not equivalent to true or false

Parallel Relation Nodes

Each serial relation node has a corresponding parallel version that submits child nodes to a thread pool or goroutine pool for concurrent execution:

TypeConcurrency Strategy
ParallelAndExecutes all children concurrently. Returns early when any completes with false
ParallelAnyExecutes all children concurrently. Returns early when any completes with true
ParallelAllExecutes all children concurrently. Waits for all to complete before returning
ParallelNoneExecutes all children concurrently. Waits for all to complete, always returns none
ParallelTrueExecutes all children concurrently. Waits for all to complete, always returns true

Note

Child nodes of parallel nodes should not have data dependencies on each other. Each child node uses a shallow copy of the Roam; writing to the same key may cause race conditions.

Leaf Nodes

Leaf nodes are the terminal nodes that execute business logic.

TypeReturn ValuePurposeTypical Scenarios
Flowtrue / falseConditional checks that control flow directionAmount validation, level checks, time filtering, permission checks
Resulttrue / falseExecute business operations and return resultsIssue coupons, deduct inventory, send notifications, call external APIs
Nonenone (does not affect flow)Auxiliary operationsQuery user info, logging, data assembly, cache warming

Base Class Hierarchy

Leaf nodes provide three levels of base classes, progressively unwrapping the input parameter:

BaseLeaf (IceContext)
  +-- BaseLeafPack (IcePack)
        +-- BaseLeafRoam (IceRoam)  <-- most common
LanguageFlowResultNone
JavaBaseLeafRoamFlowBaseLeafRoamResultBaseLeafRoamNone
GoDoRoamFlow(ctx, roam)DoRoamResult(ctx, roam)DoRoamNone(ctx, roam)
Pythondo_roam_flow(roam)do_roam_result(roam)do_roam_none(roam)

Common Node Configuration

All nodes (both relation and leaf) share the following configurations:

ConfigurationDescriptionDefault
Time WindowEffective time range for the node. Nodes outside the window return none and are treated as non-existentUnrestricted
InverseInverts true to false and vice versa. none is not affectedfalse
Forward NodeWhen the forward node returns false, the main node is not executed and directly returns false. Semantically equivalent to an AND connectionNone
Error HandlingBehavior when a node throws an error: SHUT_DOWN (terminate flow) or return a specified state to continueSHUT_DOWN
Debug FlagWhether to record this node's execution information in processInfofalse

Execution Flow

Each node's process() method executes in the following order:

  1. Time window check -> Returns none if outside the window
  2. Forward node execution -> Refuses execution if forward node returns false
  3. Self logic execution -> Relation node traverses children / leaf node executes business logic
  4. Inverse processing -> If inverse is configured, flips true/false
  5. Error handling -> Handles exceptions according to the configured strategy
Edit this page on GitHub
Next
Roam API