feat: Add procedure and function management in flow controller
- Introduced new endpoints in FlowController for listing procedures and retrieving procedure parameters, enhancing the flow management capabilities. - Updated FlowDataMoveService to support procedure calls during data movement, ensuring seamless integration with external and internal databases. - Enhanced NodeFlowExecutionService to execute procedure call actions, allowing for dynamic execution of stored procedures within flow nodes. - Updated frontend components to support procedure selection and parameter management, improving user experience in configuring flow steps. - Added necessary types and API functions for handling procedure-related data, ensuring type safety and clarity in implementation.
This commit is contained in:
@@ -269,6 +269,8 @@ export interface FlowNodeData {
|
||||
tableName?: string;
|
||||
count?: number;
|
||||
condition?: FlowConditionGroup;
|
||||
integrationType?: string;
|
||||
procedureName?: string;
|
||||
}
|
||||
|
||||
export interface FlowEdgeData {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// ==================== 연동 타입 ====================
|
||||
|
||||
export type FlowIntegrationType = "internal" | "external_db" | "rest_api" | "webhook" | "hybrid";
|
||||
export type FlowIntegrationType = "internal" | "external_db" | "procedure" | "rest_api" | "webhook" | "hybrid";
|
||||
|
||||
// ==================== 외부 DB 연결 ====================
|
||||
|
||||
@@ -66,8 +66,48 @@ export interface FlowExternalDbIntegrationConfig {
|
||||
customQuery?: string; // 커스텀 쿼리
|
||||
}
|
||||
|
||||
// 프로시저 호출 파라미터 정의
|
||||
export interface FlowProcedureParam {
|
||||
name: string;
|
||||
dataType: string;
|
||||
mode: "IN" | "OUT" | "INOUT";
|
||||
source: "record_field" | "static" | "step_variable";
|
||||
field?: string;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
// 프로시저 호출 설정
|
||||
export interface FlowProcedureConfig {
|
||||
type: "procedure";
|
||||
dbSource: "internal" | "external";
|
||||
connectionId?: number;
|
||||
procedureName: string;
|
||||
procedureSchema?: string;
|
||||
callType: "procedure" | "function";
|
||||
parameters: FlowProcedureParam[];
|
||||
}
|
||||
|
||||
// 프로시저/함수 목록 항목
|
||||
export interface ProcedureListItem {
|
||||
name: string;
|
||||
schema: string;
|
||||
type: "PROCEDURE" | "FUNCTION";
|
||||
returnType?: string;
|
||||
}
|
||||
|
||||
// 프로시저 파라미터 정보
|
||||
export interface ProcedureParameterInfo {
|
||||
name: string;
|
||||
position: number;
|
||||
dataType: string;
|
||||
mode: "IN" | "OUT" | "INOUT";
|
||||
defaultValue?: string;
|
||||
}
|
||||
|
||||
// 연동 설정 통합 타입
|
||||
export type FlowIntegrationConfig = FlowExternalDbIntegrationConfig;
|
||||
export type FlowIntegrationConfig =
|
||||
| FlowExternalDbIntegrationConfig
|
||||
| FlowProcedureConfig;
|
||||
|
||||
// ==================== 연동 로그 ====================
|
||||
|
||||
@@ -126,6 +166,7 @@ export const OPERATION_OPTIONS = [
|
||||
export const INTEGRATION_TYPE_OPTIONS = [
|
||||
{ value: "internal", label: "내부 DB (기본)" },
|
||||
{ value: "external_db", label: "외부 DB 연동" },
|
||||
{ value: "procedure", label: "프로시저/함수 호출" },
|
||||
{ value: "rest_api", label: "REST API 연동" },
|
||||
{ value: "webhook", label: "Webhook (추후 지원)" },
|
||||
{ value: "hybrid", label: "복합 연동 (추후 지원)" },
|
||||
|
||||
@@ -23,6 +23,7 @@ export type NodeType =
|
||||
| "emailAction" // 메일 발송 액션
|
||||
| "scriptAction" // 스크립트 실행 액션
|
||||
| "httpRequestAction" // HTTP 요청 액션
|
||||
| "procedureCallAction" // 프로시저/함수 호출 액션
|
||||
| "comment" // 주석
|
||||
| "log"; // 로그
|
||||
|
||||
@@ -705,6 +706,31 @@ export interface HttpRequestActionNodeData {
|
||||
};
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// 프로시저/함수 호출 노드
|
||||
// ============================================================================
|
||||
|
||||
export interface ProcedureCallActionNodeData {
|
||||
displayName?: string;
|
||||
|
||||
dbSource: "internal" | "external";
|
||||
connectionId?: number;
|
||||
connectionName?: string;
|
||||
|
||||
procedureName?: string;
|
||||
procedureSchema?: string;
|
||||
callType: "procedure" | "function";
|
||||
|
||||
parameters?: {
|
||||
name: string;
|
||||
dataType: string;
|
||||
mode: "IN" | "OUT" | "INOUT";
|
||||
source: "record_field" | "static" | "step_variable";
|
||||
field?: string;
|
||||
value?: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// 통합 노드 데이터 타입
|
||||
// ============================================================================
|
||||
@@ -725,6 +751,7 @@ export type NodeData =
|
||||
| EmailActionNodeData
|
||||
| ScriptActionNodeData
|
||||
| HttpRequestActionNodeData
|
||||
| ProcedureCallActionNodeData
|
||||
| CommentNodeData
|
||||
| LogNodeData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user