Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: DesignerJson to StandardJson: SubStateMachine CompensateState cannot be recognized #6873

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ protected StateMachineInstance forwardInternal(String stateMachineInstId, Map<St
if (replaceParams != null) {
contextVariables.putAll(replaceParams);
}
putBusinesskeyToContextariables(stateMachineInstance, contextVariables);
putBusinessKeyToContextVariables(stateMachineInstance, contextVariables);

ConcurrentHashMap<String, Object> concurrentContextVariables = new ConcurrentHashMap<>(contextVariables.size());
nullSafeCopy(contextVariables, concurrentContextVariables);
Expand Down Expand Up @@ -508,7 +508,7 @@ public StateMachineInstance compensateInternal(String stateMachineInstId, Map<St
if (replaceParams != null) {
contextVariables.putAll(replaceParams);
}
putBusinesskeyToContextariables(stateMachineInstance, contextVariables);
putBusinessKeyToContextVariables(stateMachineInstance, contextVariables);

ConcurrentHashMap<String, Object> concurrentContextVariables = new ConcurrentHashMap<>(contextVariables.size());
nullSafeCopy(contextVariables, concurrentContextVariables);
Expand Down Expand Up @@ -696,7 +696,7 @@ private String buildExceptionMessage(StateMachineInstance stateMachineInstance,
return stringBuilder.toString();
}

private void putBusinesskeyToContextariables(StateMachineInstance stateMachineInstance,
private void putBusinessKeyToContextVariables(StateMachineInstance stateMachineInstance,
Map<String, Object> contextVariables) {
if (StringUtils.hasText(stateMachineInstance.getBusinessKey()) && !contextVariables.containsKey(
DomainConstants.VAR_NAME_BUSINESSKEY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static void transformEdge(Map<String, Object> machineJsonObject, List<Ob
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 {
Expand Down