1
0

调整核心类的创建方式

This commit is contained in:
2025-01-03 16:10:37 +08:00
parent 45ce5a2615
commit 743e2db17d
8 changed files with 76 additions and 91 deletions

View File

@@ -79,13 +79,13 @@ public class FlowableInstance {
@SneakyThrows
public com.lanyuanxiaoyao.flowable.core.model.FlowableInstance toFlowableInstance() {
return new com.lanyuanxiaoyao.flowable.core.model.FlowableInstance(
instanceId,
currentNodeId,
(FlowableMetadata) bytesToObject(this.metadata),
status,
createdTime,
updatedTime
);
return com.lanyuanxiaoyao.flowable.core.model.FlowableInstance.builder()
.instanceId(instanceId)
.currentNodeId(currentNodeId)
.metadata((FlowableMetadata) bytesToObject(this.metadata))
.status(status)
.createdTime(createdTime)
.updatedTime(updatedTime)
.build();
}
}

View File

@@ -66,8 +66,15 @@ public class FlowableNode {
}
public com.lanyuanxiaoyao.flowable.core.model.FlowableNode toFlowableNode() {
com.lanyuanxiaoyao.flowable.core.model.FlowableNode node = new com.lanyuanxiaoyao.flowable.core.model.FlowableNode(nodeId, name, description, type, handler, targets, null, createdTime);
node.setUpdatedTime(updateTime);
return node;
return com.lanyuanxiaoyao.flowable.core.model.FlowableNode.builder()
.nodeId(nodeId)
.name(name)
.description(description)
.type(type)
.handler(handler)
.targets(targets)
.createdTime(createdTime)
.updatedTime(updateTime)
.build();
}
}