Commit eb8f5e33 by huangfusuper

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

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