反序列化问题。
This commit is contained in:
parent
631c048c95
commit
af8e3f6589
23
backend/.windsurfrules
Normal file
23
backend/.windsurfrules
Normal file
@ -0,0 +1,23 @@
|
||||
你是一名java高级开发工程师,对你有以下要求
|
||||
1. 缺陷修正:
|
||||
- 在提出修复建议前,应充分分析问题
|
||||
- 提供精准、有针对性的解决方案
|
||||
- 解释bug的根本原因
|
||||
|
||||
2. 保持简单:
|
||||
- 优先考虑可读性和可维护性
|
||||
- 避免过度工程化的解决方案
|
||||
- 尽可能使用标准库和模式
|
||||
- 遵循正确、最佳实践、DRY原则、无错误、功能齐全的代码编写原则
|
||||
|
||||
3. 代码更改:
|
||||
- 在做出改变之前提出一个清晰的计划
|
||||
- 一次将所有修改应用于单个文件
|
||||
- 请勿修改不相关的文件
|
||||
|
||||
4. 新增或者修改初始化数据
|
||||
- 新增或者修改数据库表需在V1.0.0__init_schema.sql、V1.0.1__init_data.sql中补充表结构和初始化数据,不要随意删除
|
||||
|
||||
|
||||
|
||||
记住要始终考虑每个项目的背景和特定需求。
|
||||
@ -112,7 +112,7 @@ public class WorkflowDefinitionApiController extends BaseController<WorkflowDefi
|
||||
}
|
||||
|
||||
WorkflowInstanceDTO instanceDTO = new WorkflowInstanceDTO();
|
||||
instanceDTO.setId(historicProcessInstance.getId());
|
||||
// instanceDTO.setId(historicProcessInstance.getId());
|
||||
instanceDTO.setProcessDefinitionId(historicProcessInstance.getProcessDefinitionId());
|
||||
instanceDTO.setBusinessKey(historicProcessInstance.getBusinessKey());
|
||||
instanceDTO.setStartTime(historicProcessInstance.getStartTime());
|
||||
@ -180,7 +180,7 @@ public class WorkflowDefinitionApiController extends BaseController<WorkflowDefi
|
||||
List<WorkflowInstanceDTO> instanceDTOs = historicProcessInstances.stream()
|
||||
.map(historicProcessInstance -> {
|
||||
WorkflowInstanceDTO instanceDTO = new WorkflowInstanceDTO();
|
||||
instanceDTO.setId(historicProcessInstance.getId());
|
||||
// instanceDTO.setId(historicProcessInstance.getId());
|
||||
instanceDTO.setProcessDefinitionId(historicProcessInstance.getProcessDefinitionId());
|
||||
instanceDTO.setBusinessKey(historicProcessInstance.getBusinessKey());
|
||||
instanceDTO.setStartTime(historicProcessInstance.getStartTime());
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import com.qqchen.deploy.backend.workflow.enums.WorkflowInstanceStatusEnums;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
@ -7,7 +8,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class WorkflowExecutionDTO {
|
||||
public class WorkflowExecutionDTO extends BaseDTO {
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkflowInstanceCreateDTO {
|
||||
public class WorkflowInstanceCreateDTO extends BaseDTO {
|
||||
private String processInstanceId;
|
||||
private String processDefinitionKey;
|
||||
private String businessKey;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import com.qqchen.deploy.backend.workflow.enums.WorkflowInstanceStatusEnums;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -9,9 +10,7 @@ import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Schema(description = "工作流实例信息")
|
||||
public class WorkflowInstanceDTO {
|
||||
@Schema(description = "实例ID")
|
||||
private String id;
|
||||
public class WorkflowInstanceDTO extends BaseDTO {
|
||||
|
||||
@Schema(description = "流程定义ID")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 执行人配置
|
||||
*/
|
||||
@Data
|
||||
public class AssigneeConfig {
|
||||
/**
|
||||
* 执行人ID
|
||||
*/
|
||||
private String assignee;
|
||||
|
||||
/**
|
||||
* 候选执行人列表
|
||||
*/
|
||||
private List<String> candidateUsers;
|
||||
|
||||
/**
|
||||
* 候选组列表
|
||||
*/
|
||||
private List<String> candidateGroups;
|
||||
|
||||
/**
|
||||
* 执行人表达式
|
||||
*/
|
||||
private String assigneeExpression;
|
||||
|
||||
/**
|
||||
* 候选人表达式
|
||||
*/
|
||||
private String candidateExpression;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 事件节点基础配置
|
||||
*/
|
||||
@Data
|
||||
public class BaseEventNodeConfig extends BaseNodeConfig {
|
||||
|
||||
}
|
||||
@ -1,60 +1,37 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener.ListenerConfig;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 基础节点配置
|
||||
* 事件节点基础配置
|
||||
*/
|
||||
@Data
|
||||
public class BaseNodeConfig {
|
||||
/**
|
||||
* 监听器配置列表
|
||||
*/
|
||||
|
||||
@SchemaProperty(
|
||||
title = "监听器配置",
|
||||
description = "工作流节点的事件监听器配置列表"
|
||||
title = "节点Code",
|
||||
description = "工作流节点的Code",
|
||||
required = true
|
||||
)
|
||||
private List<ListenerConfig> listeners;
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 是否异步
|
||||
* 节点名称
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否异步",
|
||||
description = "节点是否以异步方式执行",
|
||||
defaultValue = "false"
|
||||
title = "节点名称",
|
||||
description = "工作流节点的显示名称",
|
||||
required = true
|
||||
)
|
||||
private Boolean async;
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 是否独占
|
||||
* 节点描述
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否独占",
|
||||
description = "节点是否以独占方式执行",
|
||||
defaultValue = "true"
|
||||
title = "节点描述",
|
||||
description = "工作流节点的详细描述"
|
||||
)
|
||||
private Boolean exclusive;
|
||||
|
||||
/**
|
||||
* 自定义属性
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "自定义属性",
|
||||
description = "节点的自定义属性配置"
|
||||
)
|
||||
private Map<String, Object> customProperties;
|
||||
|
||||
/**
|
||||
* 文档说明
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "文档说明",
|
||||
description = "节点的详细文档说明"
|
||||
)
|
||||
private String documentation;
|
||||
private String description;
|
||||
}
|
||||
|
||||
@ -1,56 +1,17 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener.TaskListenerConfig;
|
||||
import com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener.ListenerNodeConfig;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 任务节点基础配置
|
||||
* 基础节点配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TaskConfig extends BaseNodeConfig {
|
||||
/**
|
||||
* 任务类型(如:userTask, serviceTask, scriptTask等)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务类型",
|
||||
description = "工作流节点的任务类型",
|
||||
required = true
|
||||
)
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务名称",
|
||||
description = "工作流节点的显示名称",
|
||||
required = true
|
||||
)
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 任务描述
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务描述",
|
||||
description = "工作流节点的详细描述"
|
||||
)
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否启用",
|
||||
description = "是否启用该任务节点",
|
||||
defaultValue = "true"
|
||||
)
|
||||
private Boolean enabled = true;
|
||||
public class BaseTaskNodeConfig extends BaseNodeConfig {
|
||||
|
||||
/**
|
||||
* 任务优先级(0-100)
|
||||
@ -124,47 +85,49 @@ public class TaskConfig extends BaseNodeConfig {
|
||||
private String retryStrategy;
|
||||
|
||||
/**
|
||||
* 执行人配置
|
||||
* 监听器配置列表
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "执行人配置",
|
||||
description = "工作流节点的执行人配置"
|
||||
title = "监听器配置",
|
||||
description = "工作流节点的事件监听器配置列表"
|
||||
)
|
||||
private AssigneeConfig assignee;
|
||||
private List<ListenerNodeConfig> listeners;
|
||||
|
||||
/**
|
||||
* 表单配置
|
||||
* 是否异步
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "表单配置",
|
||||
description = "工作流节点的表单配置"
|
||||
title = "是否异步",
|
||||
description = "节点是否以异步方式执行",
|
||||
defaultValue = "false"
|
||||
)
|
||||
private FormConfig form;
|
||||
private Boolean async;
|
||||
|
||||
/**
|
||||
* 任务输入变量
|
||||
* 是否独占
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务输入变量",
|
||||
description = "工作流节点的任务输入变量"
|
||||
title = "是否独占",
|
||||
description = "节点是否以独占方式执行",
|
||||
defaultValue = "true"
|
||||
)
|
||||
private Map<String, Object> inputVariables;
|
||||
private Boolean exclusive;
|
||||
|
||||
/**
|
||||
* 任务输出变量
|
||||
* 自定义属性
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务输出变量",
|
||||
description = "工作流节点的任务输出变量"
|
||||
title = "自定义属性",
|
||||
description = "节点的自定义属性配置"
|
||||
)
|
||||
private Map<String, Object> outputVariables;
|
||||
private Map<String, Object> customProperties;
|
||||
|
||||
/**
|
||||
* 任务特定的监听器配置
|
||||
* 文档说明
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "任务监听器配置",
|
||||
description = "工作流节点的任务特定监听器配置"
|
||||
title = "文档说明",
|
||||
description = "节点的详细文档说明"
|
||||
)
|
||||
private List<TaskListenerConfig> taskListeners;
|
||||
private String documentation;
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 结束节点配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EndEventConfig extends EventNodeConfig {
|
||||
/**
|
||||
* 结束类型(normal, terminate, error, etc.)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "结束类型",
|
||||
description = "工作流的结束类型",
|
||||
required = true,
|
||||
enumValues = {"NORMAL", "TERMINATE", "ERROR"},
|
||||
enumNames = {"正常结束", "强制终止", "错误结束"},
|
||||
defaultValue = "NORMAL"
|
||||
)
|
||||
private String terminateType;
|
||||
|
||||
/**
|
||||
* 错误代码(当terminateType为error时使用)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "错误代码",
|
||||
description = "当结束类型为错误结束时的错误代码",
|
||||
required = false
|
||||
)
|
||||
private String errorCode;
|
||||
|
||||
/**
|
||||
* 错误消息(当terminateType为error时使用)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "错误消息",
|
||||
description = "当结束类型为错误结束时的错误描述信息",
|
||||
required = false
|
||||
)
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 结束时的输出变量
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "输出变量",
|
||||
description = "工作流结束时的输出变量",
|
||||
required = false
|
||||
)
|
||||
private Map<String, Object> outputVariables;
|
||||
|
||||
/**
|
||||
* 是否终止所有活动分支
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "终止所有分支",
|
||||
description = "是否终止所有正在运行的并行分支",
|
||||
defaultValue = "false",
|
||||
required = false
|
||||
)
|
||||
private Boolean terminateAll;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 结束节点配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EndNodeConfig extends BaseEventNodeConfig {
|
||||
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 事件节点(如START、END)的基础配置
|
||||
*/
|
||||
@Data
|
||||
public class EventConfig {
|
||||
@SchemaProperty(
|
||||
title = "节点名称",
|
||||
description = "工作流节点的显示名称",
|
||||
required = true
|
||||
)
|
||||
@JsonProperty(required = true)
|
||||
private String name;
|
||||
|
||||
@SchemaProperty(
|
||||
title = "节点描述",
|
||||
description = "工作流节点的详细描述"
|
||||
)
|
||||
private String description;
|
||||
|
||||
@SchemaProperty(
|
||||
title = "事件类型",
|
||||
description = "工作流事件的类型",
|
||||
enumValues = {"message", "signal", "timer", "error"},
|
||||
enumNames = {"消息事件", "信号事件", "定时事件", "错误事件"}
|
||||
)
|
||||
private String eventType;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 事件节点基础配置
|
||||
*/
|
||||
@Data
|
||||
public class EventNodeConfig {
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "节点名称",
|
||||
description = "工作流节点的显示名称",
|
||||
required = true
|
||||
)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 节点描述
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "节点描述",
|
||||
description = "工作流节点的详细描述"
|
||||
)
|
||||
private String description;
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 表单配置
|
||||
*/
|
||||
@Data
|
||||
public class FormConfig {
|
||||
/**
|
||||
* 表单Key
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "表单Key",
|
||||
description = "表单的唯一标识",
|
||||
required = true
|
||||
)
|
||||
private String formKey;
|
||||
|
||||
/**
|
||||
* 表单属性
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "表单属性",
|
||||
description = "表单的配置属性"
|
||||
)
|
||||
private Map<String, Object> properties;
|
||||
|
||||
/**
|
||||
* 是否必填
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否必填",
|
||||
description = "表单是否必须填写",
|
||||
defaultValue = "true"
|
||||
)
|
||||
private Boolean required;
|
||||
|
||||
/**
|
||||
* 表单验证规则
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "验证规则",
|
||||
description = "表单字段的验证规则"
|
||||
)
|
||||
private Map<String, Object> validations;
|
||||
}
|
||||
@ -11,7 +11,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GitCloneConfig extends TaskConfig {
|
||||
public class GitCloneConfig extends BaseTaskNodeConfig {
|
||||
/**
|
||||
* 仓库URL
|
||||
*/
|
||||
@ -112,7 +112,4 @@ public class GitCloneConfig extends TaskConfig {
|
||||
)
|
||||
private Map<String, String> gitConfig;
|
||||
|
||||
public GitCloneConfig() {
|
||||
setTaskType("gitCloneTask");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.qqchen.deploy.backend.workflow.enums.NodeTypeEnums;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 节点类型配置
|
||||
*/
|
||||
@Data
|
||||
public class NodeTypeConfig {
|
||||
public class NodeTypeSchemaConfig<C extends BaseNodeConfig> {
|
||||
/**
|
||||
* 节点类型代码
|
||||
*/
|
||||
@ -17,7 +17,7 @@ public class NodeTypeConfig {
|
||||
description = "节点类型的唯一标识",
|
||||
required = true
|
||||
)
|
||||
private String code;
|
||||
private NodeTypeEnums code;
|
||||
|
||||
/**
|
||||
* 节点类型名称
|
||||
@ -45,5 +45,5 @@ public class NodeTypeConfig {
|
||||
title = "配置Schema",
|
||||
description = "节点类型的配置Schema定义"
|
||||
)
|
||||
private JsonNode configSchema;
|
||||
private C configSchema;
|
||||
}
|
||||
@ -11,7 +11,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ScriptExecutorConfig extends TaskConfig {
|
||||
public class ScriptNodeConfig extends BaseTaskNodeConfig {
|
||||
/**
|
||||
* 脚本内容
|
||||
*/
|
||||
@ -84,7 +84,4 @@ public class ScriptExecutorConfig extends TaskConfig {
|
||||
)
|
||||
private List<String> supportedLanguages;
|
||||
|
||||
public ScriptExecutorConfig() {
|
||||
setTaskType("scriptTask");
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 开始节点配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class StartEventConfig extends EventNodeConfig {
|
||||
/**
|
||||
* 触发器类型
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "触发器类型",
|
||||
description = "工作流的触发方式",
|
||||
enumValues = {"manual", "timer", "signal", "message"},
|
||||
enumNames = {"手动触发", "定时触发", "信号触发", "消息触发"}
|
||||
)
|
||||
private String triggerType;
|
||||
|
||||
/**
|
||||
* 表单Key(当需要启动表单时使用)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "表单Key",
|
||||
description = "启动表单的标识符"
|
||||
)
|
||||
private String formKey;
|
||||
|
||||
/**
|
||||
* 发起人
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "发起人",
|
||||
description = "工作流的发起人"
|
||||
)
|
||||
private String initiator;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 开始节点配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class StartNodeConfig extends BaseEventNodeConfig {
|
||||
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 任务监听器
|
||||
*/
|
||||
@Data
|
||||
public class TaskListener {
|
||||
/**
|
||||
* 监听器类型(如:class, expression, delegateExpression)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器类型",
|
||||
description = "监听器的实现类型",
|
||||
required = true,
|
||||
enumValues = {"class", "expression", "delegateExpression"},
|
||||
enumNames = {"Java类", "表达式", "代理表达式"}
|
||||
)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 监听器实现(类名、表达式或代理表达式)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器实现",
|
||||
description = "监听器的具体实现(类名、表达式或代理表达式)",
|
||||
required = true
|
||||
)
|
||||
private String implementation;
|
||||
|
||||
/**
|
||||
* 事件类型(create, assignment, complete, delete)
|
||||
*/
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* 监听器字段
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器字段",
|
||||
description = "监听器的配置字段"
|
||||
)
|
||||
private Map<String, Object> fields;
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 基础监听器配置
|
||||
*/
|
||||
@Data
|
||||
public class BaseListener {
|
||||
/**
|
||||
* 监听器类型(class, expression, delegateExpression)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器类型",
|
||||
description = "监听器的实现类型",
|
||||
required = true,
|
||||
enumValues = {"class", "expression", "delegateExpression"},
|
||||
enumNames = {"Java类", "表达式", "代理表达式"}
|
||||
)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 监听器实现(类名、表达式或代理表达式)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器实现",
|
||||
description = "监听器的具体实现(类名、表达式或代理表达式)",
|
||||
required = true
|
||||
)
|
||||
private String implementation;
|
||||
|
||||
/**
|
||||
* 监听器字段
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器字段",
|
||||
description = "监听器的配置字段"
|
||||
)
|
||||
private Map<String, Object> fields;
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 事件监听器
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EventListener extends TaskListener {
|
||||
/**
|
||||
* 事件类型
|
||||
* start: 事件开始
|
||||
* end: 事件结束
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件类型",
|
||||
description = "监听器的触发事件类型",
|
||||
required = true,
|
||||
enumValues = {"start", "end"},
|
||||
enumNames = {"事件开始", "事件结束"}
|
||||
)
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* 是否中断事件
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否中断事件",
|
||||
description = "事件触发后是否中断当前活动",
|
||||
defaultValue = "false"
|
||||
)
|
||||
private Boolean cancelActivity;
|
||||
|
||||
/**
|
||||
* 事件抛出的变量
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件变量",
|
||||
description = "事件触发时抛出的变量名"
|
||||
)
|
||||
private String eventVariable;
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 事件监听器配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EventListenerConfig extends ListenerConfig {
|
||||
/**
|
||||
* 事件类型
|
||||
* start: 事件开始
|
||||
* end: 事件结束
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件类型",
|
||||
description = "监听器的触发事件类型",
|
||||
required = true,
|
||||
enumValues = {"start", "end"},
|
||||
enumNames = {"事件开始", "事件结束"}
|
||||
)
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* 是否中断事件
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "是否中断事件",
|
||||
description = "事件触发后是否中断当前活动",
|
||||
defaultValue = "false"
|
||||
)
|
||||
private Boolean cancelActivity;
|
||||
|
||||
/**
|
||||
* 事件抛出的变量
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件变量",
|
||||
description = "事件触发时抛出的变量名"
|
||||
)
|
||||
private String eventVariable;
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 基础监听器配置
|
||||
*/
|
||||
@Data
|
||||
public class ListenerConfig {
|
||||
/**
|
||||
* 监听器类型(class, expression, delegateExpression)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器类型",
|
||||
description = "监听器的实现类型",
|
||||
required = true,
|
||||
enumValues = {"class", "expression", "delegateExpression"},
|
||||
enumNames = {"Java类", "表达式", "代理表达式"}
|
||||
)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 监听器实现(类名、表达式或代理表达式)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器实现",
|
||||
description = "监听器的具体实现(类名、表达式或代理表达式)",
|
||||
required = true
|
||||
)
|
||||
private String implementation;
|
||||
|
||||
/**
|
||||
* 监听器字段
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "监听器字段",
|
||||
description = "监听器的配置字段"
|
||||
)
|
||||
private Map<String, Object> fields;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 任务监听器配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TaskListener extends BaseListener {
|
||||
/**
|
||||
* 事件类型
|
||||
* create: 任务创建
|
||||
* assignment: 任务分配
|
||||
* complete: 任务完成
|
||||
* delete: 任务删除
|
||||
* update: 任务更新
|
||||
* timeout: 任务超时
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件类型",
|
||||
description = "任务监听器的触发事件类型",
|
||||
required = true,
|
||||
enumValues = {"create", "assignment", "complete", "delete", "update", "timeout"},
|
||||
enumNames = {"任务创建", "任务分配", "任务完成", "任务删除", "任务更新", "任务超时"}
|
||||
)
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* 任务相关的用户或组
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "执行人",
|
||||
description = "任务相关的用户或组标识"
|
||||
)
|
||||
private String assignee;
|
||||
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "优先级",
|
||||
description = "任务的优先级",
|
||||
minimum = 0,
|
||||
maximum = 100
|
||||
)
|
||||
private Integer priority;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.listener;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 任务监听器配置
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TaskListenerConfig extends ListenerConfig {
|
||||
/**
|
||||
* 事件类型
|
||||
* create: 任务创建
|
||||
* assignment: 任务分配
|
||||
* complete: 任务完成
|
||||
* delete: 任务删除
|
||||
* update: 任务更新
|
||||
* timeout: 任务超时
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "事件类型",
|
||||
description = "任务监听器的触发事件类型",
|
||||
required = true,
|
||||
enumValues = {"create", "assignment", "complete", "delete", "update", "timeout"},
|
||||
enumNames = {"任务创建", "任务分配", "任务完成", "任务删除", "任务更新", "任务超时"}
|
||||
)
|
||||
private String event;
|
||||
|
||||
/**
|
||||
* 任务相关的用户或组
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "执行人",
|
||||
description = "任务相关的用户或组标识"
|
||||
)
|
||||
private String assignee;
|
||||
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "优先级",
|
||||
description = "任务的优先级",
|
||||
minimum = 0,
|
||||
maximum = 100
|
||||
)
|
||||
private Integer priority;
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.script;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 脚本执行配置
|
||||
*/
|
||||
@Data
|
||||
public class ScriptExecutionConfig {
|
||||
/**
|
||||
* 脚本内容
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "脚本内容",
|
||||
description = "需要执行的脚本内容",
|
||||
required = true,
|
||||
format = "textarea"
|
||||
)
|
||||
private String script;
|
||||
|
||||
/**
|
||||
* 工作目录
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "工作目录",
|
||||
description = "脚本执行的工作目录",
|
||||
defaultValue = "/tmp"
|
||||
)
|
||||
private String workingDirectory;
|
||||
|
||||
/**
|
||||
* 超时时间(秒)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "超时时间",
|
||||
description = "脚本执行的最大时间(秒)",
|
||||
minimum = 1,
|
||||
maximum = 3600,
|
||||
defaultValue = "300"
|
||||
)
|
||||
private Integer timeout;
|
||||
|
||||
/**
|
||||
* 环境变量
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "环境变量",
|
||||
description = "脚本执行时的环境变量"
|
||||
)
|
||||
private Map<String, String> environment;
|
||||
|
||||
/**
|
||||
* 成功退出码
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "成功退出码",
|
||||
description = "脚本执行成功时的退出码",
|
||||
defaultValue = "0"
|
||||
)
|
||||
private Integer successExitCode;
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.script;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 脚本语言配置
|
||||
*/
|
||||
@Data
|
||||
public class ScriptLanguageConfig {
|
||||
/**
|
||||
* 脚本语言类型
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "脚本语言",
|
||||
description = "脚本的语言类型",
|
||||
required = true,
|
||||
enumValues = {"shell", "python", "javascript", "groovy"},
|
||||
enumNames = {"Shell脚本 (已支持)", "Python脚本 (开发中)", "JavaScript脚本 (开发中)", "Groovy脚本 (开发中)"},
|
||||
defaultValue = "shell"
|
||||
)
|
||||
private String language;
|
||||
|
||||
/**
|
||||
* 解释器路径
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "解释器路径",
|
||||
description = "脚本解释器的路径,例如:/bin/bash, /usr/bin/python3",
|
||||
required = true
|
||||
)
|
||||
private String interpreter;
|
||||
|
||||
/**
|
||||
* 支持的脚本语言列表
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "支持的语言",
|
||||
description = "系统支持的脚本语言列表",
|
||||
enumValues = {"shell", "python", "javascript", "groovy"}
|
||||
)
|
||||
private List<String> supportedLanguages;
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.dto.nodeConfig.script;
|
||||
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 脚本重试配置
|
||||
*/
|
||||
@Data
|
||||
public class ScriptRetryConfig {
|
||||
/**
|
||||
* 重试次数
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "重试次数",
|
||||
description = "脚本执行失败后的重试次数",
|
||||
minimum = 0,
|
||||
maximum = 10,
|
||||
defaultValue = "0"
|
||||
)
|
||||
private Integer retryTimes;
|
||||
|
||||
/**
|
||||
* 重试间隔(秒)
|
||||
*/
|
||||
@SchemaProperty(
|
||||
title = "重试间隔",
|
||||
description = "两次重试之间的等待时间(秒)",
|
||||
minimum = 1,
|
||||
maximum = 3600,
|
||||
defaultValue = "60"
|
||||
)
|
||||
private Integer retryInterval;
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package com.qqchen.deploy.backend.workflow.enums;
|
||||
|
||||
/**
|
||||
* 节点类型枚举
|
||||
*/
|
||||
public enum NodeTypeEnum {
|
||||
START_EVENT("START", "开始节点", "流程的开始节点"),
|
||||
END_EVENT("END", "结束节点", "流程的结束节点"),
|
||||
TASK("TASK", "任务节点", "通用任务节点"),
|
||||
SCRIPT_TASK("SCRIPT", "脚本执行器", "支持执行多种脚本语言(Shell、Python、JavaScript等)");
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
private final String description;
|
||||
|
||||
NodeTypeEnum(String code, String name, String description) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public static NodeTypeEnum fromCode(String code) {
|
||||
for (NodeTypeEnum type : values()) {
|
||||
if (type.getCode().equals(code)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown node type code: " + code);
|
||||
}
|
||||
}
|
||||
@ -1,31 +1,34 @@
|
||||
package com.qqchen.deploy.backend.workflow.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 节点类型枚举
|
||||
* @author cascade
|
||||
* @date 2024-12-11
|
||||
*/
|
||||
|
||||
@Getter
|
||||
public enum NodeTypeEnums {
|
||||
START_EVENT("startEvent"),
|
||||
END_EVENT("endEvent"),
|
||||
USER_TASK("userTask"),
|
||||
SERVICE_TASK("serviceTask"),
|
||||
SCRIPT_TASK("scriptTask"),
|
||||
EXCLUSIVE_GATEWAY("exclusiveGateway"),
|
||||
PARALLEL_GATEWAY("parallelGateway"),
|
||||
SUBPROCESS("subProcess"),
|
||||
CALL_ACTIVITY("callActivity");
|
||||
|
||||
START_EVENT("START_EVENT", "开始节点"),
|
||||
END_EVENT("END_EVENT", "结束节点"),
|
||||
USER_TASK("USER_TASK", "用户任务"),
|
||||
SERVICE_TASK("SERVICE_TASK", "服务任务"),
|
||||
SCRIPT_TASK("SCRIPT_TASK", "脚本任务"),
|
||||
EXCLUSIVE_GATEWAY("EXCLUSIVE_GATEWAY", "排他网关"),
|
||||
PARALLEL_GATEWAY("PARALLEL_GATEWAY", "并行网关"),
|
||||
SUBPROCESS("SUB_PROCESS", "子流程"),
|
||||
CALL_ACTIVITY("CALL_ACTIVITY", "调用活动");
|
||||
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
NodeTypeEnums(String value) {
|
||||
private final String description;
|
||||
|
||||
NodeTypeEnums(String value, String description) {
|
||||
this.value = value;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
public String getCode() {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ public class WorkflowInstanceServiceImpl implements IWorkflowInstanceService {
|
||||
.orElseThrow(() -> new RuntimeException("Workflow instance not found: " + processInstanceId));
|
||||
|
||||
WorkflowInstanceDTO dto = new WorkflowInstanceDTO();
|
||||
dto.setId(instance.getProcessInstanceId());
|
||||
// dto.setId(instance.getProcessInstanceId());
|
||||
dto.setProcessDefinitionId(String.valueOf(instance.getProcessDefinitionId()));
|
||||
dto.setBusinessKey(instance.getBusinessKey());
|
||||
dto.setStatus(instance.getStatus());
|
||||
|
||||
@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
||||
import com.qqchen.deploy.backend.workflow.dto.nodeConfig.*;
|
||||
import com.qqchen.deploy.backend.workflow.enums.NodeTypeEnums;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
@ -23,46 +24,45 @@ public class SchemaGenerator {
|
||||
public static JsonNode generateAllNodeTypeSchemas() {
|
||||
ObjectNode schemas = mapper.createObjectNode();
|
||||
|
||||
// 生成开始节点schema
|
||||
ObjectNode startNode = generateNodeSchema("START", "开始", "开始节点", StartEventConfig.class);
|
||||
schemas.set("START", startNode);
|
||||
|
||||
// 生成脚本节点schema
|
||||
ObjectNode scriptNode = generateNodeSchema("SCRIPT", "脚本执行", "执行脚本任务", ScriptExecutorConfig.class);
|
||||
schemas.set("SCRIPT", scriptNode);
|
||||
|
||||
// 生成Git克隆节点schema
|
||||
ObjectNode gitNode = generateNodeSchema("GIT_CLONE", "Git克隆", "克隆Git仓库", GitCloneConfig.class);
|
||||
schemas.set("GIT_CLONE", gitNode);
|
||||
|
||||
// 生成任务节点schema
|
||||
ObjectNode taskNode = generateNodeSchema("TASK", "任务", "执行任务", TaskConfig.class);
|
||||
schemas.set("TASK", taskNode);
|
||||
|
||||
// 生成事件节点schema
|
||||
ObjectNode eventNode = generateNodeSchema("EVENT", "事件", "事件节点", EventNodeConfig.class);
|
||||
schemas.set("EVENT", eventNode);
|
||||
|
||||
// 生成结束节点schema
|
||||
ObjectNode endNode = generateNodeSchema("END", "结束", "结束节点", EndEventConfig.class);
|
||||
schemas.set("END", endNode);
|
||||
// // 生成开始节点schema
|
||||
// ObjectNode startNode = generateNodeSchema("START", "开始", "开始节点", StartNodeConfig.class);
|
||||
// schemas.set("START", startNode);
|
||||
//
|
||||
// // 生成脚本节点schema
|
||||
// ObjectNode scriptNode = generateNodeSchema("SCRIPT", "脚本执行", "执行脚本任务", ScriptNodeConfig.class);
|
||||
// schemas.set("SCRIPT", scriptNode);
|
||||
//
|
||||
// // 生成Git克隆节点schema
|
||||
// ObjectNode gitNode = generateNodeSchema("GIT_CLONE", "Git克隆", "克隆Git仓库", GitCloneConfig.class);
|
||||
// schemas.set("GIT_CLONE", gitNode);
|
||||
//
|
||||
//
|
||||
// // 生成事件节点schema
|
||||
// ObjectNode eventNode = generateNodeSchema("EVENT", "事件", "事件节点", BaseEventNodeConfig.class);
|
||||
// schemas.set("EVENT", eventNode);
|
||||
//
|
||||
// // 生成结束节点schema
|
||||
// ObjectNode endNode = generateNodeSchema("END", "结束", "结束节点", EndNodeConfig.class);
|
||||
// schemas.set("END", endNode);
|
||||
|
||||
ObjectNode startNode = generateNodeSchema(NodeTypeEnums.START_EVENT, StartNodeConfig.class);
|
||||
schemas.set(NodeTypeEnums.START_EVENT.getCode(), startNode);
|
||||
ObjectNode scriptNode = generateNodeSchema(NodeTypeEnums.SCRIPT_TASK, ScriptNodeConfig.class);
|
||||
schemas.set(NodeTypeEnums.SCRIPT_TASK.getCode(), scriptNode);
|
||||
ObjectNode endNode = generateNodeSchema(NodeTypeEnums.END_EVENT, EndNodeConfig.class);
|
||||
schemas.set(NodeTypeEnums.END_EVENT.getCode(), endNode);
|
||||
return schemas;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成节点schema
|
||||
*/
|
||||
private static ObjectNode generateNodeSchema(String code, String name, String description, Class<?> configClass) {
|
||||
ObjectNode node = mapper.createObjectNode();
|
||||
node.put("code", code);
|
||||
node.put("name", name);
|
||||
node.put("description", description);
|
||||
|
||||
private static ObjectNode generateNodeSchema(NodeTypeEnums nodeType, Class<?> configClass) {
|
||||
NodeTypeSchemaConfig node = new NodeTypeSchemaConfig();
|
||||
node.setCode(nodeType);
|
||||
node.setDescription(nodeType.getDescription());
|
||||
ObjectNode schema = generateConfigSchema(configClass);
|
||||
node.set("configSchema", schema);
|
||||
|
||||
return node;
|
||||
return schema;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -4,7 +4,7 @@ spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/deploy-ease-platform?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
|
||||
username: root
|
||||
password: ServBay.dev
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jpa:
|
||||
hibernate:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user