diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java index 09e516b..ff8e346 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java @@ -18,6 +18,8 @@ import java.util.Set; @JsonIgnoreProperties(ignoreUnknown = true) public class AnalysisResult { private final String name; + @Builder.Default + private final Set states = java.util.Collections.emptySet(); private final List transitions; private final Set startStates; private final Set endStates; diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java index a1a459a..b241ee5 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java @@ -11,6 +11,8 @@ import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.ClassInstanceCreation; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.Expression; +import org.eclipse.jdt.core.dom.IMethodBinding; +import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.LambdaExpression; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.MethodInvocation; @@ -175,15 +177,15 @@ public class AstTransitionParser { Expression secondArg = resolveArg((Expression) args.get(1), argsMap); if ("last".equals(methodName)) { // For 'last', the second argument is an action, not a guard - parseAction(secondArg, t); + parseAction(secondArg, t, cu); } else { // For 'first' and 'then', the second argument is a guard - parseGuard(secondArg, t); + parseGuard(secondArg, t, cu); } } if (args.size() > 2) { Expression thirdArg = resolveArg((Expression) args.get(2), argsMap); - parseAction(thirdArg, t); + parseAction(thirdArg, t, cu); } t.setOrder(orderCounter++); transitions.add(t); @@ -226,28 +228,43 @@ public class AstTransitionParser { } case "guard" -> { Expression resolved = resolveArg((Expression) args.get(0), argsMap); - parseGuard(resolved, t); + parseGuard(resolved, t, cu); } case "action" -> { Expression resolved = resolveArg((Expression) args.get(0), argsMap); - parseAction(resolved, t); + parseAction(resolved, t, cu); } } } return t; } - private static void parseGuard(Object arg, Transition t) { + private static String extractInternalLogic(Expression expr, CompilationUnit cu) { + if (expr instanceof MethodInvocation mi) { + IMethodBinding binding = mi.resolveMethodBinding(); + if (binding != null) { + ASTNode declNode = cu.findDeclaringNode(binding.getKey()); + if (declNode instanceof MethodDeclaration md) { + return md.toString(); + } + } + } + return null; + } + + private static void parseGuard(Object arg, Transition t, CompilationUnit cu) { QuotedExpression quotedExpr = QuotedExpression.of(arg); if (quotedExpr != null) { - t.setGuard(Guard.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()))); + String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu); + t.setGuard(Guard.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic)); } } - private static void parseAction(Object arg, Transition t) { + private static void parseAction(Object arg, Transition t, CompilationUnit cu) { QuotedExpression quotedExpr = QuotedExpression.of(arg); if (quotedExpr != null) { - t.getActions().add(Action.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()))); + String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu); + t.getActions().add(Action.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic)); } } diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/TransitionStateUtils.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/TransitionStateUtils.java index c977ed7..59ce3b1 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/TransitionStateUtils.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/TransitionStateUtils.java @@ -44,6 +44,23 @@ public class TransitionStateUtils { .collect(Collectors.toSet()); } + public static Set findAllStates(Collection transitions, Set initialStates, Set endStates) { + Set allStates = new java.util.HashSet<>(); + if (transitions != null) { + transitions.forEach(t -> { + if (t.getSourceStates() != null) allStates.addAll(t.getSourceStates()); + if (t.getTargetStates() != null) allStates.addAll(t.getTargetStates()); + }); + } + if (initialStates != null) { + initialStates.forEach(s -> allStates.add(State.of(s))); + } + if (endStates != null) { + endStates.forEach(s -> allStates.add(State.of(s))); + } + return allStates; + } + private static Stream normalizeStates(Collection states) { return states.stream() .map(State::toString) diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/PlantUml.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/PlantUml.java index 5c8d09b..cab1b53 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/PlantUml.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/PlantUml.java @@ -198,15 +198,15 @@ public class PlantUml implements StateMachineExporter { } if (t.getGuard() != null) { String g = t.getGuard().expression(); - if (useLambdaGuards && g.contains("->")) { + if (useLambdaGuards && t.getGuard().isLambda()) { parts.add("[" + LAMBDA + "]"); } else { - parts.add("[" + g.replace("\r", "").replace("\n", "\\n") + "]"); + parts.add("[" + g.replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim() + "]"); } } if (t.getActions() != null && !t.getActions().isEmpty()) { parts.add("/ " + t.getActions().stream() - .map(a -> a.expression().contains("->") ? LAMBDA : a.expression().replace("\r", "").replace("\n", "\\n")) + .map(a -> (useLambdaGuards && a.isLambda()) ? LAMBDA : a.expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim()) .collect(Collectors.joining(", "))); } Optional.ofNullable(t.getOrder()) diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Action.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Action.java index d0abee1..a81692f 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Action.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Action.java @@ -1,7 +1,7 @@ package click.kamil.springstatemachineexporter.model; -public record Action(String expression, boolean isLambda) { - public static Action of(String expression, boolean isLambda) { - return expression != null ? new Action(expression, isLambda) : null; +public record Action(String expression, boolean isLambda, String internalLogic) { + public static Action of(String expression, boolean isLambda, String internalLogic) { + return expression != null ? new Action(expression, isLambda, internalLogic) : null; } } diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Guard.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Guard.java index e0db32e..5d07f2a 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Guard.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Guard.java @@ -1,7 +1,7 @@ package click.kamil.springstatemachineexporter.model; -public record Guard(String expression, boolean isLambda) { - public static Guard of(String expression, boolean isLambda) { - return expression != null ? new Guard(expression, isLambda) : null; +public record Guard(String expression, boolean isLambda, String internalLogic) { + public static Guard of(String expression, boolean isLambda, String internalLogic) { + return expression != null ? new Guard(expression, isLambda, internalLogic) : null; } } diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/service/ExportService.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/service/ExportService.java index 7219644..a62d63d 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/service/ExportService.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/service/ExportService.java @@ -147,9 +147,11 @@ public class ExportService { Set startStates = TransitionStateUtils.findStartStates(transitions, initialStatesAst); Set endStates = TransitionStateUtils.findEndStates(transitions, endStatesAst); + Set allStates = TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst); AnalysisResult result = AnalysisResult.builder() .name(className) + .states(allStates) .transitions(transitions) .startStates(startStates) .endStates(endStates) @@ -172,11 +174,13 @@ public class ExportService { List transitions = AstTransitionParser.parseTransitions(m, context); - Set startStates = TransitionStateUtils.findStartStates(transitions); - Set endStates = TransitionStateUtils.findEndStates(transitions); + Set startStates = TransitionStateUtils.findStartStates(transitions, null); + Set endStates = TransitionStateUtils.findEndStates(transitions, null); + Set allStates = TransitionStateUtils.findAllStates(transitions, null, null); AnalysisResult result = AnalysisResult.builder() .name(uniqueName) + .states(allStates) .transitions(transitions) .startStates(startStates) .endStates(endStates) diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json index d510c35..c918b36 100644 --- a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json @@ -233,7 +233,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -250,7 +251,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -281,7 +283,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -312,7 +315,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -343,7 +347,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -374,7 +379,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -405,7 +411,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -422,7 +429,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -453,7 +461,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -484,7 +493,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -515,7 +525,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -532,7 +543,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -563,7 +575,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json index f6b41ff..8e1da47 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json @@ -293,7 +293,8 @@ "event" : null, "guard" : { "expression" : "(c) -> true", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json index 047c356..d8f2f25 100644 --- a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json @@ -317,7 +317,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -348,7 +349,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -365,7 +367,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -396,7 +399,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -427,7 +431,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -458,7 +463,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -489,7 +495,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -520,7 +527,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -537,7 +545,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -568,7 +577,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -599,7 +609,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -630,7 +641,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -647,7 +659,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -678,7 +691,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -723,7 +737,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png index 096c2b3..b3d8485 100644 Binary files a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json index addb484..81d3e36 100644 --- a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json @@ -317,7 +317,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -348,7 +349,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -365,7 +367,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -396,7 +399,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -427,7 +431,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -458,7 +463,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -489,7 +495,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -520,7 +527,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -537,7 +545,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -568,7 +577,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -599,7 +609,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -630,7 +641,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -647,7 +659,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -678,7 +691,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -723,7 +737,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json index 95ee177..c9f4e88 100644 --- a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json @@ -233,7 +233,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -264,7 +265,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -281,7 +283,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -312,7 +315,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json index ad7ba93..07985e4 100644 --- a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json @@ -233,7 +233,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -264,7 +265,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -281,7 +283,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -312,7 +315,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json index 2d25622..17d7730 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json @@ -51,7 +51,8 @@ "event" : "OrderEvents.CANCEL", "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : null @@ -107,7 +108,8 @@ "event" : null, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -124,7 +126,8 @@ "event" : null, "guard" : { "expression" : "guard1", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -141,7 +144,8 @@ "event" : null, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 2 @@ -198,10 +202,12 @@ "guard" : null, "actions" : [ { "expression" : "new Action(){\n @Override public void execute( StateContext context){\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, { "expression" : "action2", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null } ], "order" : null } ], diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png index 2597e39..a039165 100644 Binary files a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml index dd5f95c..edd446f 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml @@ -27,17 +27,17 @@ state OrderStates.PAID1 <> OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <> <> : OrderEvents.PAY OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <> <> : OrderEvents.FULFILL -OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n] +OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL [λ] OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <> <> : OrderEvents.ABCD OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID1 <> <> : OrderEvents.ABCD -OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID2 <> : [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n] (order=0) +OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID2 <> : [λ] (order=0) OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID3 <> : [guard1] (order=1) -OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.HAPPEN <> : [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n] (order=2) +OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.HAPPEN <> : [λ] (order=2) OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.CANCELED <> : (order=3) OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <> -OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <> <> : OrderEvents.ABCD / new Action(){\n @Override public void execute( StateContext context){\n }\n}\n, action2 +OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <> <> : OrderEvents.ABCD / λ, action2 OrderStates.CANCELED --> [*] OrderStates.FULFILLED --> [*] diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json index 2f6f0b4..73be5c4 100644 --- a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json @@ -247,7 +247,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -278,7 +279,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -295,7 +297,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -326,7 +329,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -357,7 +361,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -388,7 +393,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -419,7 +425,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -450,7 +457,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -467,7 +475,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -498,7 +507,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -529,7 +539,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -560,7 +571,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -577,7 +589,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -608,7 +621,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json index 0ef5db1..cae2059 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json @@ -51,7 +51,8 @@ "event" : "OrderEvents.CANCEL", "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : null @@ -93,7 +94,8 @@ "event" : null, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -124,7 +126,8 @@ "event" : null, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -141,7 +144,8 @@ "event" : null, "guard" : { "expression" : "guard1", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -158,7 +162,8 @@ "event" : null, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, "actions" : [ ], "order" : 2 @@ -215,10 +220,12 @@ "guard" : null, "actions" : [ { "expression" : "new Action(){\n @Override public void execute( StateContext context){\n ;\n }\n}\n", - "isLambda" : true + "isLambda" : true, + "internalLogic" : null }, { "expression" : "action2", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null } ], "order" : null } ], diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png index 6805a32..a91e0b1 100644 Binary files a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml index 3b70972..bbdabed 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml @@ -28,18 +28,18 @@ state OrderStates.PAID <> OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <> <> : OrderEvents.PAY OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <> <> : OrderEvents.FULFILL -OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n] +OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL [λ] OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <> <> : OrderEvents.CANCEL OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <> <> : OrderEvents.ABCD -OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID2 <> : [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n] (order=0) +OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID2 <> : [λ] (order=0) OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID3 <> : (order=1) -OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID1 <> : [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n] (order=0) +OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID1 <> : [λ] (order=0) OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID2 <> : [guard1] (order=1) -OrderStates.PAID -[#FF6347,bold]-> OrderStates.HAPPEN <> : [new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n] (order=2) +OrderStates.PAID -[#FF6347,bold]-> OrderStates.HAPPEN <> : [λ] (order=2) OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID3 <> : (order=3) OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <> -OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <> <> : OrderEvents.ABCD / new Action(){\n @Override public void execute( StateContext context){\n ;\n }\n}\n, action2 +OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <> <> : OrderEvents.ABCD / λ, action2 OrderStates.CANCELED --> [*] OrderStates.FULFILLED --> [*] diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json index f53f8de..ad47790 100644 --- a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json @@ -317,7 +317,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -348,7 +349,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -365,7 +367,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -396,7 +399,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -427,7 +431,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -458,7 +463,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -489,7 +495,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -520,7 +527,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -537,7 +545,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -568,7 +577,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -599,7 +609,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -630,7 +641,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -647,7 +659,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -678,7 +691,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -723,7 +737,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json index 62c76c5..362a8d6 100644 --- a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json @@ -317,7 +317,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -348,7 +349,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value1\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -365,7 +367,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value2\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -396,7 +399,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -427,7 +431,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"value3\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -458,7 +463,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"reset\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -489,7 +495,8 @@ "event" : null, "guard" : { "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -520,7 +527,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo13\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -537,7 +545,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goTo14\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -568,7 +577,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"goBack10\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -599,7 +609,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"loop12\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -630,7 +641,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBack\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 @@ -647,7 +659,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"stepBackMore\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 1 @@ -678,7 +691,8 @@ "event" : null, "guard" : { "expression" : "guardVarEquals(\"forward9\")", - "isLambda" : false + "isLambda" : false, + "internalLogic" : null }, "actions" : [ ], "order" : 0 diff --git a/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.html b/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.html new file mode 100644 index 0000000..368efed --- /dev/null +++ b/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.html @@ -0,0 +1,1261 @@ + + + + + + State Machine Explorer - click.kamil.examples.statemachine.complex.ComplexStateMachineConfig + + + + + + + + + + + + + + + + + + + + + + + diff --git a/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.json b/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.json new file mode 100644 index 0000000..c918b36 --- /dev/null +++ b/state_machine_exporter_html/out_complex/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig/click.kamil.examples.statemachine.complex.ComplexStateMachineConfig.json @@ -0,0 +1,599 @@ +{ + "metadata" : { + "triggers" : [ ], + "entryPoints" : [ ], + "callChains" : [ ], + "properties" : { + "spring.application.name" : "statemachinedemo" + } + }, + "name" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig", + "renderChoicesAsDiamonds" : true, + "startStates" : [ "States.STATE1" ], + "transitions" : [ { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "event" : "Events.EVENT1", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "event" : "Events.EVENT2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "event" : "Events.EVENT3", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "event" : "Events.EVENT4", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.STATE6", + "fullIdentifier" : "States.STATE6" + } ], + "event" : "Events.EVENT5", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE6", + "fullIdentifier" : "States.STATE6" + } ], + "targetStates" : [ { + "rawName" : "States.STATE7", + "fullIdentifier" : "States.STATE7" + } ], + "event" : "Events.EVENT6", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE7", + "fullIdentifier" : "States.STATE7" + } ], + "targetStates" : [ { + "rawName" : "States.STATE8", + "fullIdentifier" : "States.STATE8" + } ], + "event" : "Events.EVENT7", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE8", + "fullIdentifier" : "States.STATE8" + } ], + "targetStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "event" : "Events.EVENT8", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "targetStates" : [ { + "rawName" : "States.STATE10", + "fullIdentifier" : "States.STATE10" + } ], + "event" : "Events.EVENT9", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE10", + "fullIdentifier" : "States.STATE10" + } ], + "targetStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "event" : "Events.EVENT10", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "targetStates" : [ { + "rawName" : "States.STATE12", + "fullIdentifier" : "States.STATE12" + } ], + "event" : "Events.EVENT11", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE12", + "fullIdentifier" : "States.STATE12" + } ], + "targetStates" : [ { + "rawName" : "States.STATE13", + "fullIdentifier" : "States.STATE13" + } ], + "event" : "Events.EVENT12", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE13", + "fullIdentifier" : "States.STATE13" + } ], + "targetStates" : [ { + "rawName" : "States.STATE14", + "fullIdentifier" : "States.STATE14" + } ], + "event" : "Events.EVENT13", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE14", + "fullIdentifier" : "States.STATE14" + } ], + "targetStates" : [ { + "rawName" : "States.STATE15", + "fullIdentifier" : "States.STATE15" + } ], + "event" : "Events.EVENT14", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE15", + "fullIdentifier" : "States.STATE15" + } ], + "targetStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "event" : "Events.EVENT15", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE18", + "fullIdentifier" : "States.STATE18" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value2\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE19", + "fullIdentifier" : "States.STATE19" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 2 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "targetStates" : [ { + "rawName" : "States.STATE20", + "fullIdentifier" : "States.STATE20" + } ], + "event" : null, + "guard" : { + "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "targetStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE18", + "fullIdentifier" : "States.STATE18" + } ], + "targetStates" : [ { + "rawName" : "States.STATE19", + "fullIdentifier" : "States.STATE19" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value3\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE18", + "fullIdentifier" : "States.STATE18" + } ], + "targetStates" : [ { + "rawName" : "States.STATE20", + "fullIdentifier" : "States.STATE20" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE19", + "fullIdentifier" : "States.STATE19" + } ], + "targetStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"reset\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE19", + "fullIdentifier" : "States.STATE19" + } ], + "targetStates" : [ { + "rawName" : "States.STATE20", + "fullIdentifier" : "States.STATE20" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE20", + "fullIdentifier" : "States.STATE20" + } ], + "targetStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "event" : null, + "guard" : { + "expression" : "guardEventHeaderEquals(\"header2\",\"bar\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE20", + "fullIdentifier" : "States.STATE20" + } ], + "targetStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "targetStates" : [ { + "rawName" : "States.STATE13", + "fullIdentifier" : "States.STATE13" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"goTo13\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "targetStates" : [ { + "rawName" : "States.STATE14", + "fullIdentifier" : "States.STATE14" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"goTo14\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "targetStates" : [ { + "rawName" : "States.STATE15", + "fullIdentifier" : "States.STATE15" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 2 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE12", + "fullIdentifier" : "States.STATE12" + } ], + "targetStates" : [ { + "rawName" : "States.STATE10", + "fullIdentifier" : "States.STATE10" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"goBack10\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE12", + "fullIdentifier" : "States.STATE12" + } ], + "targetStates" : [ { + "rawName" : "States.STATE11", + "fullIdentifier" : "States.STATE11" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE14", + "fullIdentifier" : "States.STATE14" + } ], + "targetStates" : [ { + "rawName" : "States.STATE12", + "fullIdentifier" : "States.STATE12" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"loop12\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE14", + "fullIdentifier" : "States.STATE14" + } ], + "targetStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "targetStates" : [ { + "rawName" : "States.STATE8", + "fullIdentifier" : "States.STATE8" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"stepBack\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "targetStates" : [ { + "rawName" : "States.STATE7", + "fullIdentifier" : "States.STATE7" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"stepBackMore\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "targetStates" : [ { + "rawName" : "States.STATE6", + "fullIdentifier" : "States.STATE6" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 2 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE8", + "fullIdentifier" : "States.STATE8" + } ], + "targetStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"forward9\")", + "isLambda" : false, + "internalLogic" : null + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE8", + "fullIdentifier" : "States.STATE8" + } ], + "targetStates" : [ { + "rawName" : "States.STATE10", + "fullIdentifier" : "States.STATE10" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + } ], + "endStates" : [ ] +} diff --git a/state_machine_exporter_html/out_enterprise_v7/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig.html b/state_machine_exporter_html/out_enterprise_v7/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig.html index abd1541..f88f1a0 100644 --- a/state_machine_exporter_html/out_enterprise_v7/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig.html +++ b/state_machine_exporter_html/out_enterprise_v7/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig/click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig.html @@ -48,6 +48,46 @@ overflow-x: hidden; resize: horizontal; position: relative; + transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease; + } + + #sidebar.collapsed { + width: 0 !important; + min-width: 0 !important; + border-right: none; + padding: 0; + overflow: hidden; + resize: none; + } + + #toggle-sidebar { + position: absolute; + top: 20px; + left: 20px; + z-index: 50; + background: #fff; + border: 1px solid var(--border); + border-radius: 8px; + padding: 8px; + cursor: pointer; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; + } + #toggle-sidebar:hover { + background: #f8fafc; + border-color: var(--primary); + } + #toggle-sidebar svg { + width: 20px; + height: 20px; + fill: none; + stroke: var(--text-muted); + stroke-width: 2; + stroke-linecap: round; + stroke-linejoin: round; } #sidebar::after { @@ -244,6 +284,9 @@
+
NEWPENDING_PAYMENTCANCELLEDPAIDSHIPPEDDELIVEREDRETURNEDPLACE_ORDERλ (order=0)(order=1)PAY_ORDERSHIP_ORDERFINALIZECANCEL_ORDERRETURN_ORDER
@@ -252,6 +295,43 @@