Documentation

Transformation Nodes

Transformation nodes are responsible for reshaping data. They handle mathematical operations, string manipulation, variable management, and specific domain tasks like image processing.


Expression

The Expression node provides a secure sandbox to evaluate Python mathematical operations, logic, or string templating without writing full scripts.

Configuration

  • Expression: The Python snippet or string template. Examples: data.value + 1 (Math), Hello {{data.name}} (String Template).
  • Output Path: The specific key where the result should be stored in the data payload (e.g., data.calculated_score).

Filter

The Filter node is an explicit stop-gate. It evaluates a condition, and if the condition is false, the execution for that branch terminates immediately.

Configuration

  • Condition: A Python expression (e.g., data.score > 0.5).

Note: This differs from the Condition node, which is used for branching flow. The Filter node explicitly terminates flow if the condition fails.


Context / Variables

The ContextManager node allows you to persist data across different workflow executions by reading and writing to a persistent state store.

Configuration

  • Operation: Choose between Get, Set, Increment, Decrement, or Reset.
  • Scope:
    • Workflow: Variables isolated to this specific workflow instance.
    • Device: Variables shared across all workflows running on the same Edge Agent.
  • Variable Name: The key to store/retrieve.
  • Data Type & Value: When setting, you define whether the value is a String, Number, or Boolean.

Typical Use Case

Counting the total number of defective items seen over a shift, incrementing the counter on each execution execution, and retrieving it hourly.


Script

The Script node allows for total custom logic by executing standard Python code. It receives the current data object and must return it (modified) for downstream use.

Configuration

  • Python Code: The script editor. It expects a def main(data): signature.
# Example Script
def main(data):
    if "temperature" in data:
        data["celsius"] = (data["temperature"] - 32) * 5.0/9.0
    return data

Image Transform

The Image Transform node provides native computer vision processing directly in the workflow without requiring Python scripts.

Configuration

  • Input Image Path: The key containing the image reference (e.g., data.image).
  • Output Path: Where to store the transformed image (e.g., data.processed_image).
  • Processing Steps: A stack of operations you can apply in sequence:
    • Resize (Stretch): Basic width/height scaling.
    • Resize (Letterbox): Maintains aspect ratio, padding with a solid color.
    • Rotate: Rotates the image by a specified angle.