From 25ff97d953042fe0f7bda1c42392d91191d4c1d7 Mon Sep 17 00:00:00 2001 From: Kamil Patryk Kozakowski Date: Fri, 12 Jun 2026 17:47:26 +0200 Subject: [PATCH] styling --- .../command/ExporterCommand.java | 5 +- .../exporter/Dot.java | 8 +- .../exporter/ExportOptions.java | 13 + .../exporter/JsonExporter.java | 3 +- .../exporter/PlantUml.java | 12 +- .../exporter/Scxml.java | 4 +- .../exporter/StateMachineExporter.java | 2 +- .../model/StateMachineModel.java | 2 + .../service/ExportService.java | 30 +- .../resources/plantuml/default-style.puml | 29 + .../PlantUmlRenderTest.java | 2 +- .../RegressionTest.java | 5 +- .../exporter/JsonExporterTest.java | 2 +- .../ComplexStateMachineConfig.json | 578 +++++++++++++ .../F1StateMachineConfiguration.json | 780 +++++++++++++++++ .../F2StateMachineConfiguration.json | 794 ++++++++++++++++++ .../ForkJoinStateMachineConfig.json | 97 +++ .../G1StateMachineConfiguration.json | 369 ++++++++ .../G2StateMachineConfiguration.json | 383 +++++++++ .../KamilEnumStateMachineConfiguration.json | 201 +++++ .../OneStateMachineConfiguration.json | 637 ++++++++++++++ .../SimpleEnumStateMachineConfiguration.json | 218 +++++ .../ThreeStateMachineConfiguration.json | 780 +++++++++++++++++ .../TwoStateMachineConfiguration.json | 735 ++++++++++++++++ 24 files changed, 5660 insertions(+), 29 deletions(-) create mode 100644 state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/ExportOptions.java create mode 100644 state_machine_exporter/src/main/resources/plantuml/default-style.puml create mode 100644 state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json create mode 100644 state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json create mode 100644 state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json create mode 100644 state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/command/ExporterCommand.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/command/ExporterCommand.java index c99ab4b..54c004a 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/command/ExporterCommand.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/command/ExporterCommand.java @@ -42,6 +42,9 @@ public class ExporterCommand implements Callable { @Option(names = {"-f", "--format"}, description = "Comma-separated list of formats to export (dot, puml, scxml, json). If omitted, all formats are exported.", split = ",") private List selectedFormats; + @Option(names = {"--no-diamonds"}, description = "Render choice/junction states as regular states instead of diamonds.", negatable = true, defaultValue = "true") + private boolean renderChoicesAsDiamonds; + @Override public Integer call() throws Exception { var out = spec.commandLine().getOut(); @@ -66,7 +69,7 @@ public class ExporterCommand implements Callable { if (jsonFile != null) { exportService.runJsonExporter(jsonFile, outputDir, selectedFormats); } else { - exportService.runExporter(inputDir, outputDir, selectedFormats); + exportService.runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds); } out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ All state machines have been exported to " + outputDir.toAbsolutePath())); return 0; diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Dot.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Dot.java index 2e652b5..9c2099b 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Dot.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Dot.java @@ -22,7 +22,7 @@ public class Dot implements StateMachineExporter { List transitions, Set startStates, Set endStates, - boolean useLambdaGuards) { + ExportOptions options) { StringBuilder sb = new StringBuilder(); sb.append("digraph statemachine {\n"); sb.append(" rankdir=LR;\n"); @@ -47,7 +47,7 @@ public class Dot implements StateMachineExporter { } } - boolean includeChoiceStates = !statesWithChoice.isEmpty(); + boolean includeChoiceStates = options.isRenderChoicesAsDiamonds() && !statesWithChoice.isEmpty(); if (includeChoiceStates) { for (String choice : statesWithChoice) { String color = choiceColorMap.get(choice); @@ -104,7 +104,7 @@ public class Dot implements StateMachineExporter { if (t.getGuard() != null && !t.getGuard().expression().isBlank()) { if (!label.isEmpty()) label.append(" "); - String guardText = useLambdaGuards && t.getGuard().isLambda() ? "λ" + String guardText = options.isUseLambdaGuards() && t.getGuard().isLambda() ? "λ" : escapeDotString(t.getGuard().expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim()); label.append("[").append(guardText).append("]"); } @@ -116,7 +116,7 @@ public class Dot implements StateMachineExporter { if (i > 0) actionBuilder.append(", "); var action = t.getActions().get(i); - actionBuilder.append(useLambdaGuards && action.isLambda() ? "λ" : escapeDotString(action.expression())); + actionBuilder.append(options.isUseLambdaGuards() && action.isLambda() ? "λ" : escapeDotString(action.expression())); } if (!label.isEmpty()) label.append(" / "); diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/ExportOptions.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/ExportOptions.java new file mode 100644 index 0000000..59c786b --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/ExportOptions.java @@ -0,0 +1,13 @@ +package click.kamil.springstatemachineexporter.exporter; + +import lombok.Builder; +import lombok.Value; + +@Value +@Builder +public class ExportOptions { + @Builder.Default + boolean useLambdaGuards = true; + @Builder.Default + boolean renderChoicesAsDiamonds = true; +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/JsonExporter.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/JsonExporter.java index 3748e66..cd98af8 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/JsonExporter.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/JsonExporter.java @@ -18,13 +18,14 @@ public class JsonExporter implements StateMachineExporter { } @Override - public String export(String name, List transitions, Set startStates, Set endStates, boolean useLambdaGuards) { + public String export(String name, List transitions, Set startStates, Set endStates, ExportOptions options) { try { StateMachineModel model = StateMachineModel.builder() .name(name) .transitions(transitions) .startStates(startStates) .endStates(endStates) + .renderChoicesAsDiamonds(options.isRenderChoicesAsDiamonds()) .build(); return objectMapper.writeValueAsString(model); } catch (Exception e) { 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 0bee44d..0aa99eb 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 @@ -38,7 +38,7 @@ public class PlantUml implements StateMachineExporter { List transitions, Set startStates, Set endStates, - boolean useLambdaGuards) { + ExportOptions options) { StringBuilder sb = new StringBuilder(); sb.append("@startuml\n"); @@ -77,7 +77,9 @@ public class PlantUml implements StateMachineExporter { for (String state : statesWithChoice) { String className = "choice_color_" + (colorIndex % choiceColors.size()); - sb.append("state ").append(state).append(" <>\n"); + if (options.isRenderChoicesAsDiamonds()) { + sb.append("state ").append(state).append(" <>\n"); + } choiceStateClassMap.put(state, className); colorIndex++; } @@ -88,7 +90,9 @@ public class PlantUml implements StateMachineExporter { .map(s -> simplify(s.toString())) .collect(Collectors.toSet()); for (String junction : junctionStates) { - sb.append("state ").append(junction).append(" <>\n"); + if (options.isRenderChoicesAsDiamonds()) { + sb.append("state ").append(junction).append(" <>\n"); + } } sb.append("\n"); @@ -128,7 +132,7 @@ public class PlantUml implements StateMachineExporter { usedEventStereotypes.add(eventClass); } - String label = buildLabel(t, useLambdaGuards); + String label = buildLabel(t, options.isUseLambdaGuards()); if (!label.isEmpty()) { sb.append(" : ").append(label); } diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java index 916dc47..37698e9 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java @@ -17,7 +17,7 @@ public class Scxml implements StateMachineExporter { List transitions, Set startStates, Set endStates, - boolean useLambdaGuards) { + ExportOptions options) { StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append("\n"); diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/StateMachineExporter.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/StateMachineExporter.java index 92c723c..f4aa694 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/StateMachineExporter.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/StateMachineExporter.java @@ -10,7 +10,7 @@ public interface StateMachineExporter { List transitions, Set startStates, Set endStates, - boolean useLambdaGuards); + ExportOptions options); // Helper: extract last enum part default String simplify(String full) { diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/StateMachineModel.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/StateMachineModel.java index 21dc2ed..dcf04de 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/StateMachineModel.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/StateMachineModel.java @@ -17,4 +17,6 @@ public class StateMachineModel { private List transitions; private Set startStates; private Set endStates; + @Builder.Default + private boolean renderChoicesAsDiamonds = true; } 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 212b36e..141ecab 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 @@ -6,6 +6,7 @@ import click.kamil.springstatemachineexporter.ast.app.TransitionStateUtils; import click.kamil.springstatemachineexporter.model.StateMachineModel; import click.kamil.springstatemachineexporter.model.Transition; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import click.kamil.springstatemachineexporter.exporter.ExportOptions; import click.kamil.springstatemachineexporter.exporter.StateMachineExporter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -28,19 +29,19 @@ public class ExportService { private static final List TARGET_ANNOTATIONS = List.of("EnableStateMachineFactory", "EnableStateMachine"); public static final Set STATE_MACHINE_RETURN_TYPES = Set.of("StateMachine", "StateMachineFactory", "StateMachineModelFactory"); - public void runExporter(Path inputDir, Path outputDir, List selectedFormats) throws IOException { + public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { CodebaseContext context = new CodebaseContext(); context.scan(inputDir); - exportAll(context, outputDir, selectedFormats); + exportAll(context, outputDir, selectedFormats, renderChoicesAsDiamonds); } public void runJsonExporter(Path jsonFile, Path outputDir, List selectedFormats) throws IOException { JsonImportService jsonImportService = new JsonImportService(); StateMachineModel model = jsonImportService.importJson(jsonFile); - generateOutputs(outputDir, model.getName(), model.getTransitions(), model.getStartStates(), model.getEndStates(), selectedFormats); + generateOutputs(outputDir, model.getName(), model.getTransitions(), model.getStartStates(), model.getEndStates(), selectedFormats, model.isRenderChoicesAsDiamonds()); } - private void exportAll(CodebaseContext context, Path outputDir, List selectedFormats) throws IOException { + private void exportAll(CodebaseContext context, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { Set processedLocations = new HashSet<>(); // 1. Find entry point classes (annotated or extending adapter) @@ -48,7 +49,7 @@ public class ExportService { for (TypeDeclaration td : entryPoints) { String fqn = context.getFqn(td); if (processedLocations.add(fqn)) { - processEntryPoint(td, outputDir, context, selectedFormats); + processEntryPoint(td, outputDir, context, selectedFormats, renderChoicesAsDiamonds); } } @@ -61,12 +62,12 @@ public class ExportService { String uniqueId = parentFqn + "#" + methodName; if (processedLocations.add(uniqueId)) { - processBeanMethod(m, outputDir, context, selectedFormats); + processBeanMethod(m, outputDir, context, selectedFormats, renderChoicesAsDiamonds); } } } - private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, List selectedFormats) throws IOException { + private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { String className = context.getFqn(td); log.info("Processing state machine config: {}", className); @@ -83,10 +84,10 @@ public class ExportService { Set startStates = TransitionStateUtils.findStartStates(transitions, initialStatesAst); Set endStates = TransitionStateUtils.findEndStates(transitions, endStatesAst); - generateOutputs(outputDir, className, transitions, startStates, endStates, selectedFormats); + generateOutputs(outputDir, className, transitions, startStates, endStates, selectedFormats, renderChoicesAsDiamonds); } - private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, List selectedFormats) throws IOException { + private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { TypeDeclaration parentClass = (TypeDeclaration) m.getParent(); String parentFqn = context.getFqn(parentClass); String methodName = m.getName().getIdentifier(); @@ -99,22 +100,27 @@ public class ExportService { Set startStates = TransitionStateUtils.findStartStates(transitions); Set endStates = TransitionStateUtils.findEndStates(transitions); - generateOutputs(outputDir, uniqueName, transitions, startStates, endStates, selectedFormats); + generateOutputs(outputDir, uniqueName, transitions, startStates, endStates, selectedFormats, renderChoicesAsDiamonds); } private void generateOutputs(Path outputDir, String baseName, List transitions, - Set startStates, Set endStates, List selectedFormats) throws IOException { + Set startStates, Set endStates, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { Path targetDir = outputDir.resolve(baseName); Files.createDirectories(targetDir); + ExportOptions options = ExportOptions.builder() + .useLambdaGuards(true) + .renderChoicesAsDiamonds(renderChoicesAsDiamonds) + .build(); + for (StateMachineExporter output : exporters) { if (selectedFormats != null && !selectedFormats.isEmpty()) { boolean match = selectedFormats.stream().anyMatch(f -> output.getFileExtension().toLowerCase().contains(f.toLowerCase())); if (!match) continue; } - String content = output.export(baseName, transitions, startStates, endStates, true); + String content = output.export(baseName, transitions, startStates, endStates, options); String fileName = baseName + output.getFileExtension(); try (PrintWriter out = new PrintWriter(targetDir.resolve(fileName).toFile())) { diff --git a/state_machine_exporter/src/main/resources/plantuml/default-style.puml b/state_machine_exporter/src/main/resources/plantuml/default-style.puml new file mode 100644 index 0000000..ff1ec85 --- /dev/null +++ b/state_machine_exporter/src/main/resources/plantuml/default-style.puml @@ -0,0 +1,29 @@ + + +hide <> stereotype +hide <> stereotype +hide <> stereotype +hide <> stereotype +hide <> stereotype +hide <> stereotype +hide <> stereotype +/* HIDE_CHOICE_COLORS_PLACEHOLDER */ diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/PlantUmlRenderTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/PlantUmlRenderTest.java index 293a502..70ddde7 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/PlantUmlRenderTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/PlantUmlRenderTest.java @@ -96,7 +96,7 @@ public class PlantUmlRenderTest { @ParameterizedTest(name = "{0}") @MethodSource("provideTestScenarios") void testRenderMatchesGolden(TestScenario scenario, @TempDir Path tempDir) throws Exception { - exportService.runExporter(scenario.inputPath(), tempDir, List.of("puml")); + exportService.runExporter(scenario.inputPath(), tempDir, List.of("puml"), true); // Find the generated directory List generatedDirs; diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java index 09b524b..efc6a82 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java @@ -1,6 +1,7 @@ package click.kamil.springstatemachineexporter; import click.kamil.springstatemachineexporter.exporter.Dot; +import click.kamil.springstatemachineexporter.exporter.JsonExporter; import click.kamil.springstatemachineexporter.exporter.PlantUml; import click.kamil.springstatemachineexporter.exporter.Scxml; import click.kamil.springstatemachineexporter.exporter.StateMachineExporter; @@ -18,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat; public class RegressionTest { - private final List exporters = List.of(new PlantUml(), new Dot(), new Scxml()); + private final List exporters = List.of(new PlantUml(), new Dot(), new Scxml(), new JsonExporter()); private final ExportService exportService = new ExportService(exporters); private static List provideTestScenarios() { @@ -95,7 +96,7 @@ public class RegressionTest { @ParameterizedTest(name = "{0}") @MethodSource("provideTestScenarios") void testOutputMatchesGolden(TestScenario scenario, @TempDir Path tempDir) throws Exception { - exportService.runExporter(scenario.inputPath(), tempDir, null); + exportService.runExporter(scenario.inputPath(), tempDir, null, true); // Find the generated directory (it might be named with FQN) List generatedDirs; diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/JsonExporterTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/JsonExporterTest.java index 2b5b3e5..856f6e2 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/JsonExporterTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/JsonExporterTest.java @@ -21,7 +21,7 @@ class JsonExporterTest { transition.setTargetStates(List.of(State.of("S2"))); transition.setEvent("E1"); - String json = exporter.export("TestSM", List.of(transition), Set.of("S1"), Set.of("S2"), true); + String json = exporter.export("TestSM", List.of(transition), Set.of("S1"), Set.of("S2"), ExportOptions.builder().build()); assertThat(json) .contains("\"name\" : \"TestSM\"") diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json new file mode 100644 index 0000000..e963af9 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json @@ -0,0 +1,578 @@ +{ + "name" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig", + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json new file mode 100644 index 0000000..55373b1 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json @@ -0,0 +1,780 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F1StateMachineConfiguration", + "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" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENTX", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "event" : null, + "guard" : { + "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_3", + "fullIdentifier" : "States.STATE_EXTRA_3" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json new file mode 100644 index 0000000..94b8b92 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json @@ -0,0 +1,794 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F2StateMachineConfiguration", + "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" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE9", + "fullIdentifier" : "States.STATE9" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1_1", + "fullIdentifier" : "States.STATE_EXTRA_1_1" + } ], + "event" : "Events.EVENT_1_1", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1_2", + "fullIdentifier" : "States.STATE_EXTRA_1_2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1_1", + "fullIdentifier" : "States.STATE_EXTRA_1_1" + } ], + "event" : null, + "guard" : { + "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1_2", + "fullIdentifier" : "States.STATE_EXTRA_1_2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1_3", + "fullIdentifier" : "States.STATE_EXTRA_1_3" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1_3", + "fullIdentifier" : "States.STATE_EXTRA_1_3" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENT_1_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1_1", + "fullIdentifier" : "States.STATE_EXTRA_1_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1_2", + "fullIdentifier" : "States.STATE_EXTRA_1_2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json new file mode 100644 index 0000000..74f2361 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json @@ -0,0 +1,97 @@ +{ + "name" : "click.kamil.examples.statemachine.forkjoin.ForkJoinStateMachineConfig", + "transitions" : [ { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.START", + "fullIdentifier" : "States.START" + } ], + "targetStates" : [ { + "rawName" : "States.FORK", + "fullIdentifier" : "States.FORK" + } ], + "event" : "Events.TO_FORK", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "FORK", + "sourceStates" : [ { + "rawName" : "States.FORK", + "fullIdentifier" : "States.FORK" + } ], + "targetStates" : [ { + "rawName" : "States.REGION1_STATE1", + "fullIdentifier" : "States.REGION1_STATE1" + }, { + "rawName" : "States.REGION2_STATE1", + "fullIdentifier" : "States.REGION2_STATE1" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.REGION1_STATE1", + "fullIdentifier" : "States.REGION1_STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.REGION1_STATE2", + "fullIdentifier" : "States.REGION1_STATE2" + } ], + "event" : "Events.R1_NEXT", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.REGION2_STATE1", + "fullIdentifier" : "States.REGION2_STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.REGION2_STATE2", + "fullIdentifier" : "States.REGION2_STATE2" + } ], + "event" : "Events.R2_NEXT", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "JOIN", + "sourceStates" : [ { + "rawName" : "States.REGION1_STATE2", + "fullIdentifier" : "States.REGION1_STATE2" + }, { + "rawName" : "States.REGION2_STATE2", + "fullIdentifier" : "States.REGION2_STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.JOIN", + "fullIdentifier" : "States.JOIN" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.JOIN", + "fullIdentifier" : "States.JOIN" + } ], + "targetStates" : [ { + "rawName" : "States.END", + "fullIdentifier" : "States.END" + } ], + "event" : "Events.TO_END", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.START" ], + "endStates" : [ "States.END" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json new file mode 100644 index 0000000..014c6c7 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json @@ -0,0 +1,369 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G1StateMachineConfiguration", + "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.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "event" : "Events.EVENT_1_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_3", + "fullIdentifier" : "States.STATE_EXTRA_3" + } ], + "event" : "Events.EVENT_1_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_3", + "fullIdentifier" : "States.STATE_EXTRA_3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json new file mode 100644 index 0000000..defd24b --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json @@ -0,0 +1,383 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G2StateMachineConfiguration", + "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.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENT_1_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "event" : "Events.EVENT_1_3", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json new file mode 100644 index 0000000..45520e0 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json @@ -0,0 +1,201 @@ +{ + "name" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration", + "transitions" : [ { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "event" : "OrderEvents.PAY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.FULFILLED", + "fullIdentifier" : "OrderStates.FULFILLED" + } ], + "event" : "OrderEvents.FULFILL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : "OrderEvents.CANCEL", + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : "OrderEvents.CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ ], + "event" : "OrderEvents.ABCD", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "event" : "OrderEvents.ABCD", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "event" : null, + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID3", + "fullIdentifier" : "OrderStates.PAID3" + } ], + "event" : null, + "guard" : { + "expression" : "guard1", + "isLambda" : false + }, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.HAPPEN", + "fullIdentifier" : "OrderStates.HAPPEN" + } ], + "event" : null, + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : 2 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 3 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID3", + "fullIdentifier" : "OrderStates.PAID3" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "targetStates" : [ ], + "event" : "OrderEvents.ABCD", + "guard" : null, + "actions" : [ { + "expression" : "new Action(){\n @Override public void execute( StateContext context){\n }\n}\n", + "isLambda" : true + }, { + "expression" : "action2", + "isLambda" : false + } ], + "order" : null + } ], + "startStates" : [ "OrderStates.SUBMITTED" ], + "endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json new file mode 100644 index 0000000..205695b --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json @@ -0,0 +1,637 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritancestate.OneStateMachineConfiguration", + "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" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENTX", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json new file mode 100644 index 0000000..358d5f2 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json @@ -0,0 +1,218 @@ +{ + "name" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration", + "transitions" : [ { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "event" : "OrderEvents.PAY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.FULFILLED", + "fullIdentifier" : "OrderStates.FULFILLED" + } ], + "event" : "OrderEvents.FULFILL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : "OrderEvents.CANCEL", + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : "OrderEvents.CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ ], + "event" : "OrderEvents.ABCD", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "event" : null, + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.SUBMITTED", + "fullIdentifier" : "OrderStates.SUBMITTED" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID3", + "fullIdentifier" : "OrderStates.PAID3" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "event" : null, + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return true;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "event" : null, + "guard" : { + "expression" : "guard1", + "isLambda" : false + }, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.HAPPEN", + "fullIdentifier" : "OrderStates.HAPPEN" + } ], + "event" : null, + "guard" : { + "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", + "isLambda" : true + }, + "actions" : [ ], + "order" : 2 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID", + "fullIdentifier" : "OrderStates.PAID" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.PAID3", + "fullIdentifier" : "OrderStates.PAID3" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 3 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID2", + "fullIdentifier" : "OrderStates.PAID2" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID3", + "fullIdentifier" : "OrderStates.PAID3" + } ], + "targetStates" : [ { + "rawName" : "OrderStates.CANCELED", + "fullIdentifier" : "OrderStates.CANCELED" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "OrderStates.PAID1", + "fullIdentifier" : "OrderStates.PAID1" + } ], + "targetStates" : [ ], + "event" : "OrderEvents.ABCD", + "guard" : null, + "actions" : [ { + "expression" : "new Action(){\n @Override public void execute( StateContext context){\n ;\n }\n}\n", + "isLambda" : true + }, { + "expression" : "action2", + "isLambda" : false + } ], + "order" : null + } ], + "startStates" : [ "OrderStates.SUBMITTED" ], + "endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json new file mode 100644 index 0000000..8ef60d9 --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json @@ -0,0 +1,780 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.ThreeStateMachineConfiguration", + "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" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENTX", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "event" : null, + "guard" : { + "expression" : "guardEventHeaderEquals(\"header1\",\"foo\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_3", + "fullIdentifier" : "States.STATE_EXTRA_3" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_2", + "fullIdentifier" : "States.STATE_EXTRA_2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +} diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json new file mode 100644 index 0000000..5c64abd --- /dev/null +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json @@ -0,0 +1,735 @@ +{ + "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.TwoStateMachineConfiguration", + "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" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE1", + "fullIdentifier" : "States.STATE1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE2", + "fullIdentifier" : "States.STATE2" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE3", + "fullIdentifier" : "States.STATE3" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE4", + "fullIdentifier" : "States.STATE4" + } ], + "targetStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "event" : "Events.EVENTY", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEX", + "fullIdentifier" : "States.STATEX" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "actions" : [ ], + "order" : 0 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATEY", + "fullIdentifier" : "States.STATEY" + } ], + "targetStates" : [ { + "rawName" : "States.STATEZ", + "fullIdentifier" : "States.STATEZ" + } ], + "event" : null, + "guard" : null, + "actions" : [ ], + "order" : 1 + }, { + "type" : "CHOICE", + "sourceStates" : [ { + "rawName" : "States.STATE16", + "fullIdentifier" : "States.STATE16" + } ], + "targetStates" : [ { + "rawName" : "States.STATE17", + "fullIdentifier" : "States.STATE17" + } ], + "event" : null, + "guard" : { + "expression" : "guardVarEquals(\"value1\")", + "isLambda" : false + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, + "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 + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE5", + "fullIdentifier" : "States.STATE5" + } ], + "targetStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "event" : "Events.EVENTX", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL", + "guard" : null, + "actions" : [ ], + "order" : null + }, { + "type" : "EXTERNAL", + "sourceStates" : [ { + "rawName" : "States.STATE_EXTRA_1", + "fullIdentifier" : "States.STATE_EXTRA_1" + } ], + "targetStates" : [ { + "rawName" : "States.CANCEL", + "fullIdentifier" : "States.CANCEL" + } ], + "event" : "Events.EVENT_CANCEL_2", + "guard" : null, + "actions" : [ ], + "order" : null + } ], + "startStates" : [ "States.STATE1" ], + "endStates" : [ "States.STATEZ" ], + "renderChoicesAsDiamonds" : true +}