This is an automated email from the ASF dual-hosted git repository.
jianbin pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push:
new 4bd9557ef5 bugfix: DesignerJson to StandardJson: SubStateMachine
CompensateState cannot be recognized (#6890)
4bd9557ef5 is described below
commit 4bd9557ef592416da8423867457673ddf2b48773
Author: MaoMaoandSnail <[email protected]>
AuthorDate: Tue Oct 8 14:20:19 2024 +0800
bugfix: DesignerJson to StandardJson: SubStateMachine CompensateState
cannot be recognized (#6890)
---
changes/en-us/2.x.md | 1 +
changes/zh-cn/2.x.md | 1 +
.../seata/saga/statelang/parser/utils/DesignerJsonTransformer.java | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 70b242675d..96d8512a2d 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -9,6 +9,7 @@ Add changes here for all PR submitted to the 2.x branch.
### bugfix:
- [[#6899](https://github.com/apache/incubator-seata/pull/6899)] fix file.conf
read failed after package
+- [[#6890](https://github.com/apache/incubator-seata/pull/6890)] fix
designerJson to standardJson: subStateMachine compensateState cannot be
recognized
### optimize:
- [[#6826](https://github.com/apache/incubator-seata/pull/6826)] remove the
branch registration operation of the XA read-only transaction
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index cbc9debeac..b100d18320 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -8,6 +8,7 @@
### bugfix:
- [[#6899](https://github.com/apache/incubator-seata/pull/6899)]
修复file.conf打包后的读取
+- [[#6890](https://github.com/apache/incubator-seata/pull/6890)]
修复saga设计json转标准json过程中: 子状态机补偿节点无法被识别
### optimize:
- [[#6826](https://github.com/apache/incubator-seata/pull/6826)]
移除只读XA事务的分支注册操作
diff --git
a/saga/seata-saga-statelang/src/main/java/org/apache/seata/saga/statelang/parser/utils/DesignerJsonTransformer.java
b/saga/seata-saga-statelang/src/main/java/org/apache/seata/saga/statelang/parser/utils/DesignerJsonTransformer.java
index d653b6708a..7a69c8b5c2 100644
---
a/saga/seata-saga-statelang/src/main/java/org/apache/seata/saga/statelang/parser/utils/DesignerJsonTransformer.java
+++
b/saga/seata-saga-statelang/src/main/java/org/apache/seata/saga/statelang/parser/utils/DesignerJsonTransformer.java
@@ -122,7 +122,7 @@ public class DesignerJsonTransformer {
machineJsonObject.put("StartState", targetStateId);
//Make sure 'StartState' is before 'States'
machineJsonObject.put("States",
machineJsonObject.remove("States"));
- } else if ("ServiceTask".equals(sourceType)) {
+ } else if ("ServiceTask".equals(sourceType) ||
"SubStateMachine".equals(sourceType)) {
if (targetNode != null &&
"Compensation".equals(targetNode.get("stateType"))) {
sourceState.put("CompensateState", targetStateId);
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]