Building an n8n-Like Workflow Engine in Java | Multi-Record Data Flow | Part 12
Ansh
0:00 / 0:00
Building an n8n-Like Workflow Engine in Java | Multi-Record Data Flow | Part 12
61 просмотр · 2 нед. назад
Ansh
15 подписчиков
61 просмотр · 2 нед. назад
Part 12 of building an n8n-inspired workflow automation engine using Java and Spring Boot.
In this episode, I worked on multi-record data processing, NodeExecutionContext, and the MERGE node. The goal is to move beyond executing individual nodes and make the engine capable of passing collections of records through connected nodes while preserving the data needed by downstream steps.
WHAT I WORKED ON
NodeExecutionContext
Reviewed the execution context to support individual node outputs, multiple output records, flattened input fields, and separate input streams for MERGE operations.
Data Flow and Execution Metadata
Identified a potential issue where execution results could be stored alongside business data. Execution metadata and actual node output need to remain separate to avoid passing unintended data to downstream nodes.
TRANSFORM Node
Worked on extending TRANSFORM to process incoming records individually. The initial behavior converts message values to uppercase and stores the transformed records for downstream processing.
MERGE Node
Reviewed three planned merge modes:
APPEND combines records by placing one input's records after another.
COMBINE combines corresponding records by position or matching fields.
CHOOSE_BRANCH keeps records from a selected input.
PRACTICAL WORKFLOW
Manual Trigger → Sample Orders → Split Into Items → IF → Transform → Merge
The example processes four orders. Orders with amounts greater than 100 follow the high-value branch, where a 10% discount and uppercase customer names are intended. The remaining orders follow the standard branch. The MERGE node then combines the outputs.
Expected order amounts after processing are 225, 40, 162, and 75. The complete workflow still needs end-to-end verification in my implementation.
WHAT'S NEXT
Complete reliable multi-record propagation, separate execution metadata from business data, verify MERGE APPEND behavior, implement a basic SPLIT_OUT node, improve IF condition configuration, and make transformations more flexible.
TECH STACK
Java, Spring Boot, PostgreSQL, Spring Data JPA, Hibernate, REST APIs, ExecutorService, and a custom workflow execution engine.
I'm building this project in public to strengthen my backend engineering skills by solving practical implementation challenges and understanding how workflow automation engines work internally.
#Java #SpringBoot #BackendDevelopment #WorkflowAutomation #BuildInPublic #SoftwareEngineering