From 5894303510b080f07b031672fd0769e34e0d9c9c Mon Sep 17 00:00:00 2001 From: Kamil Patryk Kozakowski Date: Thu, 18 Jun 2026 22:00:44 +0200 Subject: [PATCH] fqn names of events and states --- InspectGolden.java | 22 +++ run_golden.gradle | 4 + state_machine_exporter/build.gradle | 11 ++ .../analysis/model/AnalysisResult.java | 2 +- .../ast/app/AstTransitionParser.java | 26 +++- .../command/ExporterCommand.java | 10 +- .../exporter/Dot.java | 13 +- .../exporter/EnumFormat.java | 5 + .../exporter/ExportOptions.java | 31 +++++ .../exporter/PlantUml.java | 35 +++-- .../exporter/Scxml.java | 21 +-- .../model/Event.java | 16 +++ .../model/Transition.java | 2 +- .../service/ExportService.java | 40 ++++-- .../GoldenUpdater.java | 2 +- .../ast/app/AstTransitionParserTest.java | 8 +- .../ast/app/StateMachineAggregatorTest.java | 36 ++--- .../exporter/JsonExporterTest.java | 4 +- .../exporter/PlantUmlTest.java | 67 +++++++++ .../DeferredProfileResolutionTest.java | 4 +- .../service/JsonImportServiceTest.java | 4 +- .../ComplexStateMachineConfig.json | 75 ++++++++-- .../EnterpriseStateMachineConfig.json | 30 +++- .../ExtendedStateMachineConfig.json | 30 +++- .../ExtendedStateMachineConfig.json | 30 +++- .../F1StateMachineConfiguration.json | 125 +++++++++++++---- .../F2StateMachineConfiguration.json | 130 ++++++++++++++---- .../ForkJoinStateMachineConfig.json | 20 ++- .../G1StateMachineConfiguration.json | 90 +++++++++--- .../G2StateMachineConfiguration.json | 95 ++++++++++--- .../InheritanceStateMachineConfig.json | 5 +- .../KamilEnumStateMachineConfiguration.json | 35 ++++- .../MavenOrderStateMachine.json | 10 +- .../OneStateMachineConfiguration.json | 85 +++++++++--- .../OrderStateMachineConfig.json | 10 +- .../SimpleEnumStateMachineConfiguration.json | 30 +++- .../ThreeStateMachineConfiguration.json | 125 +++++++++++++---- .../TwoStateMachineConfiguration.json | 120 ++++++++++++---- 38 files changed, 1122 insertions(+), 286 deletions(-) create mode 100644 InspectGolden.java create mode 100644 run_golden.gradle create mode 100644 state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/EnumFormat.java create mode 100644 state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/model/Event.java create mode 100644 state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/PlantUmlTest.java diff --git a/InspectGolden.java b/InspectGolden.java new file mode 100644 index 0000000..9fef71e --- /dev/null +++ b/InspectGolden.java @@ -0,0 +1,22 @@ +import java.nio.file.*; +import java.util.*; +import click.kamil.springstatemachineexporter.service.ExportService; +import click.kamil.springstatemachineexporter.exporter.*; +import click.kamil.springstatemachineexporter.analysis.service.EnrichmentService; + +public class InspectGolden { + public static void main(String[] args) throws Exception { + Path inputDir = Path.of("state_machines/complex_state_machine"); + Path tempDir = Files.createTempDirectory("golden-update-"); + + List exporters = List.of(new PlantUml(), new Dot(), new Scxml(), new JsonExporter()); + EnrichmentService enrichmentService = new EnrichmentService(Collections.emptyList()); + ExportService exportService = new ExportService(exporters, enrichmentService); + + exportService.runExporter(inputDir, tempDir, null, true); + + try (var stream = Files.list(tempDir)) { + stream.forEach(System.out::println); + } + } +} diff --git a/run_golden.gradle b/run_golden.gradle new file mode 100644 index 0000000..6363a67 --- /dev/null +++ b/run_golden.gradle @@ -0,0 +1,4 @@ +task runGolden(type: JavaExec) { + mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater" + classpath = sourceSets.test.runtimeClasspath +} diff --git a/state_machine_exporter/build.gradle b/state_machine_exporter/build.gradle index b7087ff..7ce8ba5 100644 --- a/state_machine_exporter/build.gradle +++ b/state_machine_exporter/build.gradle @@ -53,3 +53,14 @@ tasks.named('test') { useJUnitPlatform() systemProperty "updateGolden", System.getProperty("updateGolden") } + +task runGolden(type: JavaExec) { + mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater" + classpath = sourceSets.test.runtimeClasspath +} + +task runGoldenFixed(type: JavaExec) { + mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater" + classpath = sourceSets.test.runtimeClasspath + workingDir = rootProject.projectDir +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java index adf84b1..70fdf2d 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/AnalysisResult.java @@ -60,7 +60,7 @@ public class AnalysisResult { if (transitions != null) { for (var t : transitions) { if (t.getEvent() != null) { - t.setEvent(resolver.resolveValue(t.getEvent(), properties)); + t.setEvent(click.kamil.springstatemachineexporter.model.Event.of(t.getEvent().rawName(), resolver.resolveValue(t.getEvent().fullIdentifier(), properties))); } // Resolve states within transitions t.setSourceStates(t.getSourceStates().stream() diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java index 5abc8f4..dcb7d5d 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParser.java @@ -4,6 +4,7 @@ import click.kamil.springstatemachineexporter.analysis.resolver.ConstantResolver import click.kamil.springstatemachineexporter.model.Action; import click.kamil.springstatemachineexporter.model.Guard; import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Event; import click.kamil.springstatemachineexporter.model.Transition; import click.kamil.springstatemachineexporter.model.TransitionType; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; @@ -213,9 +214,30 @@ public class AstTransitionParser { Expression resolved = resolveArg((Expression) args.get(0), argsMap); String eventValue = constantResolver.resolve(resolved, context); if (eventValue != null) { - t.setEvent(eventValue); + t.setEvent(Event.of(resolved.toString(), eventValue)); + } else if (resolved instanceof QualifiedName qn) { + String qualifier = qn.getQualifier().toString(); + String name = qn.getName().getIdentifier(); + TypeDeclaration td = context.getTypeDeclaration(qualifier, cu); + if (td != null) { + t.setEvent(Event.of(resolved.toString(), context.getFqn(td) + "." + name)); + } else { + t.setEvent(Event.of(resolved.toString(), qn.getFullyQualifiedName())); + } + } else if (resolved instanceof SimpleName sn) { + String name = sn.getIdentifier(); + String full = name; + for (Object impObj : cu.imports()) { + ImportDeclaration imp = (ImportDeclaration) impObj; + String impName = imp.getName().getFullyQualifiedName(); + if (impName.endsWith("." + name)) { + full = impName; + break; + } + } + t.setEvent(Event.of(resolved.toString(), full)); } else { - t.setEvent(QuotedExpression.of(resolved).toStringWithoutQuotes()); + t.setEvent(Event.of(QuotedExpression.of(resolved).toStringWithoutQuotes())); } } case "guard" -> { 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 a29e52e..371f6f6 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 @@ -48,6 +48,12 @@ public class ExporterCommand implements Callable { @Option(names = {"-p", "--profiles"}, description = "Spring profiles to activate for property resolution.", split = ",") private List activeProfiles; + @Option(names = {"--event"}, description = "Format for events when they are enums: fn (fullName, default), fqn (fully qualified name), sn (short name)", defaultValue = "fn") + private click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat; + + @Option(names = {"--state"}, description = "Format for states when they are enums: fn (fullName, default), fqn (fully qualified name), sn (short name)", defaultValue = "fn") + private click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat; + @Override public Integer call() throws Exception { var out = spec.commandLine().getOut(); @@ -71,9 +77,9 @@ public class ExporterCommand implements Callable { try { List profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList(); if (jsonFile != null) { - exportService.runJsonExporter(jsonFile, outputDir, selectedFormats, profiles); + exportService.runJsonExporter(jsonFile, outputDir, selectedFormats, profiles, eventFormat, stateFormat); } else { - exportService.runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, profiles); + exportService.runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, profiles, eventFormat, stateFormat); } 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 18d7b9a..09025a8 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 @@ -41,7 +41,7 @@ public class Dot implements StateMachineExporter { for (Transition t : transitions) { if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) { for (State source : t.getSourceStates()) { - String simplified = simplify(source.toString()); + String simplified = simplify(options.formatState(source)); statesWithChoice.add(simplified); if (!choiceColorMap.containsKey(simplified)) { choiceColorMap.put(simplified, CHOICE_COLORS[colorIndex % CHOICE_COLORS.length]); @@ -86,11 +86,11 @@ public class Dot implements StateMachineExporter { } for (State rawSourceState : t.getSourceStates()) { - String rawSource = rawSourceState.toString(); + String rawSource = options.formatState(rawSourceState); String source = simplify(rawSource); for (State rawTargetState : targets) { - String rawTarget = rawTargetState.toString(); + String rawTarget = options.formatState(rawTargetState); String target = simplify(rawTarget); String edgeSource = source; @@ -100,8 +100,11 @@ public class Dot implements StateMachineExporter { // Label: event [guard] / actions StringBuilder label = new StringBuilder(); - if (t.getEvent() != null && !t.getEvent().isBlank()) { - label.append(escapeDotString(t.getEvent())); + if (t.getEvent() != null) { + String eventStr = options.formatEvent(t.getEvent()); + if (eventStr != null && !eventStr.isBlank()) { + label.append(escapeDotString(eventStr)); + } } // Guard diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/EnumFormat.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/EnumFormat.java new file mode 100644 index 0000000..b9f69b3 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/EnumFormat.java @@ -0,0 +1,5 @@ +package click.kamil.springstatemachineexporter.exporter; + +public enum EnumFormat { + fn, fqn, sn +} 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 index 809fd90..6eecf77 100644 --- 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 @@ -12,4 +12,35 @@ public class ExportOptions { boolean renderChoicesAsDiamonds = true; @Builder.Default boolean embedIdentifiers = false; + + @Builder.Default + EnumFormat eventFormat = EnumFormat.fn; + @Builder.Default + EnumFormat stateFormat = EnumFormat.fn; + + public String formatState(click.kamil.springstatemachineexporter.model.State state) { + if (state == null) return null; + return format(state.rawName(), state.fullIdentifier(), stateFormat); + } + + public String formatEvent(click.kamil.springstatemachineexporter.model.Event event) { + if (event == null) return null; + return format(event.rawName(), event.fullIdentifier(), eventFormat); + } + + private String format(String raw, String fqn, EnumFormat format) { + if (fqn == null) return raw; + switch (format) { + case fqn: return fqn; + case sn: return fqn.substring(fqn.lastIndexOf('.') + 1); + case fn: + int lastDot = fqn.lastIndexOf('.'); + if (lastDot > 0) { + int prevDot = fqn.lastIndexOf('.', lastDot - 1); + return prevDot > 0 ? fqn.substring(prevDot + 1) : fqn; + } + return fqn; + default: return raw; + } + } } 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 cab1b53..441fc08 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 @@ -63,7 +63,7 @@ public class PlantUml implements StateMachineExporter { for (Transition t : transitions) { if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) { for (State source : t.getSourceStates()) { - statesWithChoice.add(simplify(source.toString())); + statesWithChoice.add(simplify(options.formatState(source))); } } } @@ -77,7 +77,7 @@ public class PlantUml implements StateMachineExporter { Set junctionStates = transitions.stream() .filter(t -> t.getType() == TransitionType.JUNCTION) .flatMap(t -> t.getSourceStates().stream()) - .map(s -> simplify(s.toString())) + .map(s -> simplify(options.formatState(s))) .collect(Collectors.toCollection(java.util.LinkedHashSet::new)); for (String junction : junctionStates) { if (options.isRenderChoicesAsDiamonds()) { @@ -96,16 +96,16 @@ public class PlantUml implements StateMachineExporter { List targets; if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) { if (!allowNoTarget) { - targets = t.getSourceStates().stream().map(s -> s.toString()).toList(); + targets = t.getSourceStates().stream().map(s -> options.formatState(s)).toList(); } else { continue; } } else { - targets = t.getTargetStates().stream().map(s -> s.toString()).toList(); + targets = t.getTargetStates().stream().map(s -> options.formatState(s)).toList(); } for (State rawSourceState : t.getSourceStates()) { - String source = simplify(rawSourceState.toString()); + String source = simplify(options.formatState(rawSourceState)); for (String rawTarget : targets) { String target = simplify(rawTarget); @@ -116,13 +116,17 @@ public class PlantUml implements StateMachineExporter { sb.append(" <<").append(styleClass).append(">>"); - if (t.getEvent() != null && !t.getEvent().isBlank()) { - sb.append(" <>"); + if (t.getEvent() != null) { + String eventStr = options.formatEvent(t.getEvent()); + if (eventStr != null && !eventStr.isBlank()) { + sb.append(" <>"); + } } - String label = buildLabel(t, options.isUseLambdaGuards()); + String label = buildLabel(t, options); if (options.isEmbedIdentifiers()) { - String linkId = t.getEvent() != null ? "link_" + normalize(t.getEvent()) : "link_anon_" + normalize(source) + "_" + normalize(target); + String eventStr = t.getEvent() != null ? options.formatEvent(t.getEvent()) : null; + String linkId = eventStr != null && !eventStr.isBlank() ? "link_" + normalize(eventStr) : "link_anon_" + normalize(source) + "_" + normalize(target); // Force a label even if empty to ensure the link group exists in SVG String displayLabel = label.isEmpty() ? " " : label; // Brackets [...] in the label break PlantUML link syntax [[url label]], @@ -191,14 +195,17 @@ public class PlantUml implements StateMachineExporter { return state.replaceAll("[^a-zA-Z0-9_.]", ""); } - private String buildLabel(Transition t, boolean useLambdaGuards) { + private String buildLabel(Transition t, ExportOptions options) { List parts = new ArrayList<>(); - if (t.getEvent() != null && !t.getEvent().isBlank()) { - parts.add(t.getEvent()); + if (t.getEvent() != null) { + String eventStr = options.formatEvent(t.getEvent()); + if (eventStr != null && !eventStr.isBlank()) { + parts.add(eventStr); + } } if (t.getGuard() != null) { String g = t.getGuard().expression(); - if (useLambdaGuards && t.getGuard().isLambda()) { + if (options.isUseLambdaGuards() && t.getGuard().isLambda()) { parts.add("[" + LAMBDA + "]"); } else { parts.add("[" + g.replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim() + "]"); @@ -206,7 +213,7 @@ public class PlantUml implements StateMachineExporter { } if (t.getActions() != null && !t.getActions().isEmpty()) { parts.add("/ " + t.getActions().stream() - .map(a -> (useLambdaGuards && a.isLambda()) ? LAMBDA : a.expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim()) + .map(a -> (options.isUseLambdaGuards() && a.isLambda()) ? LAMBDA : a.expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim()) .collect(Collectors.joining(", "))); } Optional.ofNullable(t.getOrder()) diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/exporter/Scxml.java index 2f09af7..73f8c80 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 @@ -31,8 +31,8 @@ public class Scxml implements StateMachineExporter { Set allStates = new java.util.LinkedHashSet<>(); for (Transition t : transitions) { - t.getSourceStates().forEach(s -> allStates.add(s.toString())); - t.getTargetStates().forEach(s -> allStates.add(s.toString())); + t.getSourceStates().forEach(s -> allStates.add(options.formatState(s))); + t.getTargetStates().forEach(s -> allStates.add(options.formatState(s))); } allStates.addAll(startStates); allStates.addAll(endStates); @@ -41,7 +41,7 @@ public class Scxml implements StateMachineExporter { sb.append(" \n"); for (Transition t : transitions) { - if (t.getSourceStates() == null || t.getSourceStates().stream().noneMatch(s -> s.toString().equals(state))) + if (t.getSourceStates() == null || t.getSourceStates().stream().noneMatch(s -> options.formatState(s).equals(state))) continue; boolean allowNoTarget = t.getType() == TransitionType.JOIN || t.getType() == TransitionType.FORK; @@ -58,7 +58,7 @@ public class Scxml implements StateMachineExporter { } for (State target : targets) { - sb.append(renderTransition(t, target, options.isUseLambdaGuards())); + sb.append(renderTransition(t, target, options)); } } sb.append(" \n"); @@ -73,15 +73,18 @@ public class Scxml implements StateMachineExporter { return ".scxml.xml"; } - private String renderTransition(Transition t, State target, boolean useLambdaGuards) { + private String renderTransition(Transition t, State target, ExportOptions options) { StringBuilder sb = new StringBuilder(); - sb.append(" sourceStates = new ArrayList<>(); private List targetStates = new ArrayList<>(); - private String event; + private Event event; private Guard guard; private List actions = new ArrayList<>(); 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 1a4057b..c746992 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 @@ -52,14 +52,22 @@ public class ExportService { public static final Set STATE_MACHINE_RETURN_TYPES = Set.of("StateMachine", "StateMachineFactory", "StateMachineModelFactory"); public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds) throws IOException { - runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, Collections.emptyList()); + runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, Collections.emptyList(), click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); } public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List activeProfiles) throws IOException { - runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null); + runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); } public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List activeProfiles, Path flowsOverride, String machineFilter) throws IOException { + runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, flowsOverride, machineFilter, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); + } + + public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { + runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null, eventFormat, stateFormat); + } + + public void runExporter(Path inputDir, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List activeProfiles, Path flowsOverride, String machineFilter, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { CodebaseContext context = new CodebaseContext(); context.setActiveProfiles(activeProfiles); @@ -116,21 +124,25 @@ public class ExportService { context.scan(allPaths, Collections.emptySet()); CodebaseIntelligenceProvider intelligence = new JdtIntelligenceProvider(context, inputDir); - exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows, machineFilter, activeProfiles != null ? activeProfiles : Collections.emptyList()); + exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows, machineFilter, activeProfiles != null ? activeProfiles : Collections.emptyList(), eventFormat, stateFormat); } public void runJsonExporter(Path jsonFile, Path outputDir, List selectedFormats) throws IOException { - runJsonExporter(jsonFile, outputDir, selectedFormats, Collections.emptyList()); + runJsonExporter(jsonFile, outputDir, selectedFormats, Collections.emptyList(), click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); } public void runJsonExporter(Path jsonFile, Path outputDir, List selectedFormats, List activeProfiles) throws IOException { + runJsonExporter(jsonFile, outputDir, selectedFormats, activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); + } + + public void runJsonExporter(Path jsonFile, Path outputDir, List selectedFormats, List activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { JsonImportService jsonImportService = new JsonImportService(); AnalysisResult result = jsonImportService.importAnalysisResult(jsonFile); // Apply property resolution pass if placeholders exist resolveProperties(result, activeProfiles); - generateOutputs(outputDir, result, selectedFormats); + generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); } private void resolveProperties(AnalysisResult result, List activeProfiles) { @@ -154,7 +166,7 @@ public class ExportService { result.applyResolution(merged); } - private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, String machineFilter, List activeProfiles) throws IOException { + private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, String machineFilter, List activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { Set processedLocations = new HashSet<>(); // 1. Find entry point classes (annotated or extending adapter) @@ -163,7 +175,7 @@ public class ExportService { String fqn = context.getFqn(td); if (machineFilter != null && !fqn.contains(machineFilter)) continue; if (processedLocations.add(fqn)) { - processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles); + processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles, eventFormat, stateFormat); } } @@ -177,12 +189,12 @@ public class ExportService { if (machineFilter != null && !uniqueId.contains(machineFilter)) continue; if (processedLocations.add(uniqueId)) { - processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles); + processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles, eventFormat, stateFormat); } } } - private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, List activeProfiles) throws IOException { + private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, List activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { String className = context.getFqn(td); log.info("Processing state machine config: {}", className); @@ -214,10 +226,10 @@ public class ExportService { resolveProperties(result, activeProfiles); - generateOutputs(outputDir, result, selectedFormats); + generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); } - private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, List activeProfiles) throws IOException { + private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List selectedFormats, boolean renderChoicesAsDiamonds, List flows, List activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { TypeDeclaration parentClass = (TypeDeclaration) m.getParent(); String parentFqn = context.getFqn(parentClass); String methodName = m.getName().getIdentifier(); @@ -245,10 +257,10 @@ public class ExportService { resolveProperties(result, activeProfiles); - generateOutputs(outputDir, result, selectedFormats); + generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); } - private void generateOutputs(Path outputDir, AnalysisResult result, List selectedFormats) throws IOException { + private void generateOutputs(Path outputDir, AnalysisResult result, List selectedFormats, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException { if (selectedFormats == null || selectedFormats.isEmpty()) { return; } @@ -259,6 +271,8 @@ public class ExportService { ExportOptions options = ExportOptions.builder() .renderChoicesAsDiamonds(result.isRenderChoicesAsDiamonds()) + .eventFormat(eventFormat) + .stateFormat(stateFormat) .build(); for (StateMachineExporter exporter : exporters) { diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/GoldenUpdater.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/GoldenUpdater.java index 8f86472..e5c4eae 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/GoldenUpdater.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/GoldenUpdater.java @@ -34,7 +34,7 @@ public class GoldenUpdater { System.out.println("Updating golden files for: " + scenario.name()); Path tempDir = Files.createTempDirectory("golden-update-"); try { - exportService.runExporter(scenario.inputPath(), tempDir, null, true); + exportService.runExporter(scenario.inputPath(), tempDir, List.of("puml", "dot", "scxml", "json"), true); List generatedDirs; try (var stream = Files.list(tempDir)) { diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParserTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParserTest.java index 86412e8..44a01e0 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParserTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/AstTransitionParserTest.java @@ -47,9 +47,7 @@ class AstTransitionParserTest { .isEqualTo(TransitionType.EXTERNAL); assertThat(transition.getSourceStates()).extracting(State::toString).containsExactly("CREATED"); assertThat(transition.getTargetStates()).extracting(State::toString).containsExactly("PAID"); - assertThat(transition) - .extracting(Transition::getEvent) - .isEqualTo("PAY"); + assertThat(transition.getEvent().toString()).isEqualTo("PAY"); } @Test @@ -211,8 +209,8 @@ class AstTransitionParserTest { List transitions = AstTransitionParser.parseTransitions(method, context); assertThat(transitions).hasSize(2); - assertThat(transitions.get(0).getEvent()).isEqualTo("E1"); - assertThat(transitions.get(1).getEvent()).isEqualTo("E2"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("E1"); + assertThat(transitions.get(1).getEvent().toString()).isEqualTo("E2"); } @Test diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/StateMachineAggregatorTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/StateMachineAggregatorTest.java index 74dc872..6e9da3f 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/StateMachineAggregatorTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/ast/app/StateMachineAggregatorTest.java @@ -58,8 +58,8 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(childTd); assertThat(transitions).hasSize(2); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("BASE_E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("CHILD_E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("BASE_E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("CHILD_E1")); } @Test @@ -93,7 +93,7 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(childTd); assertThat(transitions).hasSize(1); - assertThat(transitions.get(0).getEvent()).isEqualTo("OVERRIDDEN_E1"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("OVERRIDDEN_E1"); } @Test @@ -119,7 +119,7 @@ class StateMachineAggregatorTest { assertThat(transitions).hasSize(1); assertThat(transitions.get(0).getSourceStates()).extracting(State::toString).containsExactly("START"); assertThat(transitions.get(0).getTargetStates()).extracting(State::toString).containsExactly("END"); - assertThat(transitions.get(0).getEvent()).isEqualTo("GO"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("GO"); } @Test @@ -143,8 +143,8 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(td); assertThat(transitions).hasSize(2); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2")); } @Test @@ -241,9 +241,9 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(childTd); assertThat(transitions).hasSize(3); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("GP_E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("P_E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("C_E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("GP_E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("P_E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("C_E1")); } @Test @@ -267,8 +267,8 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(td); assertThat(transitions).hasSize(2); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2")); } @Test @@ -381,7 +381,7 @@ class StateMachineAggregatorTest { // It might not find ExternalTransitions.addCommon unless it's static or we handle imports. // Let's see if it works or if we need to improve the aggregator. assertThat(transitions).hasSize(1); - assertThat(transitions.get(0).getEvent()).isEqualTo("EXT_E1"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("EXT_E1"); } @Test @@ -408,8 +408,8 @@ class StateMachineAggregatorTest { // Should not crash and should find both transitions assertThat(transitions).hasSize(2); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2")); } @Test @@ -434,7 +434,7 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(td); assertThat(transitions).hasSize(1); - assertThat(transitions.get(0).getEvent()).isEqualTo("TRY_E1"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("TRY_E1"); } @Test @@ -536,8 +536,8 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(td); assertThat(transitions).hasSize(2); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1")); - assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1")); + assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2")); } @Test @@ -585,7 +585,7 @@ class StateMachineAggregatorTest { List transitions = aggregator.aggregateTransitions(td); assertThat(transitions).hasSize(1); - assertThat(transitions.get(0).getEvent()).isEqualTo("E1"); + assertThat(transitions.get(0).getEvent().toString()).isEqualTo("E1"); } private void writeClass(String name, String source) throws IOException { 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 6625636..c1cfd2f 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 @@ -20,7 +20,7 @@ class JsonExporterTest { transition.setType(TransitionType.EXTERNAL); transition.setSourceStates(List.of(State.of("S1"))); transition.setTargetStates(List.of(State.of("S2"))); - transition.setEvent("E1"); + transition.setEvent(click.kamil.springstatemachineexporter.model.Event.of("E1")); AnalysisResult result = AnalysisResult.builder() .name("TestSM") @@ -33,7 +33,7 @@ class JsonExporterTest { assertThat(json) .contains("\"name\" : \"TestSM\"") - .contains("\"event\" : \"E1\"") + .contains("\"rawName\" : \"E1\"") .contains("\"rawName\" : \"S1\"") .contains("\"rawName\" : \"S2\""); } diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/PlantUmlTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/PlantUmlTest.java new file mode 100644 index 0000000..44e3a70 --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/exporter/PlantUmlTest.java @@ -0,0 +1,67 @@ +package click.kamil.springstatemachineexporter.exporter; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.model.Event; +import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Transition; +import click.kamil.springstatemachineexporter.model.TransitionType; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.Set; + +import static org.assertj.core.api.Assertions.assertThat; + +class PlantUmlTest { + + @Test + void shouldFormatTransitionsWithDifferentEnumFormats() { + // Given + PlantUml exporter = new PlantUml(); + Transition transition = new Transition(); + transition.setType(TransitionType.EXTERNAL); + transition.setSourceStates(List.of(State.of("States.S1", "com.example.States.S1"))); + transition.setTargetStates(List.of(State.of("States.S2", "com.example.States.S2"))); + transition.setEvent(Event.of("Events.E1", "com.example.Events.E1")); + + AnalysisResult result = AnalysisResult.builder() + .name("TestSM") + .transitions(List.of(transition)) + .startStates(Set.of("States.S1")) + .endStates(Set.of("States.S2")) + .build(); + + // Test FN (Full Name - Default) + ExportOptions optionsFn = ExportOptions.builder() + .stateFormat(EnumFormat.fn) + .eventFormat(EnumFormat.fn) + .build(); + String pumlFn = exporter.export(result, optionsFn); + assertThat(pumlFn) + .contains("States.S1 -[#") + .contains("]-> States.S2") + .contains(" : Events.E1"); + + // Test FQN (Fully Qualified Name) + ExportOptions optionsFqn = ExportOptions.builder() + .stateFormat(EnumFormat.fqn) + .eventFormat(EnumFormat.fqn) + .build(); + String pumlFqn = exporter.export(result, optionsFqn); + assertThat(pumlFqn) + .contains("com.example.States.S1 -[#") + .contains("]-> com.example.States.S2") + .contains(" : com.example.Events.E1"); + + // Test SN (Short Name) + ExportOptions optionsSn = ExportOptions.builder() + .stateFormat(EnumFormat.sn) + .eventFormat(EnumFormat.sn) + .build(); + String pumlSn = exporter.export(result, optionsSn); + assertThat(pumlSn) + .contains("S1 -[#") + .contains("]-> S2") + .contains(" : E1"); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/DeferredProfileResolutionTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/DeferredProfileResolutionTest.java index 2f9cab4..fd461e3 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/DeferredProfileResolutionTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/DeferredProfileResolutionTest.java @@ -27,7 +27,7 @@ public class DeferredProfileResolutionTest { assertThat(result.getStartStates()).containsExactly("START_RESOLVED"); Transition t = result.getTransitions().get(0); - assertThat(t.getEvent()).isEqualTo("RESOLVED_EVENT"); + assertThat(t.getEvent().fullIdentifier()).isEqualTo("RESOLVED_EVENT"); assertThat(t.getSourceStates().get(0).fullIdentifier()).isEqualTo("START_RESOLVED"); } @@ -53,7 +53,7 @@ public class DeferredProfileResolutionTest { State s2 = State.of("END", "END"); Transition t1 = new Transition(); - t1.setEvent("${app.event.name:RESOLVED_EVENT}"); + t1.setEvent(click.kamil.springstatemachineexporter.model.Event.of("${app.event.name:RESOLVED_EVENT}")); t1.setSourceStates(List.of(s1)); t1.setTargetStates(List.of(s2)); diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/JsonImportServiceTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/JsonImportServiceTest.java index 53d09b3..532f21e 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/JsonImportServiceTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/service/JsonImportServiceTest.java @@ -23,7 +23,7 @@ class JsonImportServiceTest { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "S1", "fullIdentifier" : "S1" } ], "targetStates" : [ { "rawName" : "S2", "fullIdentifier" : "S2" } ], - "event" : "E1" + "event" : { "rawName" : "E1", "fullIdentifier" : "E1" } } ], "startStates" : [ "S1" ], "endStates" : [ "S2" ] @@ -36,7 +36,7 @@ class JsonImportServiceTest { assertThat(model.getName()).isEqualTo("ImportedSM"); assertThat(model.getTransitions()).hasSize(1); - assertThat(model.getTransitions().get(0).getEvent()).isEqualTo("E1"); + assertThat(model.getTransitions().get(0).getEvent().rawName()).isEqualTo("E1"); assertThat(model.getStartStates()).containsExactly("S1"); assertThat(model.getEndStates()).containsExactly("S2"); } diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json index 01ea4ae..a6278ad 100644 --- a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json index f09a790..b2f324e 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json @@ -328,7 +328,10 @@ "rawName" : "\"CHECK_AVAILABILITY\"", "fullIdentifier" : "CHECK_AVAILABILITY" } ], - "event" : "PLACE_ORDER", + "event" : { + "rawName" : "OrderEvents.PLACE", + "fullIdentifier" : "PLACE_ORDER" + }, "guard" : null, "actions" : [ ], "order" : null @@ -377,7 +380,10 @@ "rawName" : "\"PAID\"", "fullIdentifier" : "PAID" } ], - "event" : "PAY_ORDER", + "event" : { + "rawName" : "OrderEvents.PAY", + "fullIdentifier" : "PAY_ORDER" + }, "guard" : null, "actions" : [ ], "order" : null @@ -391,7 +397,10 @@ "rawName" : "\"SHIPPED\"", "fullIdentifier" : "SHIPPED" } ], - "event" : "SHIP_ORDER", + "event" : { + "rawName" : "OrderEvents.SHIP", + "fullIdentifier" : "SHIP_ORDER" + }, "guard" : null, "actions" : [ ], "order" : null @@ -405,7 +414,10 @@ "rawName" : "\"DELIVERED\"", "fullIdentifier" : "DELIVERED" } ], - "event" : "FINALIZE", + "event" : { + "rawName" : "\"FINALIZE\"", + "fullIdentifier" : "FINALIZE" + }, "guard" : null, "actions" : [ ], "order" : null @@ -419,7 +431,10 @@ "rawName" : "\"CANCELLED\"", "fullIdentifier" : "CANCELLED" } ], - "event" : "CANCEL_ORDER", + "event" : { + "rawName" : "OrderEvents.CANCEL", + "fullIdentifier" : "CANCEL_ORDER" + }, "guard" : null, "actions" : [ ], "order" : null @@ -433,7 +448,10 @@ "rawName" : "\"RETURNED\"", "fullIdentifier" : "RETURNED" } ], - "event" : "RETURN_ORDER", + "event" : { + "rawName" : "OrderEvents.RETURN", + "fullIdentifier" : "RETURN_ORDER" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json index 17d570c..6943c58 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json @@ -322,7 +322,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "SUBMIT_EVENT", + "event" : { + "rawName" : "MyEvents.SUBMIT", + "fullIdentifier" : "SUBMIT_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -336,7 +339,10 @@ "rawName" : "\"COMPLETED\"", "fullIdentifier" : "COMPLETED" } ], - "event" : "FINISH", + "event" : { + "rawName" : "\"FINISH\"", + "fullIdentifier" : "FINISH" + }, "guard" : null, "actions" : [ ], "order" : null @@ -350,7 +356,10 @@ "rawName" : "\"CANCELLED\"", "fullIdentifier" : "CANCELLED" } ], - "event" : "CANCEL_EVENT", + "event" : { + "rawName" : "MyEvents.CANCEL", + "fullIdentifier" : "CANCEL_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -364,7 +373,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "REACTIVE_EVENT", + "event" : { + "rawName" : "\"REACTIVE_EVENT\"", + "fullIdentifier" : "REACTIVE_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -378,7 +390,10 @@ "rawName" : "\"START\"", "fullIdentifier" : "START" } ], - "event" : "AUDIT_EVENT", + "event" : { + "rawName" : "\"AUDIT_EVENT\"", + "fullIdentifier" : "AUDIT_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -392,7 +407,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "EXTERNAL_TRIGGER", + "event" : { + "rawName" : "\"EXTERNAL_TRIGGER\"", + "fullIdentifier" : "EXTERNAL_TRIGGER" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.json index dba5225..eeab3fc 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.json @@ -322,7 +322,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "SUBMIT_EVENT", + "event" : { + "rawName" : "MyEvents.SUBMIT", + "fullIdentifier" : "SUBMIT_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -336,7 +339,10 @@ "rawName" : "\"COMPLETED\"", "fullIdentifier" : "COMPLETED" } ], - "event" : "FINISH", + "event" : { + "rawName" : "\"FINISH\"", + "fullIdentifier" : "FINISH" + }, "guard" : null, "actions" : [ ], "order" : null @@ -350,7 +356,10 @@ "rawName" : "\"CANCELLED\"", "fullIdentifier" : "CANCELLED" } ], - "event" : "CANCEL_EVENT", + "event" : { + "rawName" : "MyEvents.CANCEL", + "fullIdentifier" : "CANCEL_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -364,7 +373,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "REACTIVE_EVENT", + "event" : { + "rawName" : "\"REACTIVE_EVENT\"", + "fullIdentifier" : "REACTIVE_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -378,7 +390,10 @@ "rawName" : "\"START\"", "fullIdentifier" : "START" } ], - "event" : "AUDIT_EVENT", + "event" : { + "rawName" : "\"AUDIT_EVENT\"", + "fullIdentifier" : "AUDIT_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -392,7 +407,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "EXTERNAL_TRIGGER", + "event" : { + "rawName" : "\"EXTERNAL_TRIGGER\"", + "fullIdentifier" : "EXTERNAL_TRIGGER" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json index 8530325..461d675 100644 --- a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null @@ -232,7 +277,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -246,7 +294,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -260,7 +311,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -274,7 +328,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -288,7 +345,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -302,7 +362,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -764,7 +827,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENTX", + "event" : { + "rawName" : "Events.EVENTX", + "fullIdentifier" : "Events.EVENTX" + }, "guard" : null, "actions" : [ ], "order" : null @@ -813,7 +879,10 @@ "rawName" : "States.STATE_EXTRA_3", "fullIdentifier" : "States.STATE_EXTRA_3" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -827,7 +896,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -841,7 +913,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json index a64eb0e..f2c5bfa 100644 --- a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null @@ -232,7 +277,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -246,7 +294,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -260,7 +311,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -274,7 +328,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -288,7 +345,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -302,7 +362,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -764,7 +827,10 @@ "rawName" : "States.STATE_EXTRA_1_1", "fullIdentifier" : "States.STATE_EXTRA_1_1" } ], - "event" : "Events.EVENT_1_1", + "event" : { + "rawName" : "Events.EVENT_1_1", + "fullIdentifier" : "Events.EVENT_1_1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -813,7 +879,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENT_1_2", + "event" : { + "rawName" : "Events.EVENT_1_2", + "fullIdentifier" : "Events.EVENT_1_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -827,7 +896,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -841,7 +913,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -855,7 +930,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json index 7da7af6..1c2dd63 100644 --- a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json @@ -22,7 +22,10 @@ "rawName" : "States.FORK", "fullIdentifier" : "States.FORK" } ], - "event" : "Events.TO_FORK", + "event" : { + "rawName" : "Events.TO_FORK", + "fullIdentifier" : "Events.TO_FORK" + }, "guard" : null, "actions" : [ ], "order" : null @@ -53,7 +56,10 @@ "rawName" : "States.REGION1_STATE2", "fullIdentifier" : "States.REGION1_STATE2" } ], - "event" : "Events.R1_NEXT", + "event" : { + "rawName" : "Events.R1_NEXT", + "fullIdentifier" : "Events.R1_NEXT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -67,7 +73,10 @@ "rawName" : "States.REGION2_STATE2", "fullIdentifier" : "States.REGION2_STATE2" } ], - "event" : "Events.R2_NEXT", + "event" : { + "rawName" : "Events.R2_NEXT", + "fullIdentifier" : "Events.R2_NEXT" + }, "guard" : null, "actions" : [ ], "order" : null @@ -98,7 +107,10 @@ "rawName" : "States.END", "fullIdentifier" : "States.END" } ], - "event" : "Events.TO_END", + "event" : { + "rawName" : "Events.TO_END", + "fullIdentifier" : "Events.TO_END" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json index 2f7531f..c9847f7 100644 --- a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -358,7 +403,10 @@ "rawName" : "States.STATE_EXTRA_2", "fullIdentifier" : "States.STATE_EXTRA_2" } ], - "event" : "Events.EVENT_1_2", + "event" : { + "rawName" : "Events.EVENT_1_2", + "fullIdentifier" : "Events.EVENT_1_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -372,7 +420,10 @@ "rawName" : "States.STATE_EXTRA_3", "fullIdentifier" : "States.STATE_EXTRA_3" } ], - "event" : "Events.EVENT_1_2", + "event" : { + "rawName" : "Events.EVENT_1_2", + "fullIdentifier" : "Events.EVENT_1_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -386,7 +437,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json index 2e40a9c..e752b9b 100644 --- a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -358,7 +403,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENT_1_2", + "event" : { + "rawName" : "Events.EVENT_1_2", + "fullIdentifier" : "Events.EVENT_1_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -372,7 +420,10 @@ "rawName" : "States.STATE_EXTRA_2", "fullIdentifier" : "States.STATE_EXTRA_2" } ], - "event" : "Events.EVENT_1_3", + "event" : { + "rawName" : "Events.EVENT_1_3", + "fullIdentifier" : "Events.EVENT_1_3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -386,7 +437,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -400,7 +454,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json index 0a6645b..171a3dd 100644 --- a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json @@ -73,7 +73,10 @@ "rawName" : "\"WORKING\"", "fullIdentifier" : "WORKING" } ], - "event" : "INHERITED_SUBMIT", + "event" : { + "rawName" : "\"INHERITED_SUBMIT\"", + "fullIdentifier" : "INHERITED_SUBMIT" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json index cdb2781..e8a623e 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "OrderStates.PAID", "fullIdentifier" : "OrderStates.PAID" } ], - "event" : "OrderEvents.PAY", + "event" : { + "rawName" : "OrderEvents.PAY", + "fullIdentifier" : "OrderEvents.PAY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "OrderStates.FULFILLED", "fullIdentifier" : "OrderStates.FULFILLED" } ], - "event" : "OrderEvents.FULFILL", + "event" : { + "rawName" : "OrderEvents.FULFILL", + "fullIdentifier" : "OrderEvents.FULFILL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "OrderStates.CANCELED", "fullIdentifier" : "OrderStates.CANCELED" } ], - "event" : "OrderEvents.CANCEL", + "event" : { + "rawName" : "OrderEvents.CANCEL", + "fullIdentifier" : "OrderEvents.CANCEL" + }, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", "isLambda" : true, @@ -71,7 +80,10 @@ "rawName" : "OrderStates.CANCELED", "fullIdentifier" : "OrderStates.CANCELED" } ], - "event" : "OrderEvents.CANCEL", + "event" : { + "rawName" : "OrderEvents.CANCEL", + "fullIdentifier" : "OrderEvents.CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -82,7 +94,10 @@ "fullIdentifier" : "OrderStates.SUBMITTED" } ], "targetStates" : [ ], - "event" : "OrderEvents.ABCD", + "event" : { + "rawName" : "OrderEvents.ABCD", + "fullIdentifier" : "OrderEvents.ABCD" + }, "guard" : null, "actions" : [ ], "order" : null @@ -96,7 +111,10 @@ "rawName" : "OrderStates.PAID1", "fullIdentifier" : "OrderStates.PAID1" } ], - "event" : "OrderEvents.ABCD", + "event" : { + "rawName" : "OrderEvents.ABCD", + "fullIdentifier" : "OrderEvents.ABCD" + }, "guard" : null, "actions" : [ ], "order" : null @@ -212,7 +230,10 @@ "fullIdentifier" : "OrderStates.PAID2" } ], "targetStates" : [ ], - "event" : "OrderEvents.ABCD", + "event" : { + "rawName" : "OrderEvents.ABCD", + "fullIdentifier" : "OrderEvents.ABCD" + }, "guard" : null, "actions" : [ { "expression" : "new Action(){\n @Override public void execute( StateContext context){\n }\n}\n", diff --git a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json index 37d159a..78425f4 100644 --- a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json +++ b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json @@ -120,7 +120,10 @@ "rawName" : "\"BUSY\"", "fullIdentifier" : "BUSY" } ], - "event" : "SUBMIT", + "event" : { + "rawName" : "\"SUBMIT\"", + "fullIdentifier" : "SUBMIT" + }, "guard" : null, "actions" : [ { "expression" : "loggingAction()", @@ -141,7 +144,10 @@ "rawName" : "\"DONE\"", "fullIdentifier" : "DONE" } ], - "event" : "ORDER_EVENT", + "event" : { + "rawName" : "\"ORDER_EVENT\"", + "fullIdentifier" : "ORDER_EVENT" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json index 3e698ae..e438945 100644 --- a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null @@ -232,7 +277,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -694,7 +742,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENTX", + "event" : { + "rawName" : "Events.EVENTX", + "fullIdentifier" : "Events.EVENTX" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json index 0f80575..8b0662f 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json @@ -85,7 +85,10 @@ "rawName" : "\"PROCESSING\"", "fullIdentifier" : "PROCESSING" } ], - "event" : "SUBMIT", + "event" : { + "rawName" : "\"SUBMIT\"", + "fullIdentifier" : "SUBMIT" + }, "guard" : null, "actions" : [ { "expression" : "processAction()", @@ -106,7 +109,10 @@ "rawName" : "\"COMPLETED\"", "fullIdentifier" : "COMPLETED" } ], - "event" : "FINISH", + "event" : { + "rawName" : "\"FINISH\"", + "fullIdentifier" : "FINISH" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json index 080440d..e9e52a2 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "OrderStates.PAID", "fullIdentifier" : "OrderStates.PAID" } ], - "event" : "OrderEvents.PAY", + "event" : { + "rawName" : "OrderEvents.PAY", + "fullIdentifier" : "OrderEvents.PAY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "OrderStates.FULFILLED", "fullIdentifier" : "OrderStates.FULFILLED" } ], - "event" : "OrderEvents.FULFILL", + "event" : { + "rawName" : "OrderEvents.FULFILL", + "fullIdentifier" : "OrderEvents.FULFILL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "OrderStates.CANCELED", "fullIdentifier" : "OrderStates.CANCELED" } ], - "event" : "OrderEvents.CANCEL", + "event" : { + "rawName" : "OrderEvents.CANCEL", + "fullIdentifier" : "OrderEvents.CANCEL" + }, "guard" : { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", "isLambda" : true, @@ -71,7 +80,10 @@ "rawName" : "OrderStates.CANCELED", "fullIdentifier" : "OrderStates.CANCELED" } ], - "event" : "OrderEvents.CANCEL", + "event" : { + "rawName" : "OrderEvents.CANCEL", + "fullIdentifier" : "OrderEvents.CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -82,7 +94,10 @@ "fullIdentifier" : "OrderStates.SUBMITTED" } ], "targetStates" : [ ], - "event" : "OrderEvents.ABCD", + "event" : { + "rawName" : "OrderEvents.ABCD", + "fullIdentifier" : "OrderEvents.ABCD" + }, "guard" : null, "actions" : [ ], "order" : null @@ -233,7 +248,10 @@ "fullIdentifier" : "OrderStates.PAID1" } ], "targetStates" : [ ], - "event" : "OrderEvents.ABCD", + "event" : { + "rawName" : "OrderEvents.ABCD", + "fullIdentifier" : "OrderEvents.ABCD" + }, "guard" : null, "actions" : [ { "expression" : "new Action(){\n @Override public void execute( StateContext context){\n ;\n }\n}\n", diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json index 43684f7..094b1b3 100644 --- a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null @@ -232,7 +277,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -246,7 +294,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -260,7 +311,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -274,7 +328,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -288,7 +345,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -302,7 +362,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -764,7 +827,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENTX", + "event" : { + "rawName" : "Events.EVENTX", + "fullIdentifier" : "Events.EVENTX" + }, "guard" : null, "actions" : [ ], "order" : null @@ -813,7 +879,10 @@ "rawName" : "States.STATE_EXTRA_3", "fullIdentifier" : "States.STATE_EXTRA_3" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -827,7 +896,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -841,7 +913,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json index 4c9915e..b5f794d 100644 --- a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json @@ -22,7 +22,10 @@ "rawName" : "States.STATE2", "fullIdentifier" : "States.STATE2" } ], - "event" : "Events.EVENT1", + "event" : { + "rawName" : "Events.EVENT1", + "fullIdentifier" : "Events.EVENT1" + }, "guard" : null, "actions" : [ ], "order" : null @@ -36,7 +39,10 @@ "rawName" : "States.STATE3", "fullIdentifier" : "States.STATE3" } ], - "event" : "Events.EVENT2", + "event" : { + "rawName" : "Events.EVENT2", + "fullIdentifier" : "Events.EVENT2" + }, "guard" : null, "actions" : [ ], "order" : null @@ -50,7 +56,10 @@ "rawName" : "States.STATE4", "fullIdentifier" : "States.STATE4" } ], - "event" : "Events.EVENT3", + "event" : { + "rawName" : "Events.EVENT3", + "fullIdentifier" : "Events.EVENT3" + }, "guard" : null, "actions" : [ ], "order" : null @@ -64,7 +73,10 @@ "rawName" : "States.STATE5", "fullIdentifier" : "States.STATE5" } ], - "event" : "Events.EVENT4", + "event" : { + "rawName" : "Events.EVENT4", + "fullIdentifier" : "Events.EVENT4" + }, "guard" : null, "actions" : [ ], "order" : null @@ -78,7 +90,10 @@ "rawName" : "States.STATE6", "fullIdentifier" : "States.STATE6" } ], - "event" : "Events.EVENT5", + "event" : { + "rawName" : "Events.EVENT5", + "fullIdentifier" : "Events.EVENT5" + }, "guard" : null, "actions" : [ ], "order" : null @@ -92,7 +107,10 @@ "rawName" : "States.STATE7", "fullIdentifier" : "States.STATE7" } ], - "event" : "Events.EVENT6", + "event" : { + "rawName" : "Events.EVENT6", + "fullIdentifier" : "Events.EVENT6" + }, "guard" : null, "actions" : [ ], "order" : null @@ -106,7 +124,10 @@ "rawName" : "States.STATE8", "fullIdentifier" : "States.STATE8" } ], - "event" : "Events.EVENT7", + "event" : { + "rawName" : "Events.EVENT7", + "fullIdentifier" : "Events.EVENT7" + }, "guard" : null, "actions" : [ ], "order" : null @@ -120,7 +141,10 @@ "rawName" : "States.STATE9", "fullIdentifier" : "States.STATE9" } ], - "event" : "Events.EVENT8", + "event" : { + "rawName" : "Events.EVENT8", + "fullIdentifier" : "Events.EVENT8" + }, "guard" : null, "actions" : [ ], "order" : null @@ -134,7 +158,10 @@ "rawName" : "States.STATE10", "fullIdentifier" : "States.STATE10" } ], - "event" : "Events.EVENT9", + "event" : { + "rawName" : "Events.EVENT9", + "fullIdentifier" : "Events.EVENT9" + }, "guard" : null, "actions" : [ ], "order" : null @@ -148,7 +175,10 @@ "rawName" : "States.STATE11", "fullIdentifier" : "States.STATE11" } ], - "event" : "Events.EVENT10", + "event" : { + "rawName" : "Events.EVENT10", + "fullIdentifier" : "Events.EVENT10" + }, "guard" : null, "actions" : [ ], "order" : null @@ -162,7 +192,10 @@ "rawName" : "States.STATE12", "fullIdentifier" : "States.STATE12" } ], - "event" : "Events.EVENT11", + "event" : { + "rawName" : "Events.EVENT11", + "fullIdentifier" : "Events.EVENT11" + }, "guard" : null, "actions" : [ ], "order" : null @@ -176,7 +209,10 @@ "rawName" : "States.STATE13", "fullIdentifier" : "States.STATE13" } ], - "event" : "Events.EVENT12", + "event" : { + "rawName" : "Events.EVENT12", + "fullIdentifier" : "Events.EVENT12" + }, "guard" : null, "actions" : [ ], "order" : null @@ -190,7 +226,10 @@ "rawName" : "States.STATE14", "fullIdentifier" : "States.STATE14" } ], - "event" : "Events.EVENT13", + "event" : { + "rawName" : "Events.EVENT13", + "fullIdentifier" : "Events.EVENT13" + }, "guard" : null, "actions" : [ ], "order" : null @@ -204,7 +243,10 @@ "rawName" : "States.STATE15", "fullIdentifier" : "States.STATE15" } ], - "event" : "Events.EVENT14", + "event" : { + "rawName" : "Events.EVENT14", + "fullIdentifier" : "Events.EVENT14" + }, "guard" : null, "actions" : [ ], "order" : null @@ -218,7 +260,10 @@ "rawName" : "States.STATE16", "fullIdentifier" : "States.STATE16" } ], - "event" : "Events.EVENT15", + "event" : { + "rawName" : "Events.EVENT15", + "fullIdentifier" : "Events.EVENT15" + }, "guard" : null, "actions" : [ ], "order" : null @@ -232,7 +277,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -246,7 +294,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -260,7 +311,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -274,7 +328,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -288,7 +345,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -302,7 +362,10 @@ "rawName" : "States.STATEY", "fullIdentifier" : "States.STATEY" } ], - "event" : "Events.EVENTY", + "event" : { + "rawName" : "Events.EVENTY", + "fullIdentifier" : "Events.EVENTY" + }, "guard" : null, "actions" : [ ], "order" : null @@ -764,7 +827,10 @@ "rawName" : "States.STATE_EXTRA_1", "fullIdentifier" : "States.STATE_EXTRA_1" } ], - "event" : "Events.EVENTX", + "event" : { + "rawName" : "Events.EVENTX", + "fullIdentifier" : "Events.EVENTX" + }, "guard" : null, "actions" : [ ], "order" : null @@ -778,7 +844,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL", + "event" : { + "rawName" : "Events.EVENT_CANCEL", + "fullIdentifier" : "Events.EVENT_CANCEL" + }, "guard" : null, "actions" : [ ], "order" : null @@ -792,7 +861,10 @@ "rawName" : "States.CANCEL", "fullIdentifier" : "States.CANCEL" } ], - "event" : "Events.EVENT_CANCEL_2", + "event" : { + "rawName" : "Events.EVENT_CANCEL_2", + "fullIdentifier" : "Events.EVENT_CANCEL_2" + }, "guard" : null, "actions" : [ ], "order" : null