ToolJet/server
Akshay Sasidharan 131ff6a288 feat: Setup async workflow query execution with SSE
Overview
This PR implements real-time workflow execution monitoring using Server-Sent Events (SSE) as part of our LTS feature support. The implementation allows for tracking long-running workflows without requiring deployment changes.

Technical Changes
1. Server Components
Added WorkflowStreamService to manage persistent SSE streams with automatic cleanup
Implemented @sse endpoint in WorkflowExecutionsController for streaming status updates
Created WorkflowTriggersListener to emit workflow execution events with EventEmitter2
Added workflow execution status constants to identify different states in the execution lifecycle
2. Client-side Components
Implemented AsyncQueryHandler to manage SSE connections and parse event streams
Enhanced queryPanelSlice with methods to create async handlers and trigger workflows
Added support for non-blocking workflow execution with real-time status updates
3. Workflow Integration
Modified workflow triggering to use the SSE-based monitoring approach
Maintained same-server architecture to avoid deployment changes
Added automatic reconnection handling and error recovery for client connections
Architecture Decisions
Selected Same Server Approach: Chose to implement workflows within the same HTTP server to maintain the existing deployment setup for LTS users
Real-time Updates with SSE: Leveraged Server-Sent Events for their simplicity, efficiency, and compatibility with existing infrastructure
Future Extension Path: Implementation can be extended to Worker Threads or Microservice architecture later if needed
2025-07-01 19:17:07 +05:30
..
data-migrations Secure PAT for AppEmbeddings (#12899) 2025-06-27 12:18:25 +05:30
ee@61ab78568c feat: Setup async workflow query execution with SSE 2025-07-01 19:17:07 +05:30
lib Initial commit 2025-02-25 12:22:50 +05:30
migrations Secure PAT for AppEmbeddings (#12899) 2025-06-27 12:18:25 +05:30
scripts fix for plugin scripts (#13055) 2025-06-20 14:30:52 +05:30
src feat: Setup async workflow query execution with SSE 2025-07-01 19:17:07 +05:30
templates Initial commit 2025-02-25 12:22:50 +05:30
test Prevent Stringify Query Resolved Value (#12788) 2025-06-25 18:40:13 +05:30
.eslintignore Fix linting errors across the app (#785) 2021-09-21 19:18:28 +05:30
.eslintrc.js Initial commit 2025-02-25 12:22:50 +05:30
.gitignore Initial commit for nestjs 2021-07-08 11:10:27 +05:30
.node-version Revise node and npm version (#408) 2021-07-19 12:38:44 +05:30
.npmrc specify node and npm version for server (#405) 2021-07-19 08:48:59 +05:30
.version chore: version bump 2025-06-20 15:44:56 +05:30
data-migration-config.ts Node upgrade 18->22 (#12836) 2025-06-17 13:01:46 +05:30
jest.config.ts Prevent Stringify Query Resolved Value (#12788) 2025-06-25 18:40:13 +05:30
nest-cli.json Revamp: user journey emails (#9223) 2024-04-01 18:11:42 +05:30
ormconfig.ts Node upgrade 18->22 (#12836) 2025-06-17 13:01:46 +05:30
package-lock.json feat: trigger workflows with their name or id 2025-07-01 13:02:15 +05:30
package.json Adding Cloud plugin scripts (#12995) 2025-06-20 12:59:17 +05:30
README.md Initial commit for nestjs 2021-07-08 11:10:27 +05:30
tsconfig.build.json Fixed: tsconfig oauth build issue 2025-02-25 14:54:54 +05:30
tsconfig.json Initial commit 2025-02-25 12:22:50 +05:30

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.