From bf0e7e47be9220a4bdc64b3261a7205f24801c6f Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Tue, 7 Jan 2025 14:31:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E7=9A=84=E5=AD=97=E6=AE=B5=E7=94=A8=E4=BA=8E=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lanyuanxiaoyao/flowable/jpa/entity/FlowableInstance.java | 4 ++++ .../lanyuanxiaoyao/flowable/core/model/FlowableInstance.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/adapter/flowable-spring-boot-jpa-starter/src/main/java/com/lanyuanxiaoyao/flowable/jpa/entity/FlowableInstance.java b/adapter/flowable-spring-boot-jpa-starter/src/main/java/com/lanyuanxiaoyao/flowable/jpa/entity/FlowableInstance.java index 0cb6967..4cf13bf 100644 --- a/adapter/flowable-spring-boot-jpa-starter/src/main/java/com/lanyuanxiaoyao/flowable/jpa/entity/FlowableInstance.java +++ b/adapter/flowable-spring-boot-jpa-starter/src/main/java/com/lanyuanxiaoyao/flowable/jpa/entity/FlowableInstance.java @@ -52,12 +52,15 @@ public class FlowableInstance { @LastModifiedDate private LocalDateTime updatedTime; + private String extra; + @SneakyThrows public FlowableInstance(com.lanyuanxiaoyao.flowable.core.model.FlowableInstance instance) { this.instanceId = instance.getInstanceId(); this.metadata = objectToBytes(instance.getMetadata()); this.currentNodeId = instance.getCurrentNodeId(); this.status = instance.getStatus(); + this.extra = instance.getExtra(); } private static byte[] objectToBytes(Object object) throws IOException { @@ -86,6 +89,7 @@ public class FlowableInstance { .status(status) .createdTime(createdTime) .updatedTime(updatedTime) + .extra(extra) .build(); } } diff --git a/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/model/FlowableInstance.java b/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/model/FlowableInstance.java index 9566209..01cfac6 100644 --- a/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/model/FlowableInstance.java +++ b/flowable-core/src/main/java/com/lanyuanxiaoyao/flowable/core/model/FlowableInstance.java @@ -26,6 +26,8 @@ public class FlowableInstance { @Builder.Default private LocalDateTime updatedTime = LocalDateTime.now(); + private String extra; + public void addMetadata(Map metadata) { this.metadata.putAll(metadata); }