diff --git a/db/flowlong-mysql.sql b/db/flowlong-mysql.sql index 72042ecd..7ccbce38 100644 --- a/db/flowlong-mysql.sql +++ b/db/flowlong-mysql.sql @@ -210,6 +210,7 @@ CREATE TABLE `flw_ext_instance` `id` bigint NOT NULL COMMENT '主键ID', `tenant_id` varchar(50) COMMENT '租户ID', `process_id` bigint NOT NULL COMMENT '流程定义ID', + `process_name` varchar(100) COMMENT '流程名称', `process_type` varchar(100) COMMENT '流程类型', `model_content` text COMMENT '流程模型定义JSON内容', PRIMARY KEY (`id`) USING BTREE, diff --git a/db/flowlong-oracle.sql b/db/flowlong-oracle.sql index f03a8b90..b42c00a9 100644 --- a/db/flowlong-oracle.sql +++ b/db/flowlong-oracle.sql @@ -6,6 +6,7 @@ CREATE TABLE "flw_ext_instance" ( "id" NUMBER(20,0) NOT NULL, "tenant_id" NVARCHAR2(50), "process_id" NUMBER(20,0) NOT NULL, + "process_name" NVARCHAR2(100), "process_type" NVARCHAR2(100), "model_content" NCLOB ) @@ -23,6 +24,7 @@ DISABLE ROW MOVEMENT COMMENT ON COLUMN "flw_ext_instance"."id" IS '主键ID'; COMMENT ON COLUMN "flw_ext_instance"."tenant_id" IS '租户ID'; COMMENT ON COLUMN "flw_ext_instance"."process_id" IS '流程定义ID'; +COMMENT ON COLUMN "flw_ext_instance"."process_name" IS '流程名称'; COMMENT ON COLUMN "flw_ext_instance"."process_type" IS '流程类型'; COMMENT ON COLUMN "flw_ext_instance"."model_content" IS '流程模型定义JSON内容'; COMMENT ON TABLE "flw_ext_instance" IS '扩展流程实例表'; diff --git a/db/flowlong-postgresql.sql b/db/flowlong-postgresql.sql index da07cf77..a73bdb05 100644 --- a/db/flowlong-postgresql.sql +++ b/db/flowlong-postgresql.sql @@ -173,6 +173,7 @@ CREATE TABLE "public"."flw_ext_instance" ( "id" int8 NOT NULL, "tenant_id" varchar(50) COLLATE "pg_catalog"."default", "process_id" int8 NOT NULL, + "process_name" varchar(100) COLLATE "pg_catalog"."default", "process_type" varchar(100) COLLATE "pg_catalog"."default", "model_content" text COLLATE "pg_catalog"."default" ) @@ -180,6 +181,7 @@ CREATE TABLE "public"."flw_ext_instance" ( COMMENT ON COLUMN "public"."flw_ext_instance"."id" IS '主键ID'; COMMENT ON COLUMN "public"."flw_ext_instance"."tenant_id" IS '租户ID'; COMMENT ON COLUMN "public"."flw_ext_instance"."process_id" IS '流程定义ID'; +COMMENT ON COLUMN "public"."flw_ext_instance"."process_name" IS '流程名称'; COMMENT ON COLUMN "public"."flw_ext_instance"."process_type" IS '流程类型'; COMMENT ON COLUMN "public"."flw_ext_instance"."model_content" IS '流程模型定义JSON内容'; COMMENT ON TABLE "public"."flw_ext_instance" IS '扩展流程实例表'; diff --git a/flowlong-core/src/main/java/com/aizuda/bpm/engine/entity/FlwExtInstance.java b/flowlong-core/src/main/java/com/aizuda/bpm/engine/entity/FlwExtInstance.java index 9bd6920a..84307e04 100644 --- a/flowlong-core/src/main/java/com/aizuda/bpm/engine/entity/FlwExtInstance.java +++ b/flowlong-core/src/main/java/com/aizuda/bpm/engine/entity/FlwExtInstance.java @@ -37,6 +37,10 @@ public class FlwExtInstance implements ProcessModelCache, Serializable { * 流程定义ID */ private Long processId; + /** + * 流程定义名称(冗余业务直接可用) + */ + protected String processName; /** * 流程定义类型(冗余业务直接可用) */ @@ -54,6 +58,7 @@ public static FlwExtInstance of(FlwInstance flwInstance, FlwProcess flwProcess) ext.id = flwInstance.getId(); ext.tenantId = flwInstance.getTenantId(); ext.processId = flwInstance.getProcessId(); + ext.processName = flwProcess.getProcessName(); ext.processType = flwProcess.getProcessType(); ext.modelContent = flwProcess.getModelContent(); return ext;