ToolJet/server/src/modules/workflows/interfaces/IWorkflowExecutionsService.ts
Devanshu Rastogi 2447a55e22
Fix: Workflow app crashes when user clicks on response node (#13217)
* Added controller and service for fetching logs and nodes seperately

* Add inifinte scroll pagination for workflow logs

* Fix "All Nodes" not renderd on Nodes column

* Fix reducer to append logs on Logs column

* Fix: incorrect code placement

* Fix reducer to append logs on Nodes column

* Prepend execution log on workflow run

* Fix node ordering

* Decouple logs panel from workflow editor

* Update execution nodes when log panel is opened

* Reset log selection on workflow run

* Added 'updatePreviewState' function

* Update ee-server submodule reference
2025-07-07 10:37:46 +05:30

62 lines
1.8 KiB
TypeScript

import { CreateWorkflowExecutionDto } from '@dto/create-workflow-execution.dto';
import { WorkflowExecution } from 'src/entities/workflow_execution.entity';
import { AppVersion } from 'src/entities/app_version.entity';
import { User } from 'src/entities/user.entity';
import { Response } from 'express';
import { QueryResult } from '@tooljet/plugins/dist/packages/common/lib';
import { WorkflowExecutionNode } from 'src/entities/workflow_execution_node.entity';
export interface IWorkflowExecutionsService {
create(createWorkflowExecutionDto: CreateWorkflowExecutionDto): Promise<WorkflowExecution>;
execute(
workflowExecution: WorkflowExecution,
params: Record<string, any>,
envId: string,
response: Response,
throwOnError?: boolean,
executionStartTime?: Date
): Promise<QueryResult>;
getStatus(id: string): Promise<{
logs: unknown;
status: boolean;
nodes: Array<{
id: string;
idOnDefinition: string;
executed: boolean;
result: unknown;
}>;
}>;
getWorkflowExecution(id: string): Promise<WorkflowExecution>;
listWorkflowExecutions(appVersionId: string): Promise<WorkflowExecution[]>;
findOne(id: string, relations?: string[]): Promise<WorkflowExecution>;
previewQueryNode(
queryId: string,
nodeId: string,
state: Record<string, any>,
appVersion: AppVersion,
user: User,
response: Response
): Promise<any>;
getWorkflowExecutionsLogs(appVersionId: string, page?: number, limit?: number): Promise<{
data: WorkflowExecution[];
page: number;
per_page: number;
total: number;
total_pages: number;
}>;
getWorkflowExecutionNodes(workflowExecutionId: string, page?: number, limit?: number): Promise<{
data: WorkflowExecutionNode[];
page: number;
per_page: number;
total: number;
total_pages: number;
}>;
}