Commit eb8f5e33 by huangfusuper

工作流表实例表等待实例表增加扩展配置

parent 0146bb45
...@@ -149,6 +149,7 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -149,6 +149,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
private Flow saveFlow(PluginFlow pluginFlow, Integer workspaceId, boolean isInnner) throws Exception { private Flow saveFlow(PluginFlow pluginFlow, Integer workspaceId, boolean isInnner) throws Exception {
Flow flow = new Flow(); Flow flow = new Flow();
flow.setExtendedConfiguration(pluginFlow.getConfig().getExtendedConfiguration());
flow.setFlowName(pluginFlow.getName()); flow.setFlowName(pluginFlow.getName());
flow.setIsInner(isInnner ? "0" : "1"); flow.setIsInner(isInnner ? "0" : "1");
flow.setFlowNodeCount(pluginFlow.getNodeList().size()); flow.setFlowNodeCount(pluginFlow.getNodeList().size());
...@@ -1457,6 +1458,7 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -1457,6 +1458,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//设置为是当前版本的工作流 //设置为是当前版本的工作流
flowVersion.setVersionMark(FlowPropertyEnum.IS_CURRENTVERSION.getCode()); flowVersion.setVersionMark(FlowPropertyEnum.IS_CURRENTVERSION.getCode());
flowVersion.setAddTime(currentDate); flowVersion.setAddTime(currentDate);
flowVersion.setExtendedConfiguration(flow.getExtendedConfiguration());
flowVersionMapper.insertSelective(flowVersion); flowVersionMapper.insertSelective(flowVersion);
//查询在调度上的节点 //查询在调度上的节点
......
...@@ -157,6 +157,12 @@ public class Flow implements Serializable { ...@@ -157,6 +157,12 @@ public class Flow implements Serializable {
private String scanMark; private String scanMark;
/** /**
* 扩展配置
*/
@ApiModelProperty("扩展配置")
private String extendedConfiguration;
/**
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -134,6 +134,12 @@ public class FlowVersion implements Serializable { ...@@ -134,6 +134,12 @@ public class FlowVersion implements Serializable {
private String isInner; private String isInner;
/** /**
* 扩展配置
*/
@ApiModelProperty("扩展配置")
private String extendedConfiguration;
/**
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -172,6 +172,12 @@ public class RunRecording implements Serializable { ...@@ -172,6 +172,12 @@ public class RunRecording implements Serializable {
private Integer stopCount; private Integer stopCount;
/** /**
* 扩展配置
*/
@ApiModelProperty("扩展配置")
private String extendedConfiguration;
/**
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -120,6 +120,12 @@ public class WaitingRecord implements Serializable { ...@@ -120,6 +120,12 @@ public class WaitingRecord implements Serializable {
@ApiModelProperty("工作空间id") @ApiModelProperty("工作空间id")
private Integer workspaceId; private Integer workspaceId;
/**
* 扩展配置
*/
@ApiModelProperty("扩展配置")
private String extendedConfiguration;
/** /**
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -71,6 +71,8 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis ...@@ -71,6 +71,8 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
build.setTriggerTime(flow.getTriggerNextTime()); build.setTriggerTime(flow.getTriggerNextTime());
runRecordingService.saveRunRecording(build); runRecordingService.saveRunRecording(build);
boolean isScheduleFollow = "1".equals(flow.getScheduleFollow()); boolean isScheduleFollow = "1".equals(flow.getScheduleFollow());
log.info("-------------【开始保存节点信息,任务是否为跟随工作流,{}】---------------",isScheduleFollow); log.info("-------------【开始保存节点信息,任务是否为跟随工作流,{}】---------------",isScheduleFollow);
List<JobTask> jobTasks = new ArrayList<>(32); List<JobTask> jobTasks = new ArrayList<>(32);
......
...@@ -26,12 +26,13 @@ ...@@ -26,12 +26,13 @@
<result column="schedule_follow" jdbcType="CHAR" property="scheduleFollow" /> <result column="schedule_follow" jdbcType="CHAR" property="scheduleFollow" />
<result column="is_update" jdbcType="CHAR" property="isUpdate" /> <result column="is_update" jdbcType="CHAR" property="isUpdate" />
<result column="scan_mark" jdbcType="CHAR" property="scanMark" /> <result column="scan_mark" jdbcType="CHAR" property="scanMark" />
<result column="extended_configuration" jdbcType="VARCHAR" property="extendedConfiguration" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
flow_id, alarm_email, exec_type, flow_cron, flow_desc, flow_name, flow_node_count, flow_id, alarm_email, exec_type, flow_cron, flow_desc, flow_name, flow_node_count,
flow_timeout, is_inner, alarml_action, priority, trigger_next_time, workspace_id, flow_timeout, is_inner, alarml_action, priority, trigger_next_time, workspace_id,
author, add_time, start_up, principal, version_name, repeat_count, remaining_count, author, add_time, start_up, principal, version_name, repeat_count, remaining_count,
schedule_follow, is_update, scan_mark schedule_follow, is_update, scan_mark, extended_configuration
</sql> </sql>
<select id="findAllByThisDayFlow" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto"> <select id="findAllByThisDayFlow" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto">
...@@ -205,6 +206,9 @@ ...@@ -205,6 +206,9 @@
<if test="scanMark != null"> <if test="scanMark != null">
scan_mark, scan_mark,
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -277,6 +281,9 @@ ...@@ -277,6 +281,9 @@
<if test="scanMark != null"> <if test="scanMark != null">
#{scanMark,jdbcType=CHAR}, #{scanMark,jdbcType=CHAR},
</if> </if>
<if test="extendedConfiguration != null">
#{extendedConfiguration,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByIdSelective" parameterType="com.byit.model.Flow"> <update id="updateByIdSelective" parameterType="com.byit.model.Flow">
...@@ -349,6 +356,10 @@ ...@@ -349,6 +356,10 @@
<if test="scanMark != null"> <if test="scanMark != null">
scan_mark = #{scanMark,jdbcType=CHAR}, scan_mark = #{scanMark,jdbcType=CHAR},
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration = #{extendedConfiguration,jdbcType=VARCHAR},
</if>
</set> </set>
where flow_id = #{flowId,jdbcType=INTEGER} where flow_id = #{flowId,jdbcType=INTEGER}
</update> </update>
......
...@@ -23,12 +23,13 @@ ...@@ -23,12 +23,13 @@
<result column="principal" jdbcType="VARCHAR" property="principal" /> <result column="principal" jdbcType="VARCHAR" property="principal" />
<result column="version_name" jdbcType="VARCHAR" property="versionName" /> <result column="version_name" jdbcType="VARCHAR" property="versionName" />
<result column="is_inner" jdbcType="CHAR" property="isInner" /> <result column="is_inner" jdbcType="CHAR" property="isInner" />
<result column="extended_configuration" jdbcType="VARCHAR" property="extendedConfiguration" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-31 --> <!-- generated @mbg.generated date: 2019-12-31 -->
flow_version_id, add_time, alarm_email, exec_type, flow_cron, flow_desc, flow_id, flow_version_id, add_time, alarm_email, exec_type, flow_cron, flow_desc, flow_id,
flow_name, flow_node_count, alarml_action, schedule_follow, priority, remove_mark, flow_name, flow_node_count, alarml_action, schedule_follow, priority, remove_mark,
repeat_count, version_mark, workspace_id, author, principal, version_name, is_inner repeat_count, version_mark, workspace_id, author, principal, version_name, is_inner,extended_configuration
</sql> </sql>
<select id="findAllByFlowId" resultMap="BaseResultMap"> <select id="findAllByFlowId" resultMap="BaseResultMap">
...@@ -139,6 +140,9 @@ ...@@ -139,6 +140,9 @@
<if test="isInner != null"> <if test="isInner != null">
is_inner, is_inner,
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="flowVersionId != null"> <if test="flowVersionId != null">
...@@ -201,6 +205,9 @@ ...@@ -201,6 +205,9 @@
<if test="isInner != null"> <if test="isInner != null">
#{isInner,jdbcType=CHAR}, #{isInner,jdbcType=CHAR},
</if> </if>
<if test="extendedConfiguration != null">
#{extendedConfiguration,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByIdSelective" parameterType="com.byit.model.FlowVersion"> <update id="updateByIdSelective" parameterType="com.byit.model.FlowVersion">
...@@ -264,6 +271,9 @@ ...@@ -264,6 +271,9 @@
<if test="isInner != null"> <if test="isInner != null">
is_inner = #{isInner,jdbcType=CHAR}, is_inner = #{isInner,jdbcType=CHAR},
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration = #{extendedConfiguration,jdbcType=VARCHAR},
</if>
</set> </set>
where flow_version_id = #{flowVersionId,jdbcType=INTEGER} where flow_version_id = #{flowVersionId,jdbcType=INTEGER}
</update> </update>
......
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
<result column="workspace_id" jdbcType="INTEGER" property="workspaceId" /> <result column="workspace_id" jdbcType="INTEGER" property="workspaceId" />
<result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" /> <result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" />
<result column="stop_count" jdbcType="INTEGER" property="stopCount" /> <result column="stop_count" jdbcType="INTEGER" property="stopCount" />
<result column="extended_configuration" jdbcType="VARCHAR" property="extendedConfiguration" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
recording_id, run_id, alarm_email, dispatch_ip, flow_name, flow_run_result, flow_status, recording_id, run_id, alarm_email, dispatch_ip, flow_name, flow_run_result, flow_status,
flow_timeout, flow_version_name, alarml_action, priority, trigger_time, principal, flow_timeout, flow_version_name, alarml_action, priority, trigger_time, principal,
flow_id, start_time, end_time, is_alarm,is_inner,fail_fast, flow_node_count, schedule_type, operator, re_run_id flow_id, start_time, end_time, is_alarm,is_inner,fail_fast, flow_node_count, schedule_type, operator, re_run_id
,workspace_id, repeat_time, stop_count ,workspace_id, repeat_time, stop_count,extended_configuration
</sql> </sql>
<select id="findThisDayRunRecording" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto"> <select id="findThisDayRunRecording" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto">
...@@ -461,6 +462,9 @@ ...@@ -461,6 +462,9 @@
<if test="stopCount != null"> <if test="stopCount != null">
stop_count, stop_count,
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordingId != null"> <if test="recordingId != null">
...@@ -541,6 +545,9 @@ ...@@ -541,6 +545,9 @@
<if test="stopCount != null"> <if test="stopCount != null">
#{stopCount,jdbcType=VARCHAR}, #{stopCount,jdbcType=VARCHAR},
</if> </if>
<if test="extendedConfiguration != null">
#{extendedConfiguration,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateRunRecordingById" parameterType="com.byit.model.RunRecording"> <update id="updateRunRecordingById" parameterType="com.byit.model.RunRecording">
...@@ -621,6 +628,9 @@ ...@@ -621,6 +628,9 @@
<if test="stopCount != null"> <if test="stopCount != null">
stop_count = #{stopCount,jdbcType=VARCHAR}, stop_count = #{stopCount,jdbcType=VARCHAR},
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration = #{extendedConfiguration,jdbcType=VARCHAR},
</if>
</set> </set>
where recording_id = #{recordingId,jdbcType=INTEGER} where recording_id = #{recordingId,jdbcType=INTEGER}
</update> </update>
...@@ -703,6 +713,9 @@ ...@@ -703,6 +713,9 @@
<if test="stopCount != null"> <if test="stopCount != null">
stop_count = #{stopCount,jdbcType=VARCHAR}, stop_count = #{stopCount,jdbcType=VARCHAR},
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration = #{extendedConfiguration,jdbcType=VARCHAR},
</if>
</set> </set>
where flow_id = #{flowId,jdbcType=INTEGER} and run_id = #{runId,jdbcType=VARCHAR} where flow_id = #{flowId,jdbcType=INTEGER} and run_id = #{runId,jdbcType=VARCHAR}
</update> </update>
......
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
<result column="run_id" jdbcType="VARCHAR" property="runId" /> <result column="run_id" jdbcType="VARCHAR" property="runId" />
<result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" /> <result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" />
<result column="workspace_id" jdbcType="INTEGER" property="workspaceId" /> <result column="workspace_id" jdbcType="INTEGER" property="workspaceId" />
<result column="extended_configuration" jdbcType="VARCHAR" property="extendedConfiguration" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2020-03-12 --> <!-- generated @mbg.generated date: 2020-03-12 -->
wait_id, flow_id, flow_name, flow_version_name, flow_timeout, alarm_email, alarml_action, wait_id, flow_id, flow_name, flow_version_name, flow_timeout, alarm_email, alarml_action,
priority, trigger_time, principal, is_inner, flow_node_count, schedule_type, `operator`, priority, trigger_time, principal, is_inner, flow_node_count, schedule_type, `operator`,
wait_order, run_id, repeat_time, workspace_id wait_order, run_id, repeat_time, workspace_id, extended_configuration
</sql> </sql>
<select id="findAllByCondition" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto"> <select id="findAllByCondition" resultMap="BaseResultMap" parameterType="com.byit.dto.StatisticsConditionDto">
...@@ -149,6 +150,9 @@ ...@@ -149,6 +150,9 @@
<if test="workspaceId != null"> <if test="workspaceId != null">
workspace_id, workspace_id,
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="waitId != null"> <if test="waitId != null">
...@@ -205,6 +209,9 @@ ...@@ -205,6 +209,9 @@
<if test="workspaceId != null"> <if test="workspaceId != null">
#{workspaceId,jdbcType=INTEGER}, #{workspaceId,jdbcType=INTEGER},
</if> </if>
<if test="extendedConfiguration != null">
#{extendedConfiguration,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByIdSelective" parameterType="com.byit.model.WaitingRecord"> <update id="updateByIdSelective" parameterType="com.byit.model.WaitingRecord">
...@@ -262,6 +269,10 @@ ...@@ -262,6 +269,10 @@
<if test="workspaceId != null"> <if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=INTEGER}, workspace_id = #{workspaceId,jdbcType=INTEGER},
</if> </if>
<if test="extendedConfiguration != null">
extended_configuration = #{extendedConfiguration,jdbcType=VARCHAR},
</if>
</set> </set>
where wait_id = #{waitId,jdbcType=INTEGER} where wait_id = #{waitId,jdbcType=INTEGER}
</update> </update>
......
package com.byit.dto.plugin; package com.byit.dto.plugin;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -63,4 +64,9 @@ public class PluginFlowConfig { ...@@ -63,4 +64,9 @@ public class PluginFlowConfig {
*/ */
private Long flowTimeout; private Long flowTimeout;
/**
* 扩展配置
*/
private String extendedConfiguration;
} }
...@@ -164,6 +164,12 @@ public class RunRecording implements Serializable { ...@@ -164,6 +164,12 @@ public class RunRecording implements Serializable {
private String repeatTime; private String repeatTime;
/** /**
* 扩展配置
*/
@ApiModelProperty("扩展配置")
private String extendedConfiguration;
/**
*/ */
private static final long serialVersionUID = 2L; private static final long serialVersionUID = 2L;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment