From 3bb012457b3e284cdf18098d052c5a5fa08fb2d2 Mon Sep 17 00:00:00 2001 From: asp_ly Date: Sat, 14 Dec 2024 17:07:47 +0800 Subject: [PATCH] 1 --- .../dto/nodeConfig/BaseTaskNodeConfig.java | 8 + .../dto/nodeConfig/ScriptNodeConfig.java | 8 - .../db/migration/V1.0.1__init_data.sql | 873 ++++++++++-------- 3 files changed, 471 insertions(+), 418 deletions(-) diff --git a/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/BaseTaskNodeConfig.java b/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/BaseTaskNodeConfig.java index 55909f29..88680ad2 100644 --- a/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/BaseTaskNodeConfig.java +++ b/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/BaseTaskNodeConfig.java @@ -12,6 +12,14 @@ import java.util.Map; @Data public class BaseTaskNodeConfig extends BaseNodeConfig { + @SchemaProperty( + title = "执行委派者", + description = "执行委派者", + required = true, + defaultValue = "${shellTaskDelegate}" + ) + private String delegate; + // /** // * 任务优先级(0-100) // */ diff --git a/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/ScriptNodeConfig.java b/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/ScriptNodeConfig.java index bc50edd8..c7493416 100644 --- a/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/ScriptNodeConfig.java +++ b/backend/src/main/java/com/qqchen/deploy/backend/workflow/dto/nodeConfig/ScriptNodeConfig.java @@ -15,14 +15,6 @@ import java.util.Map; public class ScriptNodeConfig extends BaseTaskNodeConfig { - @SchemaProperty( - title = "执行委派者", - description = "执行委派者", - required = true, - defaultValue = "${shellTaskDelegate}" - ) - private String delegate; - /** * 脚本内容 */ diff --git a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql index db8f5ccf..a4772f07 100644 --- a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql +++ b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql @@ -671,431 +671,243 @@ VALUES }', 1); -- 任务节点 -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(3, NOW(), - 'system', - NOW(), - 'system', 'USER_TASK', '用户任务', '人工处理任务', 'TASK', '{ - "code": "USER_TASK", - "name": "用户任务", - "description": "人工处理任务", - "details": { - "description": "需要人工处理的任务节点,支持任务分配、表单填写、处理期限等功能", - "features": ["分配任务给指定用户或角色", "支持任务表单的填写", "设置处理期限和提醒", "支持任务的转办、委托、退回"], - "scenarios": ["审批流程", "表单填写", "人工审核", "数据确认"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "rect", - "size": {"width": 120, "height": 60}, - "style": { - "fill": "#ffffff", - "stroke": "#1890ff", - "strokeWidth": 2, - "icon": "user", - "iconColor": "#1890ff" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(4, NOW(), - 'system', - NOW(), - 'system', 'SERVICE_TASK', '服务任务', '系统服务调用', 'TASK', '{ - "code": "SERVICE_TASK", - "name": "服务任务", - "description": "系统服务调用", - "details": { - "description": "自动执行的系统服务任务,支持同步/异步调用外部服务和系统API", - "features": ["调用系统服务或外部接口", "执行自动化操作", "支持异步执行和结果回调", "数据转换和处理"], - "scenarios": ["调用外部系统API", "发送通知消息", "数据同步处理", "自动化操作"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "rect", - "size": {"width": 120, "height": 60}, - "style": { - "fill": "#ffffff", - "stroke": "#1890ff", - "strokeWidth": 2, - "icon": "api", - "iconColor": "#1890ff" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (3, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'USER_TASK', '用户任务', '人工处理任务', 'TASK', '{ +-- "code": "USER_TASK", +-- "name": "用户任务", +-- "description": "人工处理任务", +-- "details": { +-- "description": "需要人工处理的任务节点,支持任务分配、表单填写、处理期限等功能", +-- "features": ["分配任务给指定用户或角色", "支持任务表单的填写", "设置处理期限和提醒", "支持任务的转办、委托、退回"], +-- "scenarios": ["审批流程", "表单填写", "人工审核", "数据确认"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "rect", +-- "size": {"width": 120, "height": 60}, +-- "style": { +-- "fill": "#ffffff", +-- "stroke": "#1890ff", +-- "strokeWidth": 2, +-- "icon": "user", +-- "iconColor": "#1890ff" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1); +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (4, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'SERVICE_TASK', '服务任务', '系统服务调用', 'TASK', '{ +-- "code": "SERVICE_TASK", +-- "name": "服务任务", +-- "description": "系统服务调用", +-- "details": { +-- "description": "自动执行的系统服务任务,支持同步/异步调用外部服务和系统API", +-- "features": ["调用系统服务或外部接口", "执行自动化操作", "支持异步执行和结果回调", "数据转换和处理"], +-- "scenarios": ["调用外部系统API", "发送通知消息", "数据同步处理", "自动化操作"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "rect", +-- "size": {"width": 120, "height": 60}, +-- "style": { +-- "fill": "#ffffff", +-- "stroke": "#1890ff", +-- "strokeWidth": 2, +-- "icon": "api", +-- "iconColor": "#1890ff" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1); INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) VALUES (5, NOW(), 'system', NOW(), 'system', 'SCRIPT_TASK', '脚本任务', '脚本执行任务', 'TASK', '{ - "code": "SCRIPT_TASK", - "name": "脚本任务", - "description": "脚本执行任务", - "details": { - "description": "执行自定义脚本的任务节点,支持多种脚本语言和复杂的业务逻辑", - "features": ["执行自定义脚本代码", "支持多种脚本语言", "访问流程变量", "支持复杂的业务逻辑"], - "scenarios": ["数据处理和转换", "条件判断", "自定义业务规则", "系统集成"] + "code" : "SCRIPT_TASK", + "name" : "脚本任务", + "details" : { + "description" : "脚本执行任务", + "features" : [ ], + "scenarios" : [ ] }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"}, - "script": { - "type": "string", - "title": "脚本内容", - "description": "需要执行的脚本内容", - "format": "textarea" + "configSchema" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "title" : "节点Code", + "description" : "工作流节点的Code" }, - "language": { - "type": "string", - "title": "脚本语言", - "description": "脚本语言类型", - "default": "shell", - "enum": ["shell", "python", "javascript", "groovy"], - "enumNames": ["Shell脚本 (已支持)", "Python脚本 (开发中)", "JavaScript脚本 (开发中)", "Groovy脚本 (开发中)"] + "name" : { + "type" : "string", + "title" : "节点名称", + "description" : "工作流节点的显示名称" + }, + "description" : { + "type" : "string", + "title" : "节点描述", + "description" : "工作流节点的详细描述" + }, + "script" : { + "type" : "string", + "title" : "脚本内容", + "description" : "需要执行的脚本内容,例如:\n#!/bin/bash\necho \"开始执行脚本\"\nls -la\necho \"脚本执行完成\"", + "format" : "textarea" + }, + "language" : { + "type" : "string", + "title" : "脚本语言", + "description" : "脚本语言类型", + "default" : "shell", + "enum" : [ "shell", "python", "javascript", "groovy" ], + "enumNames" : [ "Shell脚本 (已支持)", "Python脚本 (开发中)", "JavaScript脚本 (开发中)", "Groovy脚本 (开发中)" ] + }, + "interpreter" : { + "type" : "string", + "title" : "解释器路径", + "description" : "脚本解释器的路径,例如:/bin/bash, /usr/bin/python3" + }, + "workingDirectory" : { + "type" : "string", + "title" : "工作目录", + "description" : "脚本执行的工作目录", + "default" : "/tmp" + }, + "environment" : { + "type" : "object", + "title" : "环境变量", + "description" : "脚本执行时的环境变量", + "additionalProperties" : { + "type" : "string" + } + }, + "successExitCode" : { + "type" : "integer", + "title" : "成功退出码", + "description" : "脚本执行成功时的退出码", + "default" : 0 + }, + "supportedLanguages" : { + "type" : "array", + "title" : "支持的脚本语言", + "enum" : [ "shell", "python", "javascript", "groovy" ], + "items" : { + "type" : "string" + } + }, + "delegate" : { + "type" : "string", + "title" : "执行委派者", + "description" : "执行委派者", + "default" : "$${shellTaskDelegate}" } }, - "required": ["code", "name", "script", "language"] + "required" : [ "code", "name", "script", "language", "interpreter", "delegate" ] }, - "uiSchema": { - "shape": "rect", - "size": {"width": 120, "height": 60}, - "style": { - "fill": "#ffffff", - "stroke": "#1890ff", - "strokeWidth": 2, - "icon": "code", - "iconColor": "#1890ff" + "uiSchema" : { + "shape" : "rect", + "size" : { + "width" : 120, + "height" : 60 }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" + "style" : { + "fill" : "#ffffff", + "stroke" : "#1890ff", + "strokeWidth" : 2, + "icon" : "code", + "iconColor" : "#1890ff" + }, + "ports" : { + "groups" : { + "in" : { + "position" : "left", + "attrs" : { + "circle" : { + "r" : 4, + "fill" : "#ffffff", + "stroke" : "#1890ff" } } }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); - --- 网关节点 -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(6, NOW(), - 'system', - NOW(), - 'system', 'EXCLUSIVE_GATEWAY', '排他网关', '条件分支控制', 'GATEWAY', '{ - "code": "EXCLUSIVE_GATEWAY", - "name": "排他网关", - "description": "条件分支控制", - "details": { - "description": "基于条件的分支控制,只会选择一个分支执行", - "features": ["根据条件选择一个分支执行", "支持复杂的条件表达式", "可以设置默认分支"], - "scenarios": ["条件判断", "分支选择", "业务规则路由"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "diamond", - "size": {"width": 50, "height": 50}, - "style": { - "fill": "#fff7e6", - "stroke": "#faad14", - "strokeWidth": 2, - "icon": "fork", - "iconColor": "#faad14" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(7, NOW(), - 'system', - NOW(), - 'system', 'PARALLEL_GATEWAY', '并行网关', '并行分支控制', 'GATEWAY', '{ - "code": "PARALLEL_GATEWAY", - "name": "并行网关", - "description": "并行分支控制", - "details": { - "description": "将流程分成多个并行分支同时执行,等待所有分支完成后合并", - "features": ["将流程分成多个并行分支", "等待所有分支完成后合并", "支持复杂的并行处理"], - "scenarios": ["并行审批", "多任务同时处理", "并行数据处理"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "diamond", - "size": {"width": 50, "height": 50}, - "style": { - "fill": "#fff7e6", - "stroke": "#faad14", - "strokeWidth": 2, - "icon": "branches", - "iconColor": "#faad14" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); - --- 容器节点 -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(8, NOW(), - 'system', - NOW(), - 'system', 'SUB_PROCESS', '子流程', '嵌入式子流程', 'CONTAINER', '{ - "code": "SUB_PROCESS", - "name": "子流程", - "description": "嵌入式子流程", - "details": { - "description": "在当前流程中嵌入子流程,支持流程的模块化和复用", - "features": ["在当前流程中嵌入子流程", "重用流程片段", "支持事务处理", "独立的变量范围"], - "scenarios": ["流程复用", "模块化处理", "事务管理", "错误处理"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "rect", - "size": {"width": 120, "height": 60}, - "style": { - "fill": "#ffffff", - "stroke": "#1890ff", - "strokeWidth": 2, - "icon": "apartment", - "iconColor": "#1890ff" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - } - } - } - } -}', 1); --- 容器节点 -INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) -VALUES -(9, NOW(), - 'system', - NOW(), - 'system', 'CALL_ACTIVITY', '调用活动', '外部流程调用', 'CONTAINER', '{ - "code": "CALL_ACTIVITY", - "name": "调用活动", - "description": "外部流程调用", - "details": { - "description": "调用外部定义的流程,支持跨系统流程调用和参数传递", - "features": ["调用外部定义的流程", "支持跨系统流程调用", "传递和接收参数", "支持异步调用"], - "scenarios": ["跨系统流程集成", "公共流程复用", "分布式流程处理", "大型流程解耦"] - }, - "configSchema": { - "type": "object", - "properties": { - "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, - "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, - "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} - }, - "required": ["code", "name"] - }, - "uiSchema": { - "shape": "rect", - "size": {"width": 120, "height": 60}, - "style": { - "fill": "#ffffff", - "stroke": "#1890ff", - "strokeWidth": 2, - "icon": "api", - "iconColor": "#1890ff" - }, - "ports": { - "groups": { - "in": { - "position": "left", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" - } - } - }, - "out": { - "position": "right", - "attrs": { - "circle": { - "r": 4, - "fill": "#ffffff", - "stroke": "#1890ff" + "out" : { + "position" : "right", + "attrs" : { + "circle" : { + "r" : 4, + "fill" : "#ffffff", + "stroke" : "#1890ff" } } } @@ -1103,3 +915,244 @@ VALUES } } }', 1); +-- +-- -- 网关节点 +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (6, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'EXCLUSIVE_GATEWAY', '排他网关', '条件分支控制', 'GATEWAY', '{ +-- "code": "EXCLUSIVE_GATEWAY", +-- "name": "排他网关", +-- "description": "条件分支控制", +-- "details": { +-- "description": "基于条件的分支控制,只会选择一个分支执行", +-- "features": ["根据条件选择一个分支执行", "支持复杂的条件表达式", "可以设置默认分支"], +-- "scenarios": ["条件判断", "分支选择", "业务规则路由"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "diamond", +-- "size": {"width": 50, "height": 50}, +-- "style": { +-- "fill": "#fff7e6", +-- "stroke": "#faad14", +-- "strokeWidth": 2, +-- "icon": "fork", +-- "iconColor": "#faad14" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1); +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (7, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'PARALLEL_GATEWAY', '并行网关', '并行分支控制', 'GATEWAY', '{ +-- "code": "PARALLEL_GATEWAY", +-- "name": "并行网关", +-- "description": "并行分支控制", +-- "details": { +-- "description": "将流程分成多个并行分支同时执行,等待所有分支完成后合并", +-- "features": ["将流程分成多个并行分支", "等待所有分支完成后合并", "支持复杂的并行处理"], +-- "scenarios": ["并行审批", "多任务同时处理", "并行数据处理"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "diamond", +-- "size": {"width": 50, "height": 50}, +-- "style": { +-- "fill": "#fff7e6", +-- "stroke": "#faad14", +-- "strokeWidth": 2, +-- "icon": "branches", +-- "iconColor": "#faad14" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1); +-- +-- -- 容器节点 +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (8, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'SUB_PROCESS', '子流程', '嵌入式子流程', 'CONTAINER', '{ +-- "code": "SUB_PROCESS", +-- "name": "子流程", +-- "description": "嵌入式子流程", +-- "details": { +-- "description": "在当前流程中嵌入子流程,支持流程的模块化和复用", +-- "features": ["在当前流程中嵌入子流程", "重用流程片段", "支持事务处理", "独立的变量范围"], +-- "scenarios": ["流程复用", "模块化处理", "事务管理", "错误处理"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "rect", +-- "size": {"width": 120, "height": 60}, +-- "style": { +-- "fill": "#ffffff", +-- "stroke": "#1890ff", +-- "strokeWidth": 2, +-- "icon": "apartment", +-- "iconColor": "#1890ff" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1); +-- -- 容器节点 +-- INSERT INTO workflow_node_definition (id, create_time, create_by, update_time, update_by, type, name, description, category, graph_config, enabled) +-- VALUES +-- (9, NOW(), +-- 'system', +-- NOW(), +-- 'system', 'CALL_ACTIVITY', '调用活动', '外部流程调用', 'CONTAINER', '{ +-- "code": "CALL_ACTIVITY", +-- "name": "调用活动", +-- "description": "外部流程调用", +-- "details": { +-- "description": "调用外部定义的流程,支持跨系统流程调用和参数传递", +-- "features": ["调用外部定义的流程", "支持跨系统流程调用", "传递和接收参数", "支持异步调用"], +-- "scenarios": ["跨系统流程集成", "公共流程复用", "分布式流程处理", "大型流程解耦"] +-- }, +-- "configSchema": { +-- "type": "object", +-- "properties": { +-- "code": {"type": "string", "title": "节点Code", "description": "工作流节点的Code"}, +-- "name": {"type": "string", "title": "节点名称", "description": "工作流节点的显示名称"}, +-- "description": {"type": "string", "title": "节点描述", "description": "工作流节点的详细描述"} +-- }, +-- "required": ["code", "name"] +-- }, +-- "uiSchema": { +-- "shape": "rect", +-- "size": {"width": 120, "height": 60}, +-- "style": { +-- "fill": "#ffffff", +-- "stroke": "#1890ff", +-- "strokeWidth": 2, +-- "icon": "api", +-- "iconColor": "#1890ff" +-- }, +-- "ports": { +-- "groups": { +-- "in": { +-- "position": "left", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- }, +-- "out": { +-- "position": "right", +-- "attrs": { +-- "circle": { +-- "r": 4, +-- "fill": "#ffffff", +-- "stroke": "#1890ff" +-- } +-- } +-- } +-- } +-- } +-- } +-- }', 1);