diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/AnalysisCanonicalFormEnricher.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/AnalysisCanonicalFormEnricher.java new file mode 100644 index 0000000..f83b2a9 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/AnalysisCanonicalFormEnricher.java @@ -0,0 +1,31 @@ +package click.kamil.springstatemachineexporter.analysis.enricher; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider; +import click.kamil.springstatemachineexporter.analysis.validation.AnalysisCanonicalFormValidator; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import lombok.extern.slf4j.Slf4j; + +/** + * Final enrichment step: fail fast when enum identifiers in the analysis model are not + * package-canonical. Disable with {@code -Danalyzer.canonical-form-validation.enabled=false}. + */ +@Slf4j +public class AnalysisCanonicalFormEnricher implements AnalysisEnricher { + + private final boolean enabled; + + public AnalysisCanonicalFormEnricher() { + this.enabled = Boolean.parseBoolean( + System.getProperty("analyzer.canonical-form-validation.enabled", "true")); + } + + @Override + public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { + if (!enabled || result == null || context == null) { + return; + } + log.debug("Validating canonical enum identifiers for {}", result.getName()); + AnalysisCanonicalFormValidator.enforce(result, context); + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/CallChainEnricher.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/CallChainEnricher.java index d0c9092..cee74f7 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/CallChainEnricher.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/CallChainEnricher.java @@ -3,11 +3,15 @@ package click.kamil.springstatemachineexporter.analysis.enricher; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.CallChain; import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import lombok.extern.slf4j.Slf4j; import java.util.List; +import java.util.stream.Collectors; @Slf4j public class CallChainEnricher implements AnalysisEnricher { @@ -15,13 +19,28 @@ public class CallChainEnricher implements AnalysisEnricher { @Override public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { log.info("Enriching {} with call chains", result.getName()); - + + StateMachineTypeResolver.MachineTypes machineTypes = + StateMachineTypeResolver.resolveTypes(result.getName(), context); + + List canonicalTriggers = intelligence.findTriggerPoints().stream() + .map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes)) + .collect(Collectors.toList()); + List chains = intelligence.findCallChains( result.getMetadata().getEntryPoints(), - intelligence.findTriggerPoints() + canonicalTriggers ); + chains = chains.stream() + .map(chain -> chain.getTriggerPoint() == null + ? chain + : chain.toBuilder() + .triggerPoint(MachineEnumCanonicalizer.canonicalizeTriggerPoint( + chain.getTriggerPoint(), machineTypes)) + .build()) + .collect(Collectors.toList()); chains = MachineScopeFilter.filterCallChainsForMachine(chains, result.getName(), context); - + result.addMetadata(CodebaseMetadata.builder() .callChains(chains) .build()); diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricher.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricher.java index 491722d..6736c9d 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricher.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricher.java @@ -15,17 +15,14 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import click.kamil.springstatemachineexporter.exporter.ExportOptions; -import click.kamil.springstatemachineexporter.analysis.enricher.routing.HeuristicBeanResolutionEngine; -import click.kamil.springstatemachineexporter.analysis.enricher.routing.BeanResolutionEngine; import click.kamil.springstatemachineexporter.analysis.enricher.matching.EventMatchingEngine; import click.kamil.springstatemachineexporter.analysis.enricher.matching.StrictFqnMatchingEngine; +import click.kamil.springstatemachineexporter.analysis.enricher.routing.BeanResolutionEngine; +import click.kamil.springstatemachineexporter.analysis.enricher.routing.HeuristicBeanResolutionEngine; import click.kamil.springstatemachineexporter.analysis.resolver.BooleanConstraintEvaluator; public class TransitionLinkerEnricher implements AnalysisEnricher { - private static final ExportOptions LINK_FORMAT_OPTIONS = ExportOptions.builder().build(); - private final BeanResolutionEngine routingEngine = new HeuristicBeanResolutionEngine(); private final EventMatchingEngine matchingEngine = new StrictFqnMatchingEngine(); @@ -52,9 +49,9 @@ public class TransitionLinkerEnricher implements AnalysisEnricher { for (Transition t : stateMachineTransitions) { if (t.getEvent() != null && matchingEngine.matches(t.getEvent(), tp)) { - String smEventForLink = formatEventForLink(t.getEvent()); + String smEventForLink = canonicalEvent(t.getEvent()); for (State smSourceState : t.getSourceStates()) { - String smSourceForLink = formatSourceForLink(smSourceState); + String smSourceForLink = canonicalState(smSourceState); String smSource = simplify(smSourceForLink); if (triggerSource == null || triggerSource.equals(smSource)) { if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) { @@ -69,7 +66,7 @@ public class TransitionLinkerEnricher implements AnalysisEnricher { } } else { for (State smTargetState : t.getTargetStates()) { - String targetForLink = formatSourceForLink(smTargetState); + String targetForLink = canonicalState(smTargetState); MatchedTransition mt = MatchedTransition.builder() .sourceState(smSourceForLink) .targetState(targetForLink) @@ -162,20 +159,18 @@ public class TransitionLinkerEnricher implements AnalysisEnricher { return simplified; } - private String formatSourceForLink(State state) { - if (state == null) return null; - return simplifyForLink(LINK_FORMAT_OPTIONS.formatState(state)); + private String canonicalState(State state) { + if (state == null) { + return null; + } + return state.fullIdentifier() != null ? state.fullIdentifier() : state.rawName(); } - private String formatEventForLink(click.kamil.springstatemachineexporter.model.Event event) { - if (event == null) return null; - return LINK_FORMAT_OPTIONS.formatEvent(event); - } - - private String simplifyForLink(String name) { - if (name == null) return ""; - if (name.contains("\"")) return name; - return name.replaceAll("[^a-zA-Z0-9_.]", ""); + private String canonicalEvent(click.kamil.springstatemachineexporter.model.Event event) { + if (event == null) { + return null; + } + return event.fullIdentifier() != null ? event.fullIdentifier() : event.rawName(); } private boolean isGuardedContains(String smEvent, String triggerEvent) { diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerCanonicalizationEnricher.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerCanonicalizationEnricher.java new file mode 100644 index 0000000..a4ec26b --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerCanonicalizationEnricher.java @@ -0,0 +1,63 @@ +package click.kamil.springstatemachineexporter.analysis.enricher; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; +import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import lombok.extern.slf4j.Slf4j; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Canonicalizes trigger-side enum identifiers ({@code event}, {@code polymorphicEvents}, + * {@code sourceState}) using the owning machine config's {@code } types. + */ +@Slf4j +public class TriggerCanonicalizationEnricher implements AnalysisEnricher { + + @Override + public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { + if (result.getMetadata() == null || context == null) { + return; + } + + StateMachineTypeResolver.MachineTypes machineTypes = + StateMachineTypeResolver.resolveTypes(result.getName(), context); + + List triggers = result.getMetadata().getTriggers(); + List canonicalTriggers = triggers == null ? null : triggers.stream() + .map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes)) + .collect(Collectors.toList()); + + List callChains = result.getMetadata().getCallChains(); + List canonicalChains = callChains == null ? null : callChains.stream() + .map(chain -> { + if (chain.getTriggerPoint() == null) { + return chain; + } + return chain.toBuilder() + .triggerPoint(MachineEnumCanonicalizer.canonicalizeTriggerPoint( + chain.getTriggerPoint(), machineTypes)) + .build(); + }) + .collect(Collectors.toList()); + + if (canonicalTriggers == null && canonicalChains == null) { + return; + } + + log.debug("Canonicalized triggers for {}", result.getName()); + + result.setMetadata(CodebaseMetadata.builder() + .triggers(canonicalTriggers != null ? canonicalTriggers : triggers) + .entryPoints(result.getMetadata().getEntryPoints()) + .callChains(canonicalChains != null ? canonicalChains : callChains) + .properties(result.getMetadata().getProperties()) + .build()); + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerEnricher.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerEnricher.java index 9fde869..eebc0bb 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerEnricher.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/TriggerEnricher.java @@ -2,11 +2,14 @@ package click.kamil.springstatemachineexporter.analysis.enricher; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import lombok.extern.slf4j.Slf4j; import java.util.List; +import java.util.stream.Collectors; @Slf4j public class TriggerEnricher implements AnalysisEnricher { @@ -14,8 +17,13 @@ public class TriggerEnricher implements AnalysisEnricher { @Override public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { log.info("Enriching {} with triggers", result.getName()); - - List triggers = intelligence.findTriggerPoints(); + + StateMachineTypeResolver.MachineTypes machineTypes = + StateMachineTypeResolver.resolveTypes(result.getName(), context); + + List triggers = intelligence.findTriggerPoints().stream() + .map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes)) + .collect(Collectors.toList()); triggers = MachineScopeFilter.filterTriggersForMachine(triggers, result.getName(), context); result.addMetadata(click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata.builder() diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngine.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngine.java index dfe7298..080ab7b 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngine.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngine.java @@ -12,18 +12,18 @@ public class StrictFqnMatchingEngine implements EventMatchingEngine { return false; } + String smEventRaw = stateMachineEvent.fullIdentifier() != null ? stateMachineEvent.fullIdentifier() : stateMachineEvent.rawName(); + String rawTriggerEvent = triggerPoint.getEvent(); + if (triggerPoint.isExternal()) { List polyEvents = triggerPoint.getPolymorphicEvents() != null ? triggerPoint.getPolymorphicEvents() : java.util.Collections.emptyList(); - if (polyEvents.isEmpty()) { + if (polyEvents.isEmpty() && isDynamicVariable(rawTriggerEvent)) { return false; } } - String smEventRaw = stateMachineEvent.fullIdentifier() != null ? stateMachineEvent.fullIdentifier() : stateMachineEvent.rawName(); - String rawTriggerEvent = triggerPoint.getEvent(); - if (rawTriggerEvent != null && rawTriggerEvent.startsWith("")) { return false; } @@ -150,9 +150,13 @@ public class StrictFqnMatchingEngine implements EventMatchingEngine { } if (eventStr.contains(".")) { + String constantPart = eventStr.substring(eventStr.lastIndexOf('.') + 1); + if (!constantPart.isEmpty() && Character.isUpperCase(constantPart.charAt(0))) { + return false; + } String firstPart = eventStr.substring(0, eventStr.indexOf('.')); if (!firstPart.isEmpty() && Character.isLowerCase(firstPart.charAt(0))) { - return true; + return true; } return false; } diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngine.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngine.java index 16482bf..75bcae9 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngine.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngine.java @@ -1,6 +1,7 @@ package click.kamil.springstatemachineexporter.analysis.enricher.routing; import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import org.eclipse.jdt.core.dom.TypeDeclaration; @@ -16,17 +17,18 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine { String triggerEventFqn = chain.getTriggerPoint().getEventTypeFqn(); String triggerStateFqn = chain.getTriggerPoint().getStateTypeFqn(); if (triggerEventFqn != null || triggerStateFqn != null) { - String[] machineTypes = getStateMachineTypeArguments(currentMachineName, context); + String[] machineTypes = StateMachineTypeResolver.resolve(currentMachineName, context); String machineStateFqn = machineTypes[0]; String machineEventFqn = machineTypes[1]; if (triggerEventFqn != null && machineEventFqn != null) { if (eraseGenerics(triggerEventFqn).equals(eraseGenerics(machineEventFqn))) { - return true; // Match! + return true; } if (isTypeMismatched(triggerEventFqn, machineEventFqn)) { - return false; // Mismatch! + return false; } + return false; } if (triggerStateFqn != null && machineStateFqn != null) { if (eraseGenerics(triggerStateFqn).equals(eraseGenerics(machineStateFqn))) { @@ -298,59 +300,6 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine { return null; } - private String[] getStateMachineTypeArguments(String machineName, CodebaseContext context) { - org.eclipse.jdt.core.dom.TypeDeclaration td = context.getTypeDeclaration(machineName); - if (td != null) { - org.eclipse.jdt.core.dom.Type superclass = td.getSuperclassType(); - Set visited = new HashSet<>(); - visited.add(machineName); - return findTypeArgumentsRecursively(superclass, context, (org.eclipse.jdt.core.dom.CompilationUnit) td.getRoot(), visited); - } - return new String[]{null, null}; - } - - private String[] findTypeArgumentsRecursively(org.eclipse.jdt.core.dom.Type type, CodebaseContext context, org.eclipse.jdt.core.dom.CompilationUnit cu, Set visited) { - if (type == null) return new String[]{null, null}; - - if (type instanceof org.eclipse.jdt.core.dom.ParameterizedType pt) { - String rawTypeName = pt.getType().toString(); - if (rawTypeName.equals("StateMachineConfigurerAdapter") || rawTypeName.equals("EnumStateMachineConfigurerAdapter") || - rawTypeName.endsWith(".StateMachineConfigurerAdapter") || rawTypeName.endsWith(".EnumStateMachineConfigurerAdapter")) { - java.util.List typeArgs = pt.typeArguments(); - if (typeArgs.size() >= 2) { - String stateType = resolveTypeToFqn((org.eclipse.jdt.core.dom.Type) typeArgs.get(0), cu, context); - String eventType = resolveTypeToFqn((org.eclipse.jdt.core.dom.Type) typeArgs.get(1), cu, context); - return new String[]{stateType, eventType}; - } - } - - // Recurse into the raw type declaration's superclass - org.eclipse.jdt.core.dom.AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(rawTypeName, cu); - if (td != null) { - String fqn = context.getFqn(td); - if (visited.add(fqn)) { - org.eclipse.jdt.core.dom.Type superclass = (td instanceof org.eclipse.jdt.core.dom.TypeDeclaration) ? ((org.eclipse.jdt.core.dom.TypeDeclaration) td).getSuperclassType() : null; - String[] res = findTypeArgumentsRecursively(superclass, context, (org.eclipse.jdt.core.dom.CompilationUnit) td.getRoot(), visited); - if (res[0] != null || res[1] != null) return res; - } - } - } else { - // It's a simple type (e.g. MyBaseConfig) - String simpleName = type.toString(); - org.eclipse.jdt.core.dom.AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(simpleName, cu); - if (td != null) { - String fqn = context.getFqn(td); - if (visited.add(fqn)) { - org.eclipse.jdt.core.dom.Type superclass = (td instanceof org.eclipse.jdt.core.dom.TypeDeclaration) ? ((org.eclipse.jdt.core.dom.TypeDeclaration) td).getSuperclassType() : null; - String[] res = findTypeArgumentsRecursively(superclass, context, (org.eclipse.jdt.core.dom.CompilationUnit) td.getRoot(), visited); - if (res[0] != null || res[1] != null) return res; - } - } - } - - return new String[]{null, null}; - } - private String eraseGenerics(String type) { if (type == null) return null; int idx = type.indexOf('<'); @@ -360,43 +309,6 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine { return type; } - private String resolveTypeToFqn(org.eclipse.jdt.core.dom.Type type, org.eclipse.jdt.core.dom.CompilationUnit cu, CodebaseContext context) { - if (type == null) return null; - String simpleName; - if (type.isSimpleType()) { - simpleName = ((org.eclipse.jdt.core.dom.SimpleType) type).getName().getFullyQualifiedName(); - } else if (type.isParameterizedType()) { - return resolveTypeToFqn(((org.eclipse.jdt.core.dom.ParameterizedType) type).getType(), cu, context); - } else { - simpleName = type.toString(); - } - - if (simpleName.contains("<")) { - simpleName = simpleName.substring(0, simpleName.indexOf('<')); - } - - org.eclipse.jdt.core.dom.AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(simpleName, cu); - if (td != null) { - return context.getFqn(td); - } - - for (Object impObj : cu.imports()) { - org.eclipse.jdt.core.dom.ImportDeclaration imp = (org.eclipse.jdt.core.dom.ImportDeclaration) impObj; - String impName = imp.getName().getFullyQualifiedName(); - if (impName.endsWith("." + simpleName)) { - return impName; - } - } - - String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : ""; - if (!packageName.isEmpty()) { - org.eclipse.jdt.core.dom.AbstractTypeDeclaration localTd = context.getAbstractTypeDeclaration(packageName + "." + simpleName); - if (localTd != null) return context.getFqn(localTd); - } - - return simpleName; - } - private boolean isTypeMismatched(String type1, String type2) { if (type1 == null || type2 == null) return false; type1 = eraseGenerics(type1); 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 70fdf2d..75ddd83 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 @@ -3,6 +3,10 @@ package click.kamil.springstatemachineexporter.analysis.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.MatchedTransition; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; import click.kamil.springstatemachineexporter.model.Transition; import lombok.Builder; import lombok.Getter; @@ -72,15 +76,18 @@ public class AnalysisResult { } } - // 4. Resolve metadata (triggers, entry points) + // 4. Resolve metadata (triggers, entry points, call chains) if (metadata != null) { - if (metadata.getTriggers() != null) { - for (var trigger : metadata.getTriggers()) { - if (trigger.getEvent() != null) { - trigger.setEvent(resolver.resolveValue(trigger.getEvent(), properties)); - } - } - } + List resolvedTriggers = metadata.getTriggers() == null ? null + : metadata.getTriggers().stream() + .map(trigger -> resolveTrigger(trigger, resolver, properties)) + .collect(java.util.stream.Collectors.toList()); + + List resolvedCallChains = metadata.getCallChains() == null ? null + : metadata.getCallChains().stream() + .map(chain -> resolveCallChain(chain, resolver, properties)) + .collect(java.util.stream.Collectors.toList()); + if (metadata.getEntryPoints() != null) { for (var ep : metadata.getEntryPoints()) { if (ep.getName() != null) { @@ -95,9 +102,54 @@ public class AnalysisResult { } } } + + this.metadata = CodebaseMetadata.builder() + .triggers(resolvedTriggers != null ? resolvedTriggers : metadata.getTriggers()) + .entryPoints(metadata.getEntryPoints()) + .callChains(resolvedCallChains != null ? resolvedCallChains : metadata.getCallChains()) + .properties(metadata.getProperties()) + .build(); } } + private static TriggerPoint resolveTrigger( + TriggerPoint trigger, + click.kamil.springstatemachineexporter.analysis.resolver.PropertyResolver resolver, + Map properties) { + List polymorphicEvents = trigger.getPolymorphicEvents() == null ? null + : trigger.getPolymorphicEvents().stream() + .map(value -> resolver.resolveValue(value, properties)) + .collect(java.util.stream.Collectors.toList()); + return trigger.toBuilder() + .event(trigger.getEvent() != null ? resolver.resolveValue(trigger.getEvent(), properties) : null) + .sourceState(trigger.getSourceState() != null + ? resolver.resolveValue(trigger.getSourceState(), properties) + : null) + .polymorphicEvents(polymorphicEvents) + .build(); + } + + private static CallChain resolveCallChain( + CallChain chain, + click.kamil.springstatemachineexporter.analysis.resolver.PropertyResolver resolver, + Map properties) { + TriggerPoint trigger = chain.getTriggerPoint() == null + ? null + : resolveTrigger(chain.getTriggerPoint(), resolver, properties); + List matchedTransitions = chain.getMatchedTransitions() == null ? null + : chain.getMatchedTransitions().stream() + .map(matched -> MatchedTransition.builder() + .event(resolver.resolveValue(matched.getEvent(), properties)) + .sourceState(resolver.resolveValue(matched.getSourceState(), properties)) + .targetState(resolver.resolveValue(matched.getTargetState(), properties)) + .build()) + .collect(java.util.stream.Collectors.toList()); + return chain.toBuilder() + .triggerPoint(trigger) + .matchedTransitions(matchedTransitions) + .build(); + } + public void addMetadata(CodebaseMetadata newMetadata) { if (newMetadata == null) return; diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/TriggerPoint.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/TriggerPoint.java index a9d2b90..be40aad 100644 --- a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/TriggerPoint.java +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/model/TriggerPoint.java @@ -1,5 +1,6 @@ package click.kamil.springstatemachineexporter.analysis.model; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Builder; import lombok.Data; @@ -49,14 +50,14 @@ public class TriggerPoint { this.sourceFile = sourceFile; this.sourceModule = sourceModule; this.stateMachineId = stateMachineId; - this.sourceState = sourceState; + this.sourceState = MachineEnumCanonicalizer.canonicalizeLabel(sourceState, stateTypeFqn); this.lineNumber = lineNumber; this.stateTypeFqn = stateTypeFqn; this.eventTypeFqn = eventTypeFqn; - this.event = qualifyEvent(event, eventTypeFqn); + this.event = MachineEnumCanonicalizer.qualifyEventIdentifier(event, eventTypeFqn); if (polymorphicEvents != null) { this.polymorphicEvents = polymorphicEvents.stream() - .map(pe -> qualifyEvent(pe, eventTypeFqn)) + .map(pe -> MachineEnumCanonicalizer.qualifyEventIdentifier(pe, eventTypeFqn)) .collect(java.util.stream.Collectors.toList()); } else { this.polymorphicEvents = null; @@ -65,66 +66,4 @@ public class TriggerPoint { this.constraint = constraint; this.ambiguous = ambiguous; } - - private static String qualifyEvent(String e, String eventTypeFqn) { - if (e == null || eventTypeFqn == null || e.isEmpty()) { - return e; - } - if (e.startsWith("} type parameters. + * + *

Display formatting ({@code --event}/{@code --state}) is separate; this fixes internal + * {@code fullIdentifier} values used for matching and traceability. + */ +public final class MachineEnumCanonicalizer { + + private MachineEnumCanonicalizer() { + } + + public static void canonicalizeTransitions( + List transitions, + StateMachineTypeResolver.MachineTypes machineTypes) { + if (transitions == null || machineTypes == null) { + return; + } + for (Transition transition : transitions) { + if (transition.getEvent() != null) { + transition.setEvent(canonicalizeEvent(transition.getEvent(), machineTypes.eventTypeFqn())); + } + if (transition.getSourceStates() != null) { + transition.setSourceStates(canonicalizeStates(transition.getSourceStates(), machineTypes.stateTypeFqn())); + } + if (transition.getTargetStates() != null) { + transition.setTargetStates(canonicalizeStates(transition.getTargetStates(), machineTypes.stateTypeFqn())); + } + } + } + + public static Set canonicalizeStateLabels(Set labels, String stateTypeFqn) { + if (labels == null || labels.isEmpty()) { + return labels; + } + return labels.stream() + .map(label -> canonicalizeLabel(label, stateTypeFqn)) + .collect(Collectors.toCollection(LinkedHashSet::new)); + } + + public static Set canonicalizeStates(Set states, String stateTypeFqn) { + if (states == null || states.isEmpty()) { + return states; + } + return states.stream() + .map(state -> canonicalizeState(state, stateTypeFqn)) + .collect(Collectors.toCollection(LinkedHashSet::new)); + } + + public static TriggerPoint canonicalizeTriggerPoint( + TriggerPoint trigger, + StateMachineTypeResolver.MachineTypes machineTypes) { + if (trigger == null) { + return null; + } + String eventTypeFqn = preferFullTypeFqn( + trigger.getEventTypeFqn(), + machineTypes != null ? machineTypes.eventTypeFqn() : null); + String stateTypeFqn = preferFullTypeFqn( + trigger.getStateTypeFqn(), + machineTypes != null ? machineTypes.stateTypeFqn() : null); + + List polymorphicEvents = trigger.getPolymorphicEvents() == null ? null + : trigger.getPolymorphicEvents().stream() + .map(event -> canonicalizeLabel(event, eventTypeFqn)) + .collect(Collectors.toList()); + + return trigger.toBuilder() + .eventTypeFqn(eventTypeFqn) + .stateTypeFqn(stateTypeFqn) + .event(canonicalizeLabel(trigger.getEvent(), eventTypeFqn)) + .sourceState(canonicalizeLabel(trigger.getSourceState(), stateTypeFqn)) + .polymorphicEvents(polymorphicEvents) + .build(); + } + + public static String qualifyEventIdentifier(String event, String eventTypeFqn) { + if (event == null || eventTypeFqn == null || event.isEmpty()) { + return event; + } + if (event.startsWith("= 0 ? typeFqn.substring(0, idx) : typeFqn; + } + + public static boolean isStringOrPrimitiveType(String typeFqn) { + if (typeFqn == null) { + return false; + } + return typeFqn.equals("String") || typeFqn.equals("java.lang.String") + || typeFqn.equals("int") || typeFqn.equals("long") || typeFqn.equals("char") + || typeFqn.equals("java.lang.Object") || typeFqn.equals("Object"); + } + + private static boolean isEnumConstantCandidate(String eventStr) { + if (eventStr == null) { + return false; + } + if (eventStr.startsWith(" canonicalizeStates(List states, String stateTypeFqn) { + if (states == null) { + return null; + } + List canonical = new ArrayList<>(states.size()); + for (State state : states) { + canonical.add(canonicalizeState(state, stateTypeFqn)); + } + return canonical; + } + + static Event canonicalizeEvent(Event event, String enumTypeFqn) { + if (event == null || enumTypeFqn == null || enumTypeFqn.isBlank()) { + return event; + } + String canonical = canonicalizeLabel( + event.fullIdentifier() != null ? event.fullIdentifier() : event.rawName(), + enumTypeFqn); + if (canonical.equals(event.fullIdentifier())) { + return event; + } + return Event.of(event.rawName(), canonical); + } + + static State canonicalizeState(State state, String enumTypeFqn) { + if (state == null || enumTypeFqn == null || enumTypeFqn.isBlank()) { + return state; + } + String canonical = canonicalizeLabel( + state.fullIdentifier() != null ? state.fullIdentifier() : state.rawName(), + enumTypeFqn); + if (canonical.equals(state.fullIdentifier())) { + return state; + } + return State.of(state.rawName(), canonical); + } + + public static boolean isMachineEnumReference(String value, String enumTypeFqn) { + if (value == null || value.isBlank() || enumTypeFqn == null || enumTypeFqn.isBlank()) { + return false; + } + if (isStringOrPrimitiveType(enumTypeFqn)) { + return false; + } + if (value.startsWith("= 2 && value.startsWith("\"")) { + return false; + } + if (!isEnumConstantCandidate(value)) { + return false; + } + if (Character.isLowerCase(value.charAt(0))) { + return false; + } + + String typePart = enumTypeFromRef(value); + if (typePart == null) { + return true; + } + return enumTypesMatch(enumTypeFqn, typePart); + } + + public static String canonicalizeLabel(String value, String enumTypeFqn) { + if (value == null || value.isBlank() || enumTypeFqn == null || enumTypeFqn.isBlank()) { + return value; + } + if (value.length() >= 2 && value.startsWith("\"") && value.endsWith("\"")) { + return stripQuotes(value); + } + + String stripped = value; + if (stripped == null || stripped.isBlank()) { + return value; + } + + if (stripped.startsWith(enumTypeFqn + ".")) { + return stripped; + } + + String constant = constantName(stripped); + String typePart = enumTypeFromRef(stripped); + + if (typePart != null && enumTypesMatch(enumTypeFqn, typePart)) { + return enumTypeFqn + "." + constant; + } + + if (typePart == null && Character.isUpperCase(stripped.charAt(0)) && !stripped.contains(".")) { + return enumTypeFqn + "." + stripped; + } + + return stripped; + } + + private static String stripQuotes(String value) { + if (value.length() >= 2 && value.startsWith("\"") && value.endsWith("\"")) { + return value.substring(1, value.length() - 1); + } + return value; + } + + private static String constantName(String ref) { + int dot = ref.lastIndexOf('.'); + return dot >= 0 ? ref.substring(dot + 1) : ref; + } + + private static String enumTypeFromRef(String ref) { + int dot = ref.lastIndexOf('.'); + if (dot <= 0) { + return null; + } + return ref.substring(0, dot); + } + + static boolean enumTypesMatch(String type1, String type2) { + if (type1 == null || type2 == null) { + return false; + } + if (type1.equals(type2)) { + return true; + } + if (type1.endsWith("." + type2) || type2.endsWith("." + type1)) { + return true; + } + String simple1 = simpleName(type1); + String simple2 = simpleName(type2); + if (!simple1.equals(simple2)) { + return false; + } + return !type1.contains(".") || !type2.contains("."); + } + + private static String simpleName(String fqn) { + return fqn.contains(".") ? fqn.substring(fqn.lastIndexOf('.') + 1) : fqn; + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolver.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolver.java new file mode 100644 index 0000000..c184373 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolver.java @@ -0,0 +1,254 @@ +package click.kamil.springstatemachineexporter.analysis.resolver; + +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import org.eclipse.jdt.core.dom.*; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Resolves {@code StateMachineConfigurerAdapter} type arguments for a config class. + * Used by analysis (canonical enum ids) and routing (machine scoping). + */ +public final class StateMachineTypeResolver { + + public record MachineTypes(String stateTypeFqn, String eventTypeFqn) { + public static MachineTypes empty() { + return new MachineTypes(null, null); + } + } + + private StateMachineTypeResolver() { + } + + public static String[] resolve(String machineConfigFqn, CodebaseContext context) { + MachineTypes types = resolveTypes(machineConfigFqn, context); + return new String[]{types.stateTypeFqn(), types.eventTypeFqn()}; + } + + public static MachineTypes resolveTypes(String machineConfigFqn, CodebaseContext context) { + if (machineConfigFqn == null || context == null) { + return MachineTypes.empty(); + } + String configFqn = machineConfigFqn; + if (configFqn.contains("#")) { + configFqn = configFqn.substring(0, configFqn.indexOf('#')); + } + TypeDeclaration td = context.getTypeDeclaration(configFqn); + if (td == null) { + return MachineTypes.empty(); + } + Set visited = new HashSet<>(); + visited.add(configFqn); + String[] args = findTypeArgumentsRecursively( + td.getSuperclassType(), + context, + (CompilationUnit) td.getRoot(), + visited, + Map.of()); + return new MachineTypes(args[0], args[1]); + } + + public static boolean extendsEnumStateMachineConfigurer(String machineConfigFqn, CodebaseContext context) { + if (machineConfigFqn == null || context == null) { + return false; + } + String configFqn = machineConfigFqn; + if (configFqn.contains("#")) { + configFqn = configFqn.substring(0, configFqn.indexOf('#')); + } + TypeDeclaration td = context.getTypeDeclaration(configFqn); + if (td == null) { + return false; + } + Set visited = new HashSet<>(); + visited.add(configFqn); + return hierarchyHasEnumConfigurer( + td.getSuperclassType(), + context, + (CompilationUnit) td.getRoot(), + visited); + } + + private static boolean hierarchyHasEnumConfigurer( + Type type, + CodebaseContext context, + CompilationUnit cu, + Set visited) { + if (type == null) { + return false; + } + if (type instanceof ParameterizedType pt) { + String rawTypeName = pt.getType().toString(); + if (rawTypeName.equals("EnumStateMachineConfigurerAdapter") + || rawTypeName.endsWith(".EnumStateMachineConfigurerAdapter")) { + return true; + } + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(rawTypeName, cu); + if (td != null) { + String fqn = context.getFqn(td); + if (visited.add(fqn)) { + Type superclass = td instanceof TypeDeclaration typeDecl ? typeDecl.getSuperclassType() : null; + if (hierarchyHasEnumConfigurer(superclass, context, cu, visited)) { + return true; + } + } + } + } else { + String simpleName = type.toString(); + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(simpleName, cu); + if (td != null) { + String fqn = context.getFqn(td); + if (visited.add(fqn)) { + Type superclass = td instanceof TypeDeclaration typeDecl ? typeDecl.getSuperclassType() : null; + if (hierarchyHasEnumConfigurer(superclass, context, cu, visited)) { + return true; + } + } + } + } + return false; + } + + private static String[] findTypeArgumentsRecursively( + Type type, + CodebaseContext context, + CompilationUnit cu, + Set visited, + Map typeVarBindings) { + if (type == null) { + return new String[]{null, null}; + } + + if (type instanceof ParameterizedType pt) { + String rawTypeName = pt.getType().toString(); + List typeArgs = pt.typeArguments(); + + if (isStateMachineConfigurerAdapter(rawTypeName)) { + if (typeArgs.size() >= 2) { + String stateType = resolveTypeToFqn((Type) typeArgs.get(0), cu, context, typeVarBindings); + String eventType = resolveTypeToFqn((Type) typeArgs.get(1), cu, context, typeVarBindings); + return new String[]{stateType, eventType}; + } + } + + Map nextBindings = extendBindings(rawTypeName, typeArgs, cu, context, typeVarBindings); + + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(rawTypeName, cu); + if (td != null) { + String fqn = context.getFqn(td); + if (visited.add(fqn)) { + Type superclass = td instanceof TypeDeclaration typeDecl ? typeDecl.getSuperclassType() : null; + String[] res = findTypeArgumentsRecursively(superclass, context, cu, visited, nextBindings); + if (res[0] != null || res[1] != null) { + return res; + } + } + } + } else { + String simpleName = type.toString(); + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(simpleName, cu); + if (td != null) { + String fqn = context.getFqn(td); + if (visited.add(fqn)) { + Type superclass = td instanceof TypeDeclaration typeDecl ? typeDecl.getSuperclassType() : null; + String[] res = findTypeArgumentsRecursively(superclass, context, cu, visited, typeVarBindings); + if (res[0] != null || res[1] != null) { + return res; + } + } + } + } + + return new String[]{null, null}; + } + + private static Map extendBindings( + String rawTypeName, + List typeArgs, + CompilationUnit cu, + CodebaseContext context, + Map parentBindings) { + Map bindings = new HashMap<>(parentBindings); + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(rawTypeName, cu); + if (!(td instanceof TypeDeclaration typeDecl) || typeArgs.isEmpty()) { + return bindings; + } + List typeParameters = typeDecl.typeParameters(); + for (int i = 0; i < Math.min(typeParameters.size(), typeArgs.size()); i++) { + String paramName = typeParameters.get(i).getName().getIdentifier(); + String resolvedArg = resolveTypeToFqn((Type) typeArgs.get(i), cu, context, parentBindings); + if (resolvedArg != null) { + bindings.put(paramName, resolvedArg); + } + } + return bindings; + } + + private static boolean isStateMachineConfigurerAdapter(String rawTypeName) { + return rawTypeName.equals("StateMachineConfigurerAdapter") + || rawTypeName.equals("EnumStateMachineConfigurerAdapter") + || rawTypeName.endsWith(".StateMachineConfigurerAdapter") + || rawTypeName.endsWith(".EnumStateMachineConfigurerAdapter"); + } + + static String resolveTypeToFqn(Type type, CompilationUnit cu, CodebaseContext context) { + return resolveTypeToFqn(type, cu, context, Map.of()); + } + + static String resolveTypeToFqn( + Type type, + CompilationUnit cu, + CodebaseContext context, + Map typeVarBindings) { + if (type == null) { + return null; + } + if (type instanceof WildcardType wildcardType) { + Type bound = wildcardType.getBound(); + return bound != null ? resolveTypeToFqn(bound, cu, context, typeVarBindings) : null; + } + String simpleName; + if (type.isSimpleType()) { + simpleName = ((SimpleType) type).getName().getFullyQualifiedName(); + } else if (type.isParameterizedType()) { + return resolveTypeToFqn(((ParameterizedType) type).getType(), cu, context, typeVarBindings); + } else { + simpleName = type.toString(); + } + + if (simpleName.contains("<")) { + simpleName = simpleName.substring(0, simpleName.indexOf('<')); + } + + if (typeVarBindings.containsKey(simpleName)) { + return typeVarBindings.get(simpleName); + } + + AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(simpleName, cu); + if (td != null) { + return context.getFqn(td); + } + + for (Object impObj : cu.imports()) { + ImportDeclaration imp = (ImportDeclaration) impObj; + String impName = imp.getName().getFullyQualifiedName(); + if (impName.endsWith("." + simpleName)) { + return impName; + } + } + + String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : ""; + if (!packageName.isEmpty()) { + AbstractTypeDeclaration localTd = context.getAbstractTypeDeclaration(packageName + "." + simpleName); + if (localTd != null) { + return context.getFqn(localTd); + } + } + + return simpleName; + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizer.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizer.java new file mode 100644 index 0000000..306d255 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizer.java @@ -0,0 +1,107 @@ +package click.kamil.springstatemachineexporter.analysis.service; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.MatchedTransition; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; +import click.kamil.springstatemachineexporter.analysis.validation.AnalysisCanonicalFormValidator; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Re-applies machine-scoped enum canonicalization and validates the analysis model. + * Must run after property resolution so placeholders cannot bypass validation. + */ +public final class AnalysisResultFinalizer { + + private AnalysisResultFinalizer() { + } + + public static void finalizeResult(AnalysisResult result, CodebaseContext context) { + if (result == null || context == null) { + return; + } + + StateMachineTypeResolver.MachineTypes machineTypes = + StateMachineTypeResolver.resolveTypes(result.getName(), context); + + MachineEnumCanonicalizer.canonicalizeTransitions(result.getTransitions(), machineTypes); + + if (result.getStates() != null) { + result.setStates(MachineEnumCanonicalizer.canonicalizeStates(result.getStates(), machineTypes.stateTypeFqn())); + } + result.setStartStates(MachineEnumCanonicalizer.canonicalizeStateLabels( + result.getStartStates(), machineTypes.stateTypeFqn())); + result.setEndStates(MachineEnumCanonicalizer.canonicalizeStateLabels( + result.getEndStates(), machineTypes.stateTypeFqn())); + + if (result.getMetadata() != null) { + CodebaseMetadata metadata = result.getMetadata(); + List triggers = canonicalizeTriggers(metadata.getTriggers(), machineTypes); + List callChains = canonicalizeCallChains(metadata.getCallChains(), machineTypes); + result.setMetadata(CodebaseMetadata.builder() + .triggers(triggers) + .entryPoints(metadata.getEntryPoints()) + .callChains(callChains) + .properties(metadata.getProperties()) + .build()); + } + + AnalysisCanonicalFormValidator.enforce(result, context); + } + + private static List canonicalizeTriggers( + List triggers, + StateMachineTypeResolver.MachineTypes machineTypes) { + if (triggers == null) { + return null; + } + return triggers.stream() + .map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes)) + .collect(Collectors.toList()); + } + + private static List canonicalizeCallChains( + List callChains, + StateMachineTypeResolver.MachineTypes machineTypes) { + if (callChains == null) { + return null; + } + return callChains.stream() + .map(chain -> { + TriggerPoint trigger = chain.getTriggerPoint() == null + ? null + : MachineEnumCanonicalizer.canonicalizeTriggerPoint(chain.getTriggerPoint(), machineTypes); + List matched = canonicalizeMatchedTransitions( + chain.getMatchedTransitions(), machineTypes); + return chain.toBuilder() + .triggerPoint(trigger) + .matchedTransitions(matched) + .build(); + }) + .collect(Collectors.toList()); + } + + private static List canonicalizeMatchedTransitions( + List matchedTransitions, + StateMachineTypeResolver.MachineTypes machineTypes) { + if (matchedTransitions == null) { + return null; + } + return matchedTransitions.stream() + .map(matched -> MatchedTransition.builder() + .event(MachineEnumCanonicalizer.canonicalizeLabel( + matched.getEvent(), machineTypes.eventTypeFqn())) + .sourceState(MachineEnumCanonicalizer.canonicalizeLabel( + matched.getSourceState(), machineTypes.stateTypeFqn())) + .targetState(MachineEnumCanonicalizer.canonicalizeLabel( + matched.getTargetState(), machineTypes.stateTypeFqn())) + .build()) + .collect(Collectors.toList()); + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormException.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormException.java new file mode 100644 index 0000000..01a1760 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormException.java @@ -0,0 +1,32 @@ +package click.kamil.springstatemachineexporter.analysis.validation; + +import java.util.ArrayList; +import java.util.List; + +/** + * Thrown when {@link AnalysisCanonicalFormValidator} finds enum identifiers that are not + * package-canonical for the machine's resolved {@code } types. + */ +public class AnalysisCanonicalFormException extends IllegalStateException { + + private final List violations; + + public AnalysisCanonicalFormException(List violations) { + super(formatMessage(violations)); + this.violations = List.copyOf(violations); + } + + public List getViolations() { + return violations; + } + + private static String formatMessage(List violations) { + StringBuilder sb = new StringBuilder("Analysis model contains non-canonical enum identifiers:"); + for (AnalysisCanonicalFormValidator.Violation violation : violations) { + sb.append("\n - ").append(violation.path()) + .append(": '").append(violation.actual()) + .append("' (expected '").append(violation.expected()).append("')"); + } + return sb.toString(); + } +} diff --git a/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidator.java b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidator.java new file mode 100644 index 0000000..d987901 --- /dev/null +++ b/state_machine_exporter/src/main/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidator.java @@ -0,0 +1,230 @@ +package click.kamil.springstatemachineexporter.analysis.validation; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.MatchedTransition; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import click.kamil.springstatemachineexporter.model.Event; +import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Transition; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +/** + * Validates that enum-backed identifiers across the analysis model share one canonical shape: + * {@code {package.EnumType.CONSTANT}} derived from the machine config's {@code } types. + * + *

String/primitive machines ({@code StateMachineConfigurerAdapter}) are skipped. + */ +public final class AnalysisCanonicalFormValidator { + + public record Violation(String path, String actual, String expected) { + } + + private AnalysisCanonicalFormValidator() { + } + + public static List validate(AnalysisResult result, CodebaseContext context) { + List violations = new ArrayList<>(); + if (result == null || context == null) { + return violations; + } + + StateMachineTypeResolver.MachineTypes machineTypes = + StateMachineTypeResolver.resolveTypes(result.getName(), context); + if (!hasPackageQualifiedEnumType(machineTypes.stateTypeFqn()) + && !hasPackageQualifiedEnumType(machineTypes.eventTypeFqn())) { + if (!StateMachineTypeResolver.extendsEnumStateMachineConfigurer(result.getName(), context)) { + return violations; + } + violations.add(new Violation( + "machineTypes", + describeTypes(machineTypes), + "package-qualified state/event enum types")); + return violations; + } + + validateTransitions(result.getTransitions(), machineTypes, violations); + validateStateCollection(result.getStates(), machineTypes.stateTypeFqn(), "states", violations); + validateStateLabels(result.getStartStates(), machineTypes.stateTypeFqn(), "startStates", violations); + validateStateLabels(result.getEndStates(), machineTypes.stateTypeFqn(), "endStates", violations); + + if (result.getMetadata() != null) { + validateTriggers(result.getMetadata().getTriggers(), machineTypes, violations); + validateCallChains(result.getMetadata().getCallChains(), machineTypes, violations); + } + + return violations; + } + + public static void enforce(AnalysisResult result, CodebaseContext context) { + List violations = validate(result, context); + if (!violations.isEmpty()) { + throw new AnalysisCanonicalFormException(violations); + } + } + + private static String describeTypes(StateMachineTypeResolver.MachineTypes machineTypes) { + return "stateTypeFqn=" + machineTypes.stateTypeFqn() + ", eventTypeFqn=" + machineTypes.eventTypeFqn(); + } + + private static boolean hasPackageQualifiedEnumType(String typeFqn) { + return typeFqn != null && typeFqn.contains(".") && !MachineEnumCanonicalizer.isStringOrPrimitiveType(typeFqn); + } + + private static void validateTransitions( + List transitions, + StateMachineTypeResolver.MachineTypes machineTypes, + List violations) { + if (transitions == null) { + return; + } + for (int i = 0; i < transitions.size(); i++) { + Transition transition = transitions.get(i); + String prefix = "transitions[" + i + "]"; + if (transition.getEvent() != null) { + requireCanonical( + prefix + ".event.fullIdentifier", + transition.getEvent().fullIdentifier(), + machineTypes.eventTypeFqn(), + violations); + } + validateStateList(transition.getSourceStates(), machineTypes.stateTypeFqn(), prefix + ".sourceStates", violations); + validateStateList(transition.getTargetStates(), machineTypes.stateTypeFqn(), prefix + ".targetStates", violations); + } + } + + private static void validateStateList( + List states, + String stateTypeFqn, + String pathPrefix, + List violations) { + if (states == null) { + return; + } + for (int i = 0; i < states.size(); i++) { + requireCanonical(pathPrefix + "[" + i + "].fullIdentifier", states.get(i).fullIdentifier(), stateTypeFqn, violations); + } + } + + private static void validateStateCollection( + Set states, + String stateTypeFqn, + String pathPrefix, + List violations) { + if (states == null) { + return; + } + int i = 0; + for (State state : states) { + requireCanonical(pathPrefix + "[" + i++ + "].fullIdentifier", state.fullIdentifier(), stateTypeFqn, violations); + } + } + + private static void validateStateLabels( + Set labels, + String stateTypeFqn, + String pathPrefix, + List violations) { + if (labels == null) { + return; + } + int i = 0; + for (String label : labels) { + requireCanonical(pathPrefix + "[" + i++ + "]", label, stateTypeFqn, violations); + } + } + + private static void validateTriggers( + List triggers, + StateMachineTypeResolver.MachineTypes machineTypes, + List violations) { + if (triggers == null) { + return; + } + for (int i = 0; i < triggers.size(); i++) { + TriggerPoint trigger = triggers.get(i); + String prefix = "metadata.triggers[" + i + "]"; + String eventTypeFqn = preferTypeFqn(trigger.getEventTypeFqn(), machineTypes.eventTypeFqn()); + String stateTypeFqn = preferTypeFqn(trigger.getStateTypeFqn(), machineTypes.stateTypeFqn()); + + requireCanonical(prefix + ".event", trigger.getEvent(), eventTypeFqn, violations); + requireCanonical(prefix + ".sourceState", trigger.getSourceState(), stateTypeFqn, violations); + + if (trigger.getPolymorphicEvents() != null) { + for (int j = 0; j < trigger.getPolymorphicEvents().size(); j++) { + requireCanonical( + prefix + ".polymorphicEvents[" + j + "]", + trigger.getPolymorphicEvents().get(j), + eventTypeFqn, + violations); + } + } + } + } + + private static void validateCallChains( + List callChains, + StateMachineTypeResolver.MachineTypes machineTypes, + List violations) { + if (callChains == null) { + return; + } + for (int i = 0; i < callChains.size(); i++) { + CallChain chain = callChains.get(i); + String prefix = "metadata.callChains[" + i + "]"; + TriggerPoint trigger = chain.getTriggerPoint(); + if (trigger != null) { + String triggerPrefix = prefix + ".triggerPoint"; + String eventTypeFqn = preferTypeFqn(trigger.getEventTypeFqn(), machineTypes.eventTypeFqn()); + String stateTypeFqn = preferTypeFqn(trigger.getStateTypeFqn(), machineTypes.stateTypeFqn()); + requireCanonical(triggerPrefix + ".event", trigger.getEvent(), eventTypeFqn, violations); + requireCanonical(triggerPrefix + ".sourceState", trigger.getSourceState(), stateTypeFqn, violations); + if (trigger.getPolymorphicEvents() != null) { + for (int j = 0; j < trigger.getPolymorphicEvents().size(); j++) { + requireCanonical( + triggerPrefix + ".polymorphicEvents[" + j + "]", + trigger.getPolymorphicEvents().get(j), + eventTypeFqn, + violations); + } + } + } + if (chain.getMatchedTransitions() != null) { + for (int j = 0; j < chain.getMatchedTransitions().size(); j++) { + MatchedTransition matched = chain.getMatchedTransitions().get(j); + String matchedPrefix = prefix + ".matchedTransitions[" + j + "]"; + requireCanonical(matchedPrefix + ".event", matched.getEvent(), machineTypes.eventTypeFqn(), violations); + requireCanonical(matchedPrefix + ".sourceState", matched.getSourceState(), machineTypes.stateTypeFqn(), violations); + requireCanonical(matchedPrefix + ".targetState", matched.getTargetState(), machineTypes.stateTypeFqn(), violations); + } + } + } + } + + private static String preferTypeFqn(String primary, String fallback) { + if (hasPackageQualifiedEnumType(primary)) { + return primary; + } + return fallback; + } + + private static void requireCanonical( + String path, + String value, + String enumTypeFqn, + List violations) { + if (!MachineEnumCanonicalizer.isMachineEnumReference(value, enumTypeFqn)) { + return; + } + String expected = MachineEnumCanonicalizer.canonicalizeLabel(value, enumTypeFqn); + if (!expected.equals(value)) { + violations.add(new Violation(path, value, expected)); + } + } +} 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 190dd25..ced2446 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 @@ -1,11 +1,14 @@ package click.kamil.springstatemachineexporter.service; import click.kamil.springstatemachineexporter.analysis.enricher.CallChainEnricher; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver; import click.kamil.springstatemachineexporter.analysis.enricher.EntryPointEnricher; import click.kamil.springstatemachineexporter.analysis.enricher.PropertyEnricher; import click.kamil.springstatemachineexporter.analysis.enricher.TriggerEnricher; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.BusinessFlow; +import click.kamil.springstatemachineexporter.analysis.service.AnalysisResultFinalizer; import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider; import click.kamil.springstatemachineexporter.analysis.service.EnrichmentService; import click.kamil.springstatemachineexporter.analysis.service.JdtIntelligenceProvider; @@ -47,6 +50,7 @@ public class ExportService { new PropertyEnricher(), new CallChainEnricher(), new click.kamil.springstatemachineexporter.analysis.enricher.path.ForwardPathEstimationEnricher(), + new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(), new click.kamil.springstatemachineexporter.analysis.enricher.TransitionLinkerEnricher() ))); } @@ -233,16 +237,23 @@ public class ExportService { StateMachineAggregator aggregator = new StateMachineAggregator(context); List transitions = aggregator.aggregateTransitions(td); + StateMachineTypeResolver.MachineTypes machineTypes = StateMachineTypeResolver.resolveTypes(className, context); + MachineEnumCanonicalizer.canonicalizeTransitions(transitions, machineTypes); + aggregator.aggregateStates(td); - Set initialStatesAst = aggregator.getInitialStates(); - Set endStatesAst = aggregator.getEndStates(); + Set initialStatesAst = MachineEnumCanonicalizer.canonicalizeStateLabels( + aggregator.getInitialStates(), machineTypes.stateTypeFqn()); + Set endStatesAst = MachineEnumCanonicalizer.canonicalizeStateLabels( + aggregator.getEndStates(), machineTypes.stateTypeFqn()); log.debug("Start States Ast: {}", initialStatesAst); log.debug("End States Ast: {}", endStatesAst); Set startStates = TransitionStateUtils.findStartStates(transitions, initialStatesAst); Set endStates = TransitionStateUtils.findEndStates(transitions, endStatesAst); - Set allStates = TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst); + Set allStates = MachineEnumCanonicalizer.canonicalizeStates( + TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst), + machineTypes.stateTypeFqn()); if (allStates.isEmpty() && transitions.isEmpty()) { log.info("Skipping empty state machine config: {}", className); @@ -262,6 +273,7 @@ public class ExportService { enrichmentService.enrich(result, context, intelligence); resolveProperties(result, activeProfiles); + AnalysisResultFinalizer.finalizeResult(result, context); generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); } @@ -276,9 +288,14 @@ public class ExportService { List transitions = AstTransitionParser.parseTransitions(m, context); + StateMachineTypeResolver.MachineTypes machineTypes = StateMachineTypeResolver.resolveTypes(parentFqn, context); + MachineEnumCanonicalizer.canonicalizeTransitions(transitions, machineTypes); + Set startStates = TransitionStateUtils.findStartStates(transitions, null); Set endStates = TransitionStateUtils.findEndStates(transitions, null); - Set allStates = TransitionStateUtils.findAllStates(transitions, null, null); + Set allStates = MachineEnumCanonicalizer.canonicalizeStates( + TransitionStateUtils.findAllStates(transitions, null, null), + machineTypes.stateTypeFqn()); if (allStates.isEmpty() && transitions.isEmpty()) { log.info("Skipping empty state machine bean: {}", uniqueName); @@ -298,6 +315,7 @@ public class ExportService { enrichmentService.enrich(result, context, intelligence); resolveProperties(result, activeProfiles); + AnalysisResultFinalizer.finalizeResult(result, context); generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); } diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java index 83b1dcc..68b7a5d 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/RegressionTest.java @@ -132,6 +132,12 @@ public class RegressionTest { Path.of("src/test/resources/golden/EnterpriseStateMachineConfig"), "EnterpriseStateMachineConfig" ), + new TestScenario( + "Enterprise Factory Order Machine", + root.resolve("state_machines/state_machine_enterprise"), + Path.of("src/test/resources/golden/OrderStateMachineConfiguration"), + "OrderStateMachineConfiguration" + ), new TestScenario( "Multi-Module Sample", root.resolve("state_machines/multi_module_sample/core-module"), diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricherTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricherTest.java index a883dd7..f6287b3 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricherTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/TransitionLinkerEnricherTest.java @@ -224,7 +224,7 @@ class TransitionLinkerEnricherTest { CallChain updatedChain = result.getMetadata().getCallChains().get(0); assertThat(updatedChain.getMatchedTransitions()).hasSize(1); - assertThat(updatedChain.getMatchedTransitions().get(0).getEvent()).isEqualTo("OrderEvents.PAY"); + assertThat(updatedChain.getMatchedTransitions().get(0).getEvent()).isEqualTo("com.example.OrderEvents.PAY"); } @Test diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngineExternalTriggerTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngineExternalTriggerTest.java new file mode 100644 index 0000000..106845e --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/matching/StrictFqnMatchingEngineExternalTriggerTest.java @@ -0,0 +1,30 @@ +package click.kamil.springstatemachineexporter.analysis.enricher.matching; + +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.model.Event; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +class StrictFqnMatchingEngineExternalTriggerTest { + + private final StrictFqnMatchingEngine engine = new StrictFqnMatchingEngine(); + + @Test + void shouldMatchExternalTriggerByMainEventWhenPolymorphicEventsAreEmpty() { + Event machineEvent = Event.of( + "com.example.order.OrderEvent.PAY", + "com.example.order.OrderEvent.PAY"); + + TriggerPoint trigger = TriggerPoint.builder() + .event("com.example.order.OrderEvent.PAY") + .eventTypeFqn("com.example.order.OrderEvent") + .external(true) + .polymorphicEvents(List.of()) + .build(); + + assertThat(engine.matches(machineEvent, trigger)).isTrue(); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngineRoutingTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngineRoutingTest.java new file mode 100644 index 0000000..e66c532 --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/enricher/routing/HeuristicBeanResolutionEngineRoutingTest.java @@ -0,0 +1,67 @@ +package click.kamil.springstatemachineexporter.analysis.enricher.routing; + +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.nio.file.Files; +import java.nio.file.Path; + +import static org.assertj.core.api.Assertions.assertThat; + +class HeuristicBeanResolutionEngineRoutingTest { + + private final HeuristicBeanResolutionEngine engine = new HeuristicBeanResolutionEngine(); + + @Test + void shouldRejectChainWhenEventTypesDifferEvenIfStateTypesMatch(@TempDir Path tempDir) throws Exception { + writeTwoMachineSample(tempDir); + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + CallChain chain = CallChain.builder() + .triggerPoint(TriggerPoint.builder() + .event("InvoiceEvent.PAY") + .eventTypeFqn("com.example.invoice.InvoiceEvent") + .stateTypeFqn("com.example.shared.SharedState") + .build()) + .build(); + + assertThat(engine.isRoutedToCorrectMachine( + chain, + "com.example.config.OrderStateMachineConfiguration", + context)).isFalse(); + } + + private static void writeTwoMachineSample(Path tempDir) throws Exception { + Path orderPkg = tempDir.resolve("com/example/order"); + Path invoicePkg = tempDir.resolve("com/example/invoice"); + Path sharedPkg = tempDir.resolve("com/example/shared"); + Path configPkg = tempDir.resolve("com/example/config"); + Files.createDirectories(orderPkg); + Files.createDirectories(invoicePkg); + Files.createDirectories(sharedPkg); + Files.createDirectories(configPkg); + + Files.writeString(sharedPkg.resolve("SharedState.java"), + "package com.example.shared; public enum SharedState { NEW }"); + Files.writeString(orderPkg.resolve("OrderState.java"), + "package com.example.order; public enum OrderState { NEW }"); + Files.writeString(orderPkg.resolve("OrderEvent.java"), + "package com.example.order; public enum OrderEvent { PAY }"); + Files.writeString(invoicePkg.resolve("InvoiceEvent.java"), + "package com.example.invoice; public enum InvoiceEvent { PAY }"); + Files.writeString(configPkg.resolve("OrderStateMachineConfiguration.java"), + """ + package com.example.config; + import com.example.order.OrderEvent; + import com.example.order.OrderState; + import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter; + public class OrderStateMachineConfiguration + extends EnumStateMachineConfigurerAdapter { + } + """); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerCrossPackageTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerCrossPackageTest.java new file mode 100644 index 0000000..8f5a1c1 --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerCrossPackageTest.java @@ -0,0 +1,26 @@ +package click.kamil.springstatemachineexporter.analysis.resolver; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class MachineEnumCanonicalizerCrossPackageTest { + + @Test + void shouldNotRewriteCrossPackageEnumReferencesWhenSimpleNamesMatch() { + String machineEventType = "com.bar.OrderEvents"; + String foreignEvent = "com.foo.OrderEvents.PAY"; + + assertThat(MachineEnumCanonicalizer.enumTypesMatch(machineEventType, "com.foo.OrderEvents")) + .isFalse(); + assertThat(MachineEnumCanonicalizer.canonicalizeLabel(foreignEvent, machineEventType)) + .isEqualTo(foreignEvent); + } + + @Test + void shouldCanonicalizeImportStyleReferencesForMachineEnumType() { + assertThat(MachineEnumCanonicalizer.canonicalizeLabel( + "OrderEvents.PAY", "com.bar.OrderEvents")) + .isEqualTo("com.bar.OrderEvents.PAY"); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerTest.java new file mode 100644 index 0000000..844b606 --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/MachineEnumCanonicalizerTest.java @@ -0,0 +1,156 @@ +package click.kamil.springstatemachineexporter.analysis.resolver; + +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import click.kamil.springstatemachineexporter.model.Event; +import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Transition; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Set; + +import static org.assertj.core.api.Assertions.assertThat; + +class MachineEnumCanonicalizerTest { + + @Test + void shouldResolveMachineEnumTypesFromConfigurerAdapter(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "com.example.config.OrderStateMachineConfiguration", context); + + assertThat(types.stateTypeFqn()).isEqualTo("com.example.order.OrderState"); + assertThat(types.eventTypeFqn()).isEqualTo("com.example.order.OrderEvent"); + } + + @Test + void shouldCanonicalizeTransitionIdentifiersUsingMachineTypes(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "com.example.config.OrderStateMachineConfiguration", context); + + Transition transition = new Transition(); + transition.setEvent(Event.of("OrderEvent.PAY", "OrderEvent.PAY")); + transition.setSourceStates(List.of(State.of("OrderState.NEW", "OrderState.NEW"))); + transition.setTargetStates(List.of(State.of("OrderState.PAID", "OrderState.PAID"))); + + MachineEnumCanonicalizer.canonicalizeTransitions(List.of(transition), types); + + assertThat(transition.getEvent().fullIdentifier()) + .isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(transition.getSourceStates().get(0).fullIdentifier()) + .isEqualTo("com.example.order.OrderState.NEW"); + assertThat(transition.getTargetStates().get(0).fullIdentifier()) + .isEqualTo("com.example.order.OrderState.PAID"); + } + + @Test + void shouldCanonicalizeBareConstantNames(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "com.example.config.OrderStateMachineConfiguration", context); + + assertThat(MachineEnumCanonicalizer.canonicalizeLabel("PAY", types.eventTypeFqn())) + .isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(MachineEnumCanonicalizer.canonicalizeStateLabels(Set.of("NEW"), types.stateTypeFqn())) + .containsExactly("com.example.order.OrderState.NEW"); + } + + @Test + void shouldLeaveStringStatesUntouched(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "com.example.config.OrderStateMachineConfiguration", context); + + assertThat(MachineEnumCanonicalizer.canonicalizeLabel("\"DRAFT\"", types.stateTypeFqn())) + .isEqualTo("DRAFT"); + } + + @Test + void shouldCanonicalizePolymorphicEventsUsingMachineEventType(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "com.example.config.OrderStateMachineConfiguration", context); + + TriggerPoint trigger = TriggerPoint.builder() + .event("OrderEvent.PAY") + .className("com.example.web.Controller") + .methodName("pay") + .sourceFile("Controller.java") + .polymorphicEvents(List.of("OrderEvent.PAY", "PAY")) + .eventTypeFqn("OrderEvent") + .build(); + + TriggerPoint canonical = MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, types); + + assertThat(canonical.getPolymorphicEvents()).containsExactly( + "com.example.order.OrderEvent.PAY", + "com.example.order.OrderEvent.PAY"); + assertThat(canonical.getEvent()).isEqualTo("com.example.order.OrderEvent.PAY"); + } + + @Test + void shouldQualifyEventIdentifierToPackageFqn() { + String eventTypeFqn = "com.example.order.OrderEvent"; + + assertThat(MachineEnumCanonicalizer.qualifyEventIdentifier("PAY", eventTypeFqn)) + .isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(MachineEnumCanonicalizer.qualifyEventIdentifier("OrderEvent.PAY", eventTypeFqn)) + .isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(MachineEnumCanonicalizer.qualifyEventIdentifier("getType()", eventTypeFqn)) + .isEqualTo("getType()"); + } + + private static void writeSampleConfig(Path tempDir) throws IOException { + Path orderPkg = tempDir.resolve("com/example/order"); + Path configPkg = tempDir.resolve("com/example/config"); + Files.createDirectories(orderPkg); + Files.createDirectories(configPkg); + + Files.writeString(orderPkg.resolve("OrderState.java"), + """ + package com.example.order; + public enum OrderState { NEW, PAID } + """); + Files.writeString(orderPkg.resolve("OrderEvent.java"), + """ + package com.example.order; + public enum OrderEvent { PAY } + """); + Files.writeString(configPkg.resolve("OrderStateMachineConfiguration.java"), + """ + package com.example.config; + import com.example.order.OrderEvent; + import com.example.order.OrderState; + import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter; + public class OrderStateMachineConfiguration + extends EnumStateMachineConfigurerAdapter { + } + """); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolverEnterpriseTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolverEnterpriseTest.java new file mode 100644 index 0000000..6c8e42e --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/resolver/StateMachineTypeResolverEnterpriseTest.java @@ -0,0 +1,39 @@ +package click.kamil.springstatemachineexporter.analysis.resolver; + +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import org.junit.jupiter.api.Test; + +import java.nio.file.Files; +import java.nio.file.Path; + +import static org.assertj.core.api.Assertions.assertThat; + +class StateMachineTypeResolverEnterpriseTest { + + @Test + void shouldResolveConcreteTypesThroughGenericAbstractBase() throws Exception { + Path root = findProjectRoot(); + Path enterprise = root.resolve("state_machines/state_machine_enterprise"); + CodebaseContext context = new CodebaseContext(); + context.scan(enterprise); + + StateMachineTypeResolver.MachineTypes types = StateMachineTypeResolver.resolveTypes( + "click.kamil.enterprise.machines.order.OrderStateMachineConfiguration", context); + + assertThat(types.stateTypeFqn()) + .isEqualTo("click.kamil.enterprise.machines.order.OrderState"); + assertThat(types.eventTypeFqn()) + .isEqualTo("click.kamil.enterprise.machines.order.OrderEvent"); + assertThat(StateMachineTypeResolver.extendsEnumStateMachineConfigurer( + "click.kamil.enterprise.machines.order.OrderStateMachineConfiguration", context)) + .isTrue(); + } + + private static Path findProjectRoot() { + Path current = Path.of(".").toAbsolutePath(); + while (current != null && !Files.exists(current.resolve("settings.gradle"))) { + current = current.getParent(); + } + return current; + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisCacheCorrectnessTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisCacheCorrectnessTest.java index aba1532..27abb52 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisCacheCorrectnessTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisCacheCorrectnessTest.java @@ -230,6 +230,7 @@ class AnalysisCacheCorrectnessTest { new TriggerEnricher(), new EntryPointEnricher(), new CallChainEnricher(), + new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(), new TransitionLinkerEnricher())); List configNames = List.of( @@ -274,6 +275,7 @@ class AnalysisCacheCorrectnessTest { new TriggerEnricher(), new EntryPointEnricher(), new CallChainEnricher(), + new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(), new TransitionLinkerEnricher())); List configNames = TwelveConfigHierarchyTestSupport.concreteConfigNames(); diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizerTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizerTest.java new file mode 100644 index 0000000..437c03a --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/AnalysisResultFinalizerTest.java @@ -0,0 +1,113 @@ +package click.kamil.springstatemachineexporter.analysis.service; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import click.kamil.springstatemachineexporter.model.Event; +import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Transition; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static org.assertj.core.api.Assertions.assertThat; + +class AnalysisResultFinalizerTest { + + @Test + void shouldReCanonicalizeAfterPropertyResolution(@TempDir Path tempDir) throws Exception { + writeSampleConfig(tempDir); + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + Transition transition = new Transition(); + transition.setEvent(Event.of("OrderEvent.PAY", "OrderEvent.PAY")); + transition.setSourceStates(List.of(State.of("OrderState.NEW", "OrderState.NEW"))); + transition.setTargetStates(List.of(State.of("OrderState.PAID", "OrderState.PAID"))); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.OrderStateMachineConfiguration") + .transitions(List.of(transition)) + .startStates(Set.of("OrderState.NEW")) + .metadata(CodebaseMetadata.builder() + .triggers(List.of(TriggerPoint.builder() + .event("OrderEvent.PAY") + .className("com.example.web.OrderController") + .methodName("pay") + .sourceFile("OrderController.java") + .polymorphicEvents(List.of("OrderEvent.PAY")) + .eventTypeFqn("com.example.order.OrderEvent") + .build())) + .properties(Map.of("default", Map.of())) + .build()) + .build(); + + result.applyResolution(Map.of()); + AnalysisResultFinalizer.finalizeResult(result, context); + + assertThat(result.getTransitions().get(0).getEvent().fullIdentifier()) + .isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(result.getStartStates()) + .containsExactly("com.example.order.OrderState.NEW"); + assertThat(result.getMetadata().getTriggers().get(0).getPolymorphicEvents()) + .containsExactly("com.example.order.OrderEvent.PAY"); + } + + @Test + void applyResolutionShouldRebuildTriggersWithAllFields(@TempDir Path tempDir) throws Exception { + writeSampleConfig(tempDir); + + TriggerPoint trigger = TriggerPoint.builder() + .event("${app.event}") + .sourceState("${app.state}") + .className("com.example.web.OrderController") + .methodName("pay") + .sourceFile("OrderController.java") + .polymorphicEvents(List.of("${app.event}")) + .eventTypeFqn("com.example.order.OrderEvent") + .stateTypeFqn("com.example.order.OrderState") + .build(); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.OrderStateMachineConfiguration") + .metadata(CodebaseMetadata.builder().triggers(List.of(trigger)).build()) + .build(); + + result.applyResolution(Map.of( + "app.event", "OrderEvent.PAY", + "app.state", "OrderState.NEW")); + + TriggerPoint resolved = result.getMetadata().getTriggers().get(0); + assertThat(resolved.getEvent()).isEqualTo("com.example.order.OrderEvent.PAY"); + assertThat(resolved.getSourceState()).isEqualTo("com.example.order.OrderState.NEW"); + assertThat(resolved.getPolymorphicEvents()).containsExactly("com.example.order.OrderEvent.PAY"); + } + + private static void writeSampleConfig(Path tempDir) throws Exception { + Path orderPkg = tempDir.resolve("com/example/order"); + Path configPkg = tempDir.resolve("com/example/config"); + Files.createDirectories(orderPkg); + Files.createDirectories(configPkg); + Files.writeString(orderPkg.resolve("OrderState.java"), + "package com.example.order; public enum OrderState { NEW, PAID }"); + Files.writeString(orderPkg.resolve("OrderEvent.java"), + "package com.example.order; public enum OrderEvent { PAY }"); + Files.writeString(configPkg.resolve("OrderStateMachineConfiguration.java"), + """ + package com.example.config; + import com.example.order.OrderEvent; + import com.example.order.OrderState; + import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter; + public class OrderStateMachineConfiguration + extends EnumStateMachineConfigurerAdapter { + } + """); + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/DispatcherEndpointTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/DispatcherEndpointTest.java index d582c57..bd924b4 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/DispatcherEndpointTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/DispatcherEndpointTest.java @@ -76,7 +76,7 @@ class DispatcherEndpointTest { .hasSize(1) .first() .extracting("event") - .isEqualTo("OrderEvent.PAY"); + .isEqualTo("com.example.OrderEvent.PAY"); } @Test diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/EnterpriseOrderCanonicalExportTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/EnterpriseOrderCanonicalExportTest.java new file mode 100644 index 0000000..b50d73e --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/EnterpriseOrderCanonicalExportTest.java @@ -0,0 +1,57 @@ +package click.kamil.springstatemachineexporter.analysis.service; + +import click.kamil.springstatemachineexporter.exporter.JsonExporter; +import click.kamil.springstatemachineexporter.service.ExportService; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +class EnterpriseOrderCanonicalExportTest { + + @Test + void shouldExportEnterpriseOrderMachineWithPackageCanonicalIdentifiers(@TempDir Path tempDir) throws Exception { + Path enterprise = findProjectRoot().resolve("state_machines/state_machine_enterprise"); + ExportService exportService = new ExportService(List.of(new JsonExporter())); + exportService.runExporter(enterprise, tempDir, List.of("json"), true, List.of(), null, null, + click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, + click.kamil.springstatemachineexporter.exporter.EnumFormat.fn); + + JsonNode machine = readMachineJson(tempDir, "OrderStateMachineConfiguration", new ObjectMapper()); + JsonNode firstTransition = machine.path("transitions").get(0); + + assertThat(firstTransition.path("event").path("fullIdentifier").asText()) + .isEqualTo("click.kamil.enterprise.machines.order.OrderEvent.PAY"); + assertThat(firstTransition.path("sourceStates").get(0).path("fullIdentifier").asText()) + .isEqualTo("click.kamil.enterprise.machines.order.OrderState.NEW"); + assertThat(machine.path("startStates").get(0).asText()) + .isEqualTo("click.kamil.enterprise.machines.order.OrderState.NEW"); + } + + private static JsonNode readMachineJson(Path outputDir, String configBaseName, ObjectMapper mapper) + throws Exception { + Path machineDir; + try (var stream = Files.list(outputDir)) { + machineDir = stream + .filter(Files::isDirectory) + .filter(path -> path.getFileName().toString().endsWith(configBaseName)) + .findFirst() + .orElseThrow(() -> new IllegalStateException("No output for " + configBaseName)); + } + return mapper.readTree(machineDir.resolve(machineDir.getFileName() + ".json").toFile()); + } + + private static Path findProjectRoot() { + Path current = Path.of(".").toAbsolutePath(); + while (current != null && !Files.exists(current.resolve("settings.gradle"))) { + current = current.getParent(); + } + return current; + } +} diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/LayeredDispatcherSampleTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/LayeredDispatcherSampleTest.java index f334f80..1389b78 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/LayeredDispatcherSampleTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/LayeredDispatcherSampleTest.java @@ -41,28 +41,48 @@ class LayeredDispatcherSampleTest { JsonNode documentMachine = readMachineJson(tempDir, "StandardDocumentStateMachineConfiguration", mapper); assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/pay", - "OrderTransitionEvent.PAY", "OrderState.NEW", "OrderState.PAID"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", + "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/ship", - "OrderTransitionEvent.SHIP", "OrderState.PAID", "OrderState.SHIPPED"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/cancel", - "OrderTransitionEvent.CANCEL", "OrderState.PAID", "OrderState.CANCELLED"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED"); assertEndpointLinksSingleTransition(documentMachine, "POST /api/documents/submit", - "DocumentTransitionEvent.SUBMIT", "DocumentState.DRAFT", "DocumentState.SUBMITTED"); + "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT", + "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT", + "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED"); assertEndpointLinksSingleTransition(documentMachine, "POST /api/documents/approve", - "DocumentTransitionEvent.APPROVE", "DocumentState.SUBMITTED", "DocumentState.APPROVED"); + "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE", + "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED"); assertEndpointLinksSingleTransition(documentMachine, "POST /api/documents/reject", - "DocumentTransitionEvent.REJECT", "DocumentState.SUBMITTED", "DocumentState.REJECTED"); + "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT", + "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/rich/pay", - "OrderTransitionEvent.PAY", "OrderState.NEW", "OrderState.PAID"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", + "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/rich/ship", - "OrderTransitionEvent.SHIP", "OrderState.PAID", "OrderState.SHIPPED"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/string-dispatch/orders/pay", - "OrderTransitionEvent.PAY", "OrderState.NEW", "OrderState.PAID"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", + "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/string-dispatch/orders/ship", - "OrderTransitionEvent.SHIP", "OrderState.PAID", "OrderState.SHIPPED"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED"); } @Test @@ -75,8 +95,10 @@ class LayeredDispatcherSampleTest { JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper()); - assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/pay", "OrderTransitionEvent.PAY"); - assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/ship", "OrderTransitionEvent.SHIP"); + assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/pay", + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY"); + assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/ship", + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP"); } @Test @@ -90,14 +112,21 @@ class LayeredDispatcherSampleTest { JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper()); assertEndpointLinksSingleTransition(orderMachine, "POST /api/commands/order.pay", - "OrderTransitionEvent.PAY", "OrderState.NEW", "OrderState.PAID"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", + "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID"); assertEndpointLinksSingleTransition(orderMachine, "POST /api/commands/order.ship", - "OrderTransitionEvent.SHIP", "OrderState.PAID", "OrderState.SHIPPED"); - assertSingleMatchedChain(orderMachine, "POST /api/commands/order.pay", "OrderTransitionEvent.PAY"); + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", + "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED"); + assertSingleMatchedChain(orderMachine, "POST /api/commands/order.pay", + "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY"); JsonNode documentMachine = readMachineJson(tempDir, "StandardDocumentStateMachineConfiguration", new ObjectMapper()); assertEndpointLinksSingleTransition(documentMachine, "POST /api/commands/document.submit", - "DocumentTransitionEvent.SUBMIT", "DocumentState.DRAFT", "DocumentState.SUBMITTED"); + "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT", + "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT", + "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED"); JsonNode entryPoints = documentMachine.path("metadata").path("entryPoints"); assertThat(entryPoints.isArray()).isTrue(); assertThat(entryPoints.findValuesAsText("name")) diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/StringDispatchCallGraphGapTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/StringDispatchCallGraphGapTest.java index 9145583..773ac84 100644 --- a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/StringDispatchCallGraphGapTest.java +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/service/StringDispatchCallGraphGapTest.java @@ -42,7 +42,7 @@ class StringDispatchCallGraphGapTest { assertThat(matchedChains).hasSize(1); assertThat(matchedChains.get(0).get("matchedTransitions")).hasSize(1); assertThat(matchedChains.get(0).get("matchedTransitions").get(0).get("event").asText()) - .isEqualTo("OrderTransitionEvent.PAY"); + .isEqualTo("click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY"); } private static JsonNode readMachineJson(Path outputDir, String configBaseName, ObjectMapper mapper) diff --git a/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidatorTest.java b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidatorTest.java new file mode 100644 index 0000000..6464cdd --- /dev/null +++ b/state_machine_exporter/src/test/java/click/kamil/springstatemachineexporter/analysis/validation/AnalysisCanonicalFormValidatorTest.java @@ -0,0 +1,181 @@ +package click.kamil.springstatemachineexporter.analysis.validation; + +import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; +import click.kamil.springstatemachineexporter.analysis.model.CallChain; +import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; +import click.kamil.springstatemachineexporter.analysis.model.MatchedTransition; +import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; +import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; +import click.kamil.springstatemachineexporter.model.Event; +import click.kamil.springstatemachineexporter.model.State; +import click.kamil.springstatemachineexporter.model.Transition; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Set; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +class AnalysisCanonicalFormValidatorTest { + + @Test + void shouldPassWhenAllEnumIdentifiersArePackageCanonical(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.OrderStateMachineConfiguration") + .transitions(List.of(transition( + "com.example.order.OrderEvent.PAY", + "com.example.order.OrderState.NEW", + "com.example.order.OrderState.PAID"))) + .startStates(Set.of("com.example.order.OrderState.NEW")) + .metadata(CodebaseMetadata.builder() + .triggers(List.of(TriggerPoint.builder() + .event("com.example.order.OrderEvent.PAY") + .className("com.example.web.OrderController") + .methodName("pay") + .sourceFile("OrderController.java") + .polymorphicEvents(List.of("com.example.order.OrderEvent.PAY")) + .eventTypeFqn("com.example.order.OrderEvent") + .build())) + .callChains(List.of(CallChain.builder() + .triggerPoint(TriggerPoint.builder() + .event("com.example.order.OrderEvent.PAY") + .className("com.example.web.OrderController") + .methodName("pay") + .sourceFile("OrderController.java") + .polymorphicEvents(List.of("com.example.order.OrderEvent.PAY")) + .eventTypeFqn("com.example.order.OrderEvent") + .build()) + .matchedTransitions(List.of(MatchedTransition.builder() + .event("com.example.order.OrderEvent.PAY") + .sourceState("com.example.order.OrderState.NEW") + .targetState("com.example.order.OrderState.PAID") + .build())) + .build())) + .build()) + .build(); + + assertThat(AnalysisCanonicalFormValidator.validate(result, context)).isEmpty(); + } + + @Test + void shouldFailWhenTransitionFullIdentifiersUseShortEnumForm(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + Transition transition = new Transition(); + transition.setEvent(Event.of("OrderEvent.PAY", "OrderEvent.PAY")); + transition.setSourceStates(List.of(State.of("OrderState.NEW", "OrderState.NEW"))); + transition.setTargetStates(List.of(State.of("OrderState.PAID", "OrderState.PAID"))); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.OrderStateMachineConfiguration") + .transitions(List.of(transition)) + .build(); + + List violations = + AnalysisCanonicalFormValidator.validate(result, context); + + assertThat(violations) + .extracting(AnalysisCanonicalFormValidator.Violation::path) + .contains("transitions[0].event.fullIdentifier"); + assertThatThrownBy(() -> AnalysisCanonicalFormValidator.enforce(result, context)) + .isInstanceOf(AnalysisCanonicalFormException.class); + } + + @Test + void shouldFailWhenMatchedTransitionStatesUseShortIdentifiers(@TempDir Path tempDir) throws IOException { + writeSampleConfig(tempDir); + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.OrderStateMachineConfiguration") + .transitions(List.of(transition( + "com.example.order.OrderEvent.PAY", + "com.example.order.OrderState.NEW", + "com.example.order.OrderState.PAID"))) + .metadata(CodebaseMetadata.builder() + .callChains(List.of(CallChain.builder() + .matchedTransitions(List.of(MatchedTransition.builder() + .event("com.example.order.OrderEvent.PAY") + .sourceState("OrderState.NEW") + .targetState("OrderState.PAID") + .build())) + .build())) + .build()) + .build(); + + assertThat(AnalysisCanonicalFormValidator.validate(result, context)) + .extracting(AnalysisCanonicalFormValidator.Violation::path) + .anyMatch(path -> path.contains("matchedTransitions[0].sourceState")); + } + + @Test + void shouldSkipValidationForStringStateMachines(@TempDir Path tempDir) throws IOException { + Path configPkg = tempDir.resolve("com/example/config"); + Files.createDirectories(configPkg); + Files.writeString(configPkg.resolve("StringStateMachineConfiguration.java"), + """ + package com.example.config; + import org.springframework.statemachine.config.StateMachineConfigurerAdapter; + public class StringStateMachineConfiguration extends StateMachineConfigurerAdapter { + } + """); + + CodebaseContext context = new CodebaseContext(); + context.scan(tempDir); + + AnalysisResult result = AnalysisResult.builder() + .name("com.example.config.StringStateMachineConfiguration") + .transitions(List.of(transition("PAY", "NEW", "PAID"))) + .build(); + + assertThat(AnalysisCanonicalFormValidator.validate(result, context)).isEmpty(); + } + + private static Transition transition(String eventFqn, String sourceFqn, String targetFqn) { + Transition transition = new Transition(); + transition.setEvent(Event.of(eventFqn, eventFqn)); + transition.setSourceStates(List.of(State.of(sourceFqn, sourceFqn))); + transition.setTargetStates(List.of(State.of(targetFqn, targetFqn))); + return transition; + } + + private static void writeSampleConfig(Path tempDir) throws IOException { + Path orderPkg = tempDir.resolve("com/example/order"); + Path configPkg = tempDir.resolve("com/example/config"); + Files.createDirectories(orderPkg); + Files.createDirectories(configPkg); + + Files.writeString(orderPkg.resolve("OrderState.java"), + """ + package com.example.order; + public enum OrderState { NEW, PAID } + """); + Files.writeString(orderPkg.resolve("OrderEvent.java"), + """ + package com.example.order; + public enum OrderEvent { PAY } + """); + Files.writeString(configPkg.resolve("OrderStateMachineConfiguration.java"), + """ + package com.example.config; + import com.example.order.OrderEvent; + import com.example.order.OrderState; + import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter; + public class OrderStateMachineConfiguration + extends EnumStateMachineConfigurerAdapter { + } + """); + } +} 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 836ab74..e9b0774 100644 --- a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "ComplexStateMachineConfig.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,11 +271,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17" } ], "event" : null, "guards" : [ { @@ -292,11 +292,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18" } ], "event" : null, "guards" : [ { @@ -313,11 +313,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -327,11 +327,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20" } ], "event" : null, "guards" : [ { @@ -348,11 +348,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -362,11 +362,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19" } ], "event" : null, "guards" : [ { @@ -383,11 +383,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -397,11 +397,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1" } ], "event" : null, "guards" : [ { @@ -418,11 +418,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -432,11 +432,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5" } ], "event" : null, "guards" : [ { @@ -453,11 +453,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -467,11 +467,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13" } ], "event" : null, "guards" : [ { @@ -488,11 +488,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14" } ], "event" : null, "guards" : [ { @@ -509,11 +509,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -523,11 +523,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10" } ], "event" : null, "guards" : [ { @@ -544,11 +544,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -558,11 +558,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12" } ], "event" : null, "guards" : [ { @@ -579,11 +579,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -593,11 +593,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8" } ], "event" : null, "guards" : [ { @@ -614,11 +614,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7" } ], "event" : null, "guards" : [ { @@ -635,11 +635,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -649,11 +649,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9" } ], "event" : null, "guards" : [ { @@ -670,11 +670,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10" } ], "event" : null, "guards" : [ ], diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.png index 6dd9abf..69621e2 100644 Binary files a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.puml index 65692f3..7572bd8 100644 --- a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> ComplexStateMachineConfig.States.STATE1 state States.STATE16 <> state States.STATE17 <> diff --git a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.scxml.xml index 166eefe..c70ed20 100644 --- a/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/ComplexStateMachineConfig/ComplexStateMachineConfig.scxml.xml @@ -124,5 +124,7 @@ + + diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.dot b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.dot index f37d0fc..2f9d4f0 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.dot +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.dot @@ -8,15 +8,15 @@ digraph statemachine { _start [shape=circle, label="", fillcolor=black, width=0.1]; _start -> NEW; CANCELLED [fillcolor=lightgray]; - DELIVERED [fillcolor=lightgray]; RETURNED [fillcolor=lightgray]; - NEW -> CHECK_AVAILABILITY [label="PLACE_ORDER", style="solid", color="black"]; + DELIVERED [fillcolor=lightgray]; + NEW -> CHECK_AVAILABILITY [label="String.PLACE_ORDER", style="solid", color="black"]; CHECK_AVAILABILITY_choice -> PENDING_PAYMENT [label="[λ] (order=0)", style="solid", color="blue"]; CHECK_AVAILABILITY_choice -> CANCELLED [label="(order=1)", style="solid", color="blue"]; - PENDING_PAYMENT -> PAID [label="PAY_ORDER", style="solid", color="black"]; - PAID -> SHIPPED [label="SHIP_ORDER", style="solid", color="black"]; - SHIPPED -> DELIVERED [label="FINALIZE", style="solid", color="black"]; - PAID -> CANCELLED [label="CANCEL_ORDER", style="solid", color="black"]; - DELIVERED -> RETURNED [label="RETURN_ORDER", style="solid", color="black"]; + PENDING_PAYMENT -> PAID [label="String.PAY_ORDER", style="solid", color="black"]; + PAID -> SHIPPED [label="String.SHIP_ORDER", style="solid", color="black"]; + SHIPPED -> DELIVERED [label="String.FINALIZE", style="solid", color="black"]; + PAID -> CANCELLED [label="String.CANCEL_ORDER", style="solid", color="black"]; + DELIVERED -> RETURNED [label="String.RETURN_ORDER", style="solid", color="black"]; } 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 8c7538e..4fb4720 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.json @@ -1,84 +1,6 @@ { "metadata" : { - "triggers" : [ { - "event" : "AUDIT_EVENT", - "className" : "click.kamil.examples.enterprise.api.SecurityInterceptor", - "methodName" : "preHandle", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "PLACE_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "place", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 16, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "CANCEL_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "cancel", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 21, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "PAY_ORDER", - "className" : "click.kamil.examples.enterprise.service.ReactivePaymentService", - "methodName" : "processPayment", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 18, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "SHIP_ORDER", - "className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener", - "methodName" : "onShippingReady", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "RETURN_ORDER", - "className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener", - "methodName" : "onReturn", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - } ], + "triggers" : [ ], "entryPoints" : [ { "type" : "CUSTOM", "name" : "INTERCEPTOR: SecurityInterceptor.preHandle", @@ -135,314 +57,27 @@ "annotations" : [ ] } ] } ], - "callChains" : [ { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/enterprise/orders/place", - "className" : "click.kamil.examples.enterprise.api.OrderApi", - "methodName" : "placeOrder", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderApi.java", - "metadata" : { - "path" : "/api/enterprise/orders/place", - "verb" : "POST" - }, - "parameters" : [ ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.OrderApi.placeOrder", "click.kamil.examples.enterprise.api.OrderController.placeOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.place" ], - "triggerPoint" : { - "event" : "PLACE_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "place", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 16, - "polymorphicEvents" : [ "PLACE_ORDER" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "NEW", - "targetState" : "CHECK_AVAILABILITY", - "event" : "PLACE_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/enterprise/orders/{id}/cancel", - "className" : "click.kamil.examples.enterprise.api.OrderApi", - "methodName" : "cancelOrder", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderApi.java", - "metadata" : { - "path" : "/api/enterprise/orders/{id}/cancel", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "id", - "type" : "String", - "annotations" : [ "PathVariable" ] - } ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.OrderApi.cancelOrder", "click.kamil.examples.enterprise.api.OrderController.cancelOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.cancel" ], - "triggerPoint" : { - "event" : "CANCEL_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "cancel", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 21, - "polymorphicEvents" : [ "CANCEL_ORDER" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "PAID", - "targetState" : "CANCELLED", - "event" : "CANCEL_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/enterprise/orders/place", - "className" : "click.kamil.examples.enterprise.api.OrderController", - "methodName" : "placeOrder", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java", - "metadata" : { - "path" : "/api/enterprise/orders/place", - "verb" : "POST" - }, - "parameters" : [ ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.placeOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.place" ], - "triggerPoint" : { - "event" : "PLACE_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "place", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 16, - "polymorphicEvents" : [ "PLACE_ORDER" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "NEW", - "targetState" : "CHECK_AVAILABILITY", - "event" : "PLACE_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/enterprise/orders/{id}/cancel", - "className" : "click.kamil.examples.enterprise.api.OrderController", - "methodName" : "cancelOrder", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java", - "metadata" : { - "path" : "/api/enterprise/orders/{id}/cancel", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "id", - "type" : "String", - "annotations" : [ "PathVariable" ] - } ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.cancelOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.cancel" ], - "triggerPoint" : { - "event" : "CANCEL_ORDER", - "className" : "click.kamil.examples.enterprise.service.OrderServiceImpl", - "methodName" : "cancel", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 21, - "polymorphicEvents" : [ "CANCEL_ORDER" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "PAID", - "targetState" : "CANCELLED", - "event" : "CANCEL_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "CUSTOM", - "name" : "INTERCEPTOR: SecurityInterceptor.preHandle", - "className" : "click.kamil.examples.enterprise.api.SecurityInterceptor", - "methodName" : "preHandle", - "sourceFile" : null, - "metadata" : { - "interceptorType" : "Spring MVC Interceptor" - }, - "parameters" : [ ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.SecurityInterceptor.preHandle" ], - "triggerPoint" : { - "event" : "AUDIT_EVENT", - "className" : "click.kamil.examples.enterprise.api.SecurityInterceptor", - "methodName" : "preHandle", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/enterprise/payments", - "className" : "click.kamil.examples.enterprise.api.ReactivePaymentController", - "methodName" : "pay", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/ReactivePaymentController.java", - "metadata" : { - "path" : "/api/enterprise/payments", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ "RequestBody" ] - } ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.api.ReactivePaymentController.pay", "click.kamil.examples.enterprise.service.ReactivePaymentService.processPayment" ], - "triggerPoint" : { - "event" : "PAY_ORDER", - "className" : "click.kamil.examples.enterprise.service.ReactivePaymentService", - "methodName" : "processPayment", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 18, - "polymorphicEvents" : [ "PAY_ORDER" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "PENDING_PAYMENT", - "targetState" : "PAID", - "event" : "PAY_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "JMS", - "name" : "JMS: shipping.queue", - "className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener", - "methodName" : "onShippingReady", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java", - "metadata" : { - "protocol" : "JMS", - "destination" : "shipping.queue" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ ] - } ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.messaging.ShippingJmsListener.onShippingReady" ], - "triggerPoint" : { - "event" : "SHIP_ORDER", - "className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener", - "methodName" : "onShippingReady", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "PAID", - "targetState" : "SHIPPED", - "event" : "SHIP_ORDER" - } ] - }, { - "entryPoint" : { - "type" : "RABBIT", - "name" : "RABBIT: returns.queue", - "className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener", - "methodName" : "onReturn", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java", - "metadata" : { - "protocol" : "RABBIT", - "destination" : "returns.queue" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ ] - } ] - }, - "methodChain" : [ "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener.onReturn" ], - "triggerPoint" : { - "event" : "RETURN_ORDER", - "className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener", - "methodName" : "onReturn", - "sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 17, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "DELIVERED", - "targetState" : "RETURNED", - "event" : "RETURN_ORDER" - } ] - } ], + "callChains" : [ ], "properties" : { "default" : { } } }, "name" : "click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "NEW" ], + "startStates" : [ "String.NEW" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"NEW\"", - "fullIdentifier" : "NEW" + "fullIdentifier" : "String.NEW" } ], "targetStates" : [ { "rawName" : "\"CHECK_AVAILABILITY\"", - "fullIdentifier" : "CHECK_AVAILABILITY" + "fullIdentifier" : "String.CHECK_AVAILABILITY" } ], "event" : { "rawName" : "OrderEvents.PLACE", - "fullIdentifier" : "PLACE_ORDER" + "fullIdentifier" : "String.PLACE_ORDER" }, "guards" : [ ], "actions" : [ ], @@ -451,11 +86,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "\"CHECK_AVAILABILITY\"", - "fullIdentifier" : "CHECK_AVAILABILITY" + "fullIdentifier" : "String.CHECK_AVAILABILITY" } ], "targetStates" : [ { "rawName" : "\"PENDING_PAYMENT\"", - "fullIdentifier" : "PENDING_PAYMENT" + "fullIdentifier" : "String.PENDING_PAYMENT" } ], "event" : null, "guards" : [ { @@ -472,11 +107,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "\"CHECK_AVAILABILITY\"", - "fullIdentifier" : "CHECK_AVAILABILITY" + "fullIdentifier" : "String.CHECK_AVAILABILITY" } ], "targetStates" : [ { "rawName" : "\"CANCELLED\"", - "fullIdentifier" : "CANCELLED" + "fullIdentifier" : "String.CANCELLED" } ], "event" : null, "guards" : [ ], @@ -486,15 +121,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PENDING_PAYMENT\"", - "fullIdentifier" : "PENDING_PAYMENT" + "fullIdentifier" : "String.PENDING_PAYMENT" } ], "targetStates" : [ { "rawName" : "\"PAID\"", - "fullIdentifier" : "PAID" + "fullIdentifier" : "String.PAID" } ], "event" : { "rawName" : "OrderEvents.PAY", - "fullIdentifier" : "PAY_ORDER" + "fullIdentifier" : "String.PAY_ORDER" }, "guards" : [ ], "actions" : [ ], @@ -503,15 +138,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PAID\"", - "fullIdentifier" : "PAID" + "fullIdentifier" : "String.PAID" } ], "targetStates" : [ { "rawName" : "\"SHIPPED\"", - "fullIdentifier" : "SHIPPED" + "fullIdentifier" : "String.SHIPPED" } ], "event" : { "rawName" : "OrderEvents.SHIP", - "fullIdentifier" : "SHIP_ORDER" + "fullIdentifier" : "String.SHIP_ORDER" }, "guards" : [ ], "actions" : [ ], @@ -520,15 +155,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"SHIPPED\"", - "fullIdentifier" : "SHIPPED" + "fullIdentifier" : "String.SHIPPED" } ], "targetStates" : [ { "rawName" : "\"DELIVERED\"", - "fullIdentifier" : "DELIVERED" + "fullIdentifier" : "String.DELIVERED" } ], "event" : { "rawName" : "\"FINALIZE\"", - "fullIdentifier" : "FINALIZE" + "fullIdentifier" : "String.FINALIZE" }, "guards" : [ ], "actions" : [ ], @@ -537,15 +172,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PAID\"", - "fullIdentifier" : "PAID" + "fullIdentifier" : "String.PAID" } ], "targetStates" : [ { "rawName" : "\"CANCELLED\"", - "fullIdentifier" : "CANCELLED" + "fullIdentifier" : "String.CANCELLED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "CANCEL_ORDER" + "fullIdentifier" : "String.CANCEL_ORDER" }, "guards" : [ ], "actions" : [ ], @@ -554,19 +189,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"DELIVERED\"", - "fullIdentifier" : "DELIVERED" + "fullIdentifier" : "String.DELIVERED" } ], "targetStates" : [ { "rawName" : "\"RETURNED\"", - "fullIdentifier" : "RETURNED" + "fullIdentifier" : "String.RETURNED" } ], "event" : { "rawName" : "OrderEvents.RETURN", - "fullIdentifier" : "RETURN_ORDER" + "fullIdentifier" : "String.RETURN_ORDER" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "CANCELLED", "DELIVERED", "RETURNED" ] + "endStates" : [ "String.CANCELLED", "String.RETURNED", "String.DELIVERED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.png index 7fbce79..39e7505 100644 Binary files a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.puml index 4a4d240..8a47e6e 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.puml @@ -21,21 +21,21 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> NEW +[*] --> String.NEW -state CHECK_AVAILABILITY <> +state String.CHECK_AVAILABILITY <> -NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <> : PLACE_ORDER -CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <> : [λ] (order=0) -CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <> : (order=1) -PENDING_PAYMENT -[#1E90FF,bold]-> PAID <> : PAY_ORDER -PAID -[#1E90FF,bold]-> SHIPPED <> : SHIP_ORDER -SHIPPED -[#1E90FF,bold]-> DELIVERED <> : FINALIZE -PAID -[#1E90FF,bold]-> CANCELLED <> : CANCEL_ORDER -DELIVERED -[#1E90FF,bold]-> RETURNED <> : RETURN_ORDER +String.NEW -[#1E90FF,bold]-> String.CHECK_AVAILABILITY <> : String.PLACE_ORDER +String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.PENDING_PAYMENT <> : [λ] (order=0) +String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.CANCELLED <> : (order=1) +String.PENDING_PAYMENT -[#1E90FF,bold]-> String.PAID <> : String.PAY_ORDER +String.PAID -[#1E90FF,bold]-> String.SHIPPED <> : String.SHIP_ORDER +String.SHIPPED -[#1E90FF,bold]-> String.DELIVERED <> : String.FINALIZE +String.PAID -[#1E90FF,bold]-> String.CANCELLED <> : String.CANCEL_ORDER +String.DELIVERED -[#1E90FF,bold]-> String.RETURNED <> : String.RETURN_ORDER -CANCELLED --> [*] -DELIVERED --> [*] -RETURNED --> [*] +String.CANCELLED --> [*] +String.RETURNED --> [*] +String.DELIVERED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.scxml.xml index 367c9bf..ed0e4c3 100644 --- a/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/EnterpriseStateMachineConfig/EnterpriseStateMachineConfig.scxml.xml @@ -1,7 +1,7 @@ - + @@ -12,19 +12,19 @@ - + - + - + diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.dot b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.dot index a13f5ef..653e9c3 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.dot +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.dot @@ -7,11 +7,11 @@ digraph statemachine { _start -> INIT_STATE; CANCELLED [fillcolor=lightgray]; COMPLETED [fillcolor=lightgray]; - START -> PROCESSING [label="SUBMIT_EVENT", style="solid", color="black"]; - PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; - PROCESSING -> CANCELLED [label="CANCEL_EVENT", style="solid", color="black"]; - START -> PROCESSING [label="REACTIVE_EVENT", style="solid", color="black"]; - START -> START [label="AUDIT_EVENT", style="solid", color="black"]; - START -> PROCESSING [label="EXTERNAL_TRIGGER", style="solid", color="black"]; + START -> PROCESSING [label="String.SUBMIT_EVENT", style="solid", color="black"]; + PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"]; + PROCESSING -> CANCELLED [label="String.CANCEL_EVENT", style="solid", color="black"]; + START -> PROCESSING [label="String.REACTIVE_EVENT", style="solid", color="black"]; + START -> START [label="String.AUDIT_EVENT", style="solid", color="black"]; + START -> PROCESSING [label="String.EXTERNAL_TRIGGER", style="solid", color="black"]; } 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 c32693d..d98caf0 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.json @@ -1,6 +1,32 @@ { "metadata" : { - "triggers" : [ ], + "triggers" : [ { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.OrderService", + "methodName" : "resumeOrder", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 29, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl", + "methodName" : "capturePayment", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 28, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + } ], "entryPoints" : [ { "type" : "REST", "name" : "GET /api/base/{id}", @@ -32,7 +58,75 @@ "annotations" : [ "PathVariable" ] } ] } ], - "callChains" : [ ], + "callChains" : [ { + "entryPoint" : { + "type" : "REST", + "name" : "POST /api/orders/resume", + "className" : "click.kamil.examples.statemachine.extended.web.OrderController", + "methodName" : "resumeOrder", + "sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java", + "metadata" : { + "path" : "/api/orders/resume", + "verb" : "POST" + }, + "parameters" : [ { + "name" : "orderId", + "type" : "String", + "annotations" : [ ] + } ] + }, + "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ], + "triggerPoint" : { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.OrderService", + "methodName" : "resumeOrder", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 29, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, + "contextMachineId" : "orderId", + "matchedTransitions" : null + }, { + "entryPoint" : { + "type" : "REST", + "name" : "POST /api/payment/{id}/capture", + "className" : "click.kamil.examples.statemachine.extended.web.PaymentController", + "methodName" : "capturePaymentEndpoint", + "sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/PaymentController.java", + "metadata" : { + "path" : "/api/payment/{id}/capture", + "verb" : "POST" + }, + "parameters" : [ { + "name" : "id", + "type" : "String", + "annotations" : [ "PathVariable" ] + } ] + }, + "methodChain" : [ "click.kamil.examples.statemachine.extended.web.PaymentController.capturePaymentEndpoint", "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl.capturePayment" ], + "triggerPoint" : { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl", + "methodName" : "capturePayment", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 28, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, + "contextMachineId" : "paymentId", + "matchedTransitions" : null + } ], "properties" : { "default" : { "app.states.initial" : "INIT_STATE" @@ -44,20 +138,20 @@ }, "name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "INIT_STATE" ], + "startStates" : [ "String.INIT_STATE" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "MyEvents.SUBMIT", - "fullIdentifier" : "SUBMIT_EVENT" + "fullIdentifier" : "String.SUBMIT_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -66,15 +160,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "targetStates" : [ { "rawName" : "\"COMPLETED\"", - "fullIdentifier" : "COMPLETED" + "fullIdentifier" : "String.COMPLETED" } ], "event" : { "rawName" : "\"FINISH\"", - "fullIdentifier" : "FINISH" + "fullIdentifier" : "String.FINISH" }, "guards" : [ ], "actions" : [ ], @@ -83,15 +177,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "targetStates" : [ { "rawName" : "\"CANCELLED\"", - "fullIdentifier" : "CANCELLED" + "fullIdentifier" : "String.CANCELLED" } ], "event" : { "rawName" : "MyEvents.CANCEL", - "fullIdentifier" : "CANCEL_EVENT" + "fullIdentifier" : "String.CANCEL_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -100,15 +194,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "\"REACTIVE_EVENT\"", - "fullIdentifier" : "REACTIVE_EVENT" + "fullIdentifier" : "String.REACTIVE_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -117,15 +211,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "event" : { "rawName" : "\"AUDIT_EVENT\"", - "fullIdentifier" : "AUDIT_EVENT" + "fullIdentifier" : "String.AUDIT_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -134,19 +228,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "\"EXTERNAL_TRIGGER\"", - "fullIdentifier" : "EXTERNAL_TRIGGER" + "fullIdentifier" : "String.EXTERNAL_TRIGGER" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "CANCELLED", "COMPLETED" ] + "endStates" : [ "String.CANCELLED", "String.COMPLETED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.png index caf7c05..b111943 100644 Binary files a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.puml index d16ef6b..558f6a8 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.puml @@ -21,17 +21,17 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> INIT_STATE +[*] --> String.INIT_STATE -START -[#1E90FF,bold]-> PROCESSING <> : SUBMIT_EVENT -PROCESSING -[#1E90FF,bold]-> COMPLETED <> : FINISH -PROCESSING -[#1E90FF,bold]-> CANCELLED <> : CANCEL_EVENT -START -[#1E90FF,bold]-> PROCESSING <> : REACTIVE_EVENT -START -[#1E90FF,bold]-> START <> : AUDIT_EVENT -START -[#1E90FF,bold]-> PROCESSING <> : EXTERNAL_TRIGGER +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.SUBMIT_EVENT +String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <> : String.FINISH +String.PROCESSING -[#1E90FF,bold]-> String.CANCELLED <> : String.CANCEL_EVENT +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.REACTIVE_EVENT +String.START -[#1E90FF,bold]-> String.START <> : String.AUDIT_EVENT +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.EXTERNAL_TRIGGER -CANCELLED --> [*] -COMPLETED --> [*] +String.CANCELLED --> [*] +String.COMPLETED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.scxml.xml index 9094d51..e1b75aa 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig/ExtendedStateMachineConfig.scxml.xml @@ -1,14 +1,14 @@ - - - - + + + + - - + + diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.dot b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.dot index 135e343..db8e769 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.dot +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.dot @@ -7,11 +7,11 @@ digraph statemachine { _start -> PROD_INITIAL; CANCELLED [fillcolor=lightgray]; COMPLETED [fillcolor=lightgray]; - START -> PROCESSING [label="SUBMIT_EVENT", style="solid", color="black"]; - PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; - PROCESSING -> CANCELLED [label="CANCEL_EVENT", style="solid", color="black"]; - START -> PROCESSING [label="REACTIVE_EVENT", style="solid", color="black"]; - START -> START [label="AUDIT_EVENT", style="solid", color="black"]; - START -> PROCESSING [label="EXTERNAL_TRIGGER", style="solid", color="black"]; + START -> PROCESSING [label="String.SUBMIT_EVENT", style="solid", color="black"]; + PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"]; + PROCESSING -> CANCELLED [label="String.CANCEL_EVENT", style="solid", color="black"]; + START -> PROCESSING [label="String.REACTIVE_EVENT", style="solid", color="black"]; + START -> START [label="String.AUDIT_EVENT", style="solid", color="black"]; + START -> PROCESSING [label="String.EXTERNAL_TRIGGER", style="solid", color="black"]; } 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 ba097e4..c32fe63 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 @@ -1,6 +1,32 @@ { "metadata" : { - "triggers" : [ ], + "triggers" : [ { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.OrderService", + "methodName" : "resumeOrder", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 29, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl", + "methodName" : "capturePayment", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 28, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + } ], "entryPoints" : [ { "type" : "REST", "name" : "GET /api/base/{id}", @@ -32,7 +58,75 @@ "annotations" : [ "PathVariable" ] } ] } ], - "callChains" : [ ], + "callChains" : [ { + "entryPoint" : { + "type" : "REST", + "name" : "POST /api/orders/resume", + "className" : "click.kamil.examples.statemachine.extended.web.OrderController", + "methodName" : "resumeOrder", + "sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java", + "metadata" : { + "path" : "/api/orders/resume", + "verb" : "POST" + }, + "parameters" : [ { + "name" : "orderId", + "type" : "String", + "annotations" : [ ] + } ] + }, + "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ], + "triggerPoint" : { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.OrderService", + "methodName" : "resumeOrder", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 29, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, + "contextMachineId" : "orderId", + "matchedTransitions" : null + }, { + "entryPoint" : { + "type" : "REST", + "name" : "POST /api/payment/{id}/capture", + "className" : "click.kamil.examples.statemachine.extended.web.PaymentController", + "methodName" : "capturePaymentEndpoint", + "sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/PaymentController.java", + "metadata" : { + "path" : "/api/payment/{id}/capture", + "verb" : "POST" + }, + "parameters" : [ { + "name" : "id", + "type" : "String", + "annotations" : [ "PathVariable" ] + } ] + }, + "methodChain" : [ "click.kamil.examples.statemachine.extended.web.PaymentController.capturePaymentEndpoint", "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl.capturePayment" ], + "triggerPoint" : { + "event" : "[LIFECYCLE:RESTORE]", + "className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl", + "methodName" : "capturePayment", + "sourceFile" : null, + "sourceModule" : null, + "stateMachineId" : null, + "sourceState" : null, + "lineNumber" : 28, + "polymorphicEvents" : null, + "external" : false, + "constraint" : null, + "ambiguous" : false + }, + "contextMachineId" : "paymentId", + "matchedTransitions" : null + } ], "properties" : { "default" : { "app.states.initial" : "INIT_STATE" @@ -44,20 +138,20 @@ }, "name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "PROD_INITIAL" ], + "startStates" : [ "String.PROD_INITIAL" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "MyEvents.SUBMIT", - "fullIdentifier" : "SUBMIT_EVENT" + "fullIdentifier" : "String.SUBMIT_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -66,15 +160,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "targetStates" : [ { "rawName" : "\"COMPLETED\"", - "fullIdentifier" : "COMPLETED" + "fullIdentifier" : "String.COMPLETED" } ], "event" : { "rawName" : "\"FINISH\"", - "fullIdentifier" : "FINISH" + "fullIdentifier" : "String.FINISH" }, "guards" : [ ], "actions" : [ ], @@ -83,15 +177,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "targetStates" : [ { "rawName" : "\"CANCELLED\"", - "fullIdentifier" : "CANCELLED" + "fullIdentifier" : "String.CANCELLED" } ], "event" : { "rawName" : "MyEvents.CANCEL", - "fullIdentifier" : "CANCEL_EVENT" + "fullIdentifier" : "String.CANCEL_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -100,15 +194,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "\"REACTIVE_EVENT\"", - "fullIdentifier" : "REACTIVE_EVENT" + "fullIdentifier" : "String.REACTIVE_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -117,15 +211,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "event" : { "rawName" : "\"AUDIT_EVENT\"", - "fullIdentifier" : "AUDIT_EVENT" + "fullIdentifier" : "String.AUDIT_EVENT" }, "guards" : [ ], "actions" : [ ], @@ -134,19 +228,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "\"EXTERNAL_TRIGGER\"", - "fullIdentifier" : "EXTERNAL_TRIGGER" + "fullIdentifier" : "String.EXTERNAL_TRIGGER" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "CANCELLED", "COMPLETED" ] + "endStates" : [ "String.CANCELLED", "String.COMPLETED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.png index 0b716e1..8299353 100644 Binary files a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.puml index 2802341..c66a058 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.puml @@ -21,17 +21,17 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> PROD_INITIAL +[*] --> String.PROD_INITIAL -START -[#1E90FF,bold]-> PROCESSING <> : SUBMIT_EVENT -PROCESSING -[#1E90FF,bold]-> COMPLETED <> : FINISH -PROCESSING -[#1E90FF,bold]-> CANCELLED <> : CANCEL_EVENT -START -[#1E90FF,bold]-> PROCESSING <> : REACTIVE_EVENT -START -[#1E90FF,bold]-> START <> : AUDIT_EVENT -START -[#1E90FF,bold]-> PROCESSING <> : EXTERNAL_TRIGGER +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.SUBMIT_EVENT +String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <> : String.FINISH +String.PROCESSING -[#1E90FF,bold]-> String.CANCELLED <> : String.CANCEL_EVENT +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.REACTIVE_EVENT +String.START -[#1E90FF,bold]-> String.START <> : String.AUDIT_EVENT +String.START -[#1E90FF,bold]-> String.PROCESSING <> : String.EXTERNAL_TRIGGER -CANCELLED --> [*] -COMPLETED --> [*] +String.CANCELLED --> [*] +String.COMPLETED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.scxml.xml index a99e0dd..f876600 100644 --- a/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/ExtendedStateMachineConfig_PROD/ExtendedStateMachineConfig.scxml.xml @@ -1,14 +1,14 @@ - - - - + + + + - - + + 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 6c09317..464aba0 100644 --- a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F1StateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,15 +271,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -288,15 +288,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -305,15 +305,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -322,15 +322,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -339,15 +339,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -356,15 +356,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -373,11 +373,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX" } ], "event" : null, "guards" : [ { @@ -394,11 +394,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -408,11 +408,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "event" : null, "guards" : [ { @@ -429,11 +429,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "event" : null, "guards" : [ { @@ -450,11 +450,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -464,11 +464,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ { @@ -485,11 +485,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -499,11 +499,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "event" : null, "guards" : [ { @@ -520,11 +520,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -534,11 +534,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "event" : null, "guards" : [ { @@ -555,11 +555,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -569,11 +569,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : null, "guards" : [ { @@ -590,11 +590,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -604,11 +604,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "event" : null, "guards" : [ { @@ -625,11 +625,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "event" : null, "guards" : [ { @@ -646,11 +646,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -660,11 +660,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ { @@ -681,11 +681,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -695,11 +695,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "event" : null, "guards" : [ { @@ -716,11 +716,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -730,11 +730,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : null, "guards" : [ { @@ -751,11 +751,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : null, "guards" : [ { @@ -772,11 +772,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -786,11 +786,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : null, "guards" : [ { @@ -807,11 +807,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -821,15 +821,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENTX", - "fullIdentifier" : "Events.EVENTX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTX" }, "guards" : [ ], "actions" : [ ], @@ -838,11 +838,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "event" : null, "guards" : [ { @@ -859,11 +859,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "event" : null, "guards" : [ ], @@ -873,15 +873,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_3", - "fullIdentifier" : "States.STATE_EXTRA_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -890,15 +890,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], @@ -907,19 +907,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png index 8da832e..50dfe8e 100644 Binary files a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.puml index dcb4963..b845aee 100644 --- a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1 state States.STATEY <> state States.STATE16 <> @@ -89,6 +89,6 @@ States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <> : Event States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.scxml.xml index 2b81fe0..83a22a2 100644 --- a/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/F1StateMachineConfiguration/F1StateMachineConfiguration.scxml.xml @@ -160,5 +160,9 @@ + + + + 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 e3d8ef4..bcd5e2e 100644 --- a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F2StateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,15 +271,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -288,15 +288,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -305,15 +305,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -322,15 +322,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -339,15 +339,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -356,15 +356,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -373,11 +373,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX" } ], "event" : null, "guards" : [ { @@ -394,11 +394,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -408,11 +408,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "event" : null, "guards" : [ { @@ -429,11 +429,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "event" : null, "guards" : [ { @@ -450,11 +450,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -464,11 +464,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ { @@ -485,11 +485,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -499,11 +499,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "event" : null, "guards" : [ { @@ -520,11 +520,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -534,11 +534,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "event" : null, "guards" : [ { @@ -555,11 +555,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -569,11 +569,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : null, "guards" : [ { @@ -590,11 +590,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -604,11 +604,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13" } ], "event" : null, "guards" : [ { @@ -625,11 +625,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "event" : null, "guards" : [ { @@ -646,11 +646,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -660,11 +660,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ { @@ -681,11 +681,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -695,11 +695,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12" } ], "event" : null, "guards" : [ { @@ -716,11 +716,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -730,11 +730,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : null, "guards" : [ { @@ -751,11 +751,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : null, "guards" : [ { @@ -772,11 +772,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -786,11 +786,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : null, "guards" : [ { @@ -807,11 +807,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -821,15 +821,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1_1", - "fullIdentifier" : "States.STATE_EXTRA_1_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_1" } ], "event" : { "rawName" : "Events.EVENT_1_1", - "fullIdentifier" : "Events.EVENT_1_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_1" }, "guards" : [ ], "actions" : [ ], @@ -838,11 +838,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1_2", - "fullIdentifier" : "States.STATE_EXTRA_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1_1", - "fullIdentifier" : "States.STATE_EXTRA_1_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_1" } ], "event" : null, "guards" : [ { @@ -859,11 +859,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1_2", - "fullIdentifier" : "States.STATE_EXTRA_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1_3", - "fullIdentifier" : "States.STATE_EXTRA_1_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_3" } ], "event" : null, "guards" : [ ], @@ -873,15 +873,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1_3", - "fullIdentifier" : "States.STATE_EXTRA_1_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_3" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENT_1_2", - "fullIdentifier" : "Events.EVENT_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2" }, "guards" : [ ], "actions" : [ ], @@ -890,15 +890,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1_1", - "fullIdentifier" : "States.STATE_EXTRA_1_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], @@ -907,15 +907,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1_2", - "fullIdentifier" : "States.STATE_EXTRA_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], @@ -924,19 +924,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.png index 43ad388..fb85b47 100644 Binary files a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.puml index 071a9cc..f0f0a02 100644 --- a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1 state States.STATEY <> state States.STATE16 <> @@ -90,6 +90,6 @@ States.STATE_EXTRA_1_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVE States.STATE_EXTRA_1_2 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.scxml.xml index bab54d4..9bd8b8d 100644 --- a/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/F2StateMachineConfiguration/F2StateMachineConfiguration.scxml.xml @@ -163,5 +163,9 @@ + + + + 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 bd9b661..cd4be4f 100644 --- a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.forkjoin.ForkJoinStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.START" ], + "startStates" : [ "ForkJoinStateMachineConfig.States.START" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.START", - "fullIdentifier" : "States.START" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.START" } ], "targetStates" : [ { "rawName" : "States.FORK", - "fullIdentifier" : "States.FORK" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.FORK" } ], "event" : { "rawName" : "Events.TO_FORK", - "fullIdentifier" : "Events.TO_FORK" + "fullIdentifier" : "ForkJoinStateMachineConfig.Events.TO_FORK" }, "guards" : [ ], "actions" : [ ], @@ -33,14 +33,14 @@ "type" : "FORK", "sourceStates" : [ { "rawName" : "States.FORK", - "fullIdentifier" : "States.FORK" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.FORK" } ], "targetStates" : [ { "rawName" : "States.REGION1_STATE1", - "fullIdentifier" : "States.REGION1_STATE1" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE1" }, { "rawName" : "States.REGION2_STATE1", - "fullIdentifier" : "States.REGION2_STATE1" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE1" } ], "event" : null, "guards" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.REGION1_STATE1", - "fullIdentifier" : "States.REGION1_STATE1" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE1" } ], "targetStates" : [ { "rawName" : "States.REGION1_STATE2", - "fullIdentifier" : "States.REGION1_STATE2" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE2" } ], "event" : { "rawName" : "Events.R1_NEXT", - "fullIdentifier" : "Events.R1_NEXT" + "fullIdentifier" : "ForkJoinStateMachineConfig.Events.R1_NEXT" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.REGION2_STATE1", - "fullIdentifier" : "States.REGION2_STATE1" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE1" } ], "targetStates" : [ { "rawName" : "States.REGION2_STATE2", - "fullIdentifier" : "States.REGION2_STATE2" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE2" } ], "event" : { "rawName" : "Events.R2_NEXT", - "fullIdentifier" : "Events.R2_NEXT" + "fullIdentifier" : "ForkJoinStateMachineConfig.Events.R2_NEXT" }, "guards" : [ ], "actions" : [ ], @@ -84,14 +84,14 @@ "type" : "JOIN", "sourceStates" : [ { "rawName" : "States.REGION1_STATE2", - "fullIdentifier" : "States.REGION1_STATE2" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE2" }, { "rawName" : "States.REGION2_STATE2", - "fullIdentifier" : "States.REGION2_STATE2" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE2" } ], "targetStates" : [ { "rawName" : "States.JOIN", - "fullIdentifier" : "States.JOIN" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.JOIN" } ], "event" : null, "guards" : [ ], @@ -101,19 +101,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.JOIN", - "fullIdentifier" : "States.JOIN" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.JOIN" } ], "targetStates" : [ { "rawName" : "States.END", - "fullIdentifier" : "States.END" + "fullIdentifier" : "ForkJoinStateMachineConfig.States.END" } ], "event" : { "rawName" : "Events.TO_END", - "fullIdentifier" : "Events.TO_END" + "fullIdentifier" : "ForkJoinStateMachineConfig.Events.TO_END" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.END" ] + "endStates" : [ "ForkJoinStateMachineConfig.States.END" ] } diff --git a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.png index 2118dfc..1aba880 100644 Binary files a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.puml index 5c5838c..0bf86f7 100644 --- a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.START +[*] --> ForkJoinStateMachineConfig.States.START States.START -[#1E90FF,bold]-> States.FORK <> : Events.TO_FORK @@ -33,6 +33,6 @@ States.REGION1_STATE2 -[#8A2BE2,bold]-> States.JOIN <> States.REGION2_STATE2 -[#8A2BE2,bold]-> States.JOIN <> States.JOIN -[#1E90FF,bold]-> States.END <> : Events.TO_END -States.END --> [*] +ForkJoinStateMachineConfig.States.END --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.scxml.xml index 9da75c6..b318734 100644 --- a/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/ForkJoinStateMachineConfig/ForkJoinStateMachineConfig.scxml.xml @@ -24,5 +24,9 @@ + + + + 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 e649142..d6092cf 100644 --- a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G1StateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -271,11 +271,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX" } ], "event" : null, "guards" : [ { @@ -292,11 +292,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -306,11 +306,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : null, "guards" : [ { @@ -327,11 +327,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : null, "guards" : [ { @@ -348,11 +348,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -362,11 +362,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : null, "guards" : [ { @@ -383,11 +383,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -397,15 +397,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2" } ], "event" : { "rawName" : "Events.EVENT_1_2", - "fullIdentifier" : "Events.EVENT_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2" }, "guards" : [ ], "actions" : [ ], @@ -414,15 +414,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_3", - "fullIdentifier" : "States.STATE_EXTRA_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3" } ], "event" : { "rawName" : "Events.EVENT_1_2", - "fullIdentifier" : "Events.EVENT_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2" }, "guards" : [ ], "actions" : [ ], @@ -431,19 +431,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_3", - "fullIdentifier" : "States.STATE_EXTRA_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.png index 186f510..6485c99 100644 Binary files a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.puml index 60f2648..0ce5596 100644 --- a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1 state States.STATEY <> state States.STATE9 <> @@ -53,6 +53,6 @@ States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <> : Events.EVENT States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <> : Events.EVENT_1_2 States.STATE_EXTRA_3 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.scxml.xml index ecf7ddc..c8438f5 100644 --- a/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/G1StateMachineConfiguration/G1StateMachineConfiguration.scxml.xml @@ -71,5 +71,9 @@ + + + + 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 732ac00..eff78ed 100644 --- a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G2StateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -271,11 +271,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX" } ], "event" : null, "guards" : [ { @@ -292,11 +292,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -306,11 +306,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "event" : null, "guards" : [ { @@ -327,11 +327,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7" } ], "event" : null, "guards" : [ { @@ -348,11 +348,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -362,11 +362,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9" } ], "event" : null, "guards" : [ { @@ -383,11 +383,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -397,15 +397,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENT_1_2", - "fullIdentifier" : "Events.EVENT_1_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2" }, "guards" : [ ], "actions" : [ ], @@ -414,15 +414,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2" } ], "event" : { "rawName" : "Events.EVENT_1_3", - "fullIdentifier" : "Events.EVENT_1_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_3" }, "guards" : [ ], "actions" : [ ], @@ -431,15 +431,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -448,19 +448,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.png index 122df2e..afc9eb8 100644 Binary files a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.puml index 25ef4aa..903db0f 100644 --- a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1 state States.STATEY <> state States.STATE9 <> @@ -54,6 +54,6 @@ States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <> : Event States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.scxml.xml index d206b3c..63396e5 100644 --- a/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/G2StateMachineConfiguration/G2StateMachineConfiguration.scxml.xml @@ -72,5 +72,9 @@ + + + + diff --git a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.dot b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.dot index afbcb96..b1d2798 100644 --- a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.dot +++ b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.dot @@ -6,6 +6,6 @@ digraph statemachine { _start [shape=circle, label="", fillcolor=black, width=0.1]; _start -> START; WORKING [fillcolor=lightgray]; - START -> WORKING [label="INHERITED_SUBMIT", style="solid", color="black"]; + START -> WORKING [label="String.INHERITED_SUBMIT", style="solid", color="black"]; } 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 58748dd..3eb30b3 100644 --- a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.json @@ -1,113 +1,32 @@ { "metadata" : { - "triggers" : [ { - "event" : "INHERITED_SUBMIT", - "className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl", - "methodName" : "doProcess", - "sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 15, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - } ], + "triggers" : [ ], "entryPoints" : [ ], - "callChains" : [ { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/v2/orders/submit", - "className" : "click.kamil.examples.statemachine.inheritance.api.OrderApi", - "methodName" : "submitOrder", - "sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/api/OrderApi.java", - "metadata" : { - "path" : "/api/v2/orders/submit", - "verb" : "POST" - }, - "parameters" : [ ] - }, - "methodChain" : [ "click.kamil.examples.statemachine.inheritance.api.OrderApi.submitOrder", "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl.submitOrder", "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl.doProcess" ], - "triggerPoint" : { - "event" : "INHERITED_SUBMIT", - "className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl", - "methodName" : "doProcess", - "sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 15, - "polymorphicEvents" : [ "INHERITED_SUBMIT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "START", - "targetState" : "WORKING", - "event" : "INHERITED_SUBMIT" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/v2/orders/submit", - "className" : "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl", - "methodName" : "submitOrder", - "sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/api/OrderControllerImpl.java", - "metadata" : { - "path" : "/api/v2/orders/submit", - "verb" : "POST" - }, - "parameters" : [ ] - }, - "methodChain" : [ "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl.submitOrder", "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl.doProcess" ], - "triggerPoint" : { - "event" : "INHERITED_SUBMIT", - "className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl", - "methodName" : "doProcess", - "sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 15, - "polymorphicEvents" : [ "INHERITED_SUBMIT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "START", - "targetState" : "WORKING", - "event" : "INHERITED_SUBMIT" - } ] - } ], + "callChains" : [ ], "properties" : { "default" : { } } }, "name" : "click.kamil.examples.statemachine.inheritance.config.InheritanceStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "START" ], + "startStates" : [ "String.START" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"START\"", - "fullIdentifier" : "START" + "fullIdentifier" : "String.START" } ], "targetStates" : [ { "rawName" : "\"WORKING\"", - "fullIdentifier" : "WORKING" + "fullIdentifier" : "String.WORKING" } ], "event" : { "rawName" : "\"INHERITED_SUBMIT\"", - "fullIdentifier" : "INHERITED_SUBMIT" + "fullIdentifier" : "String.INHERITED_SUBMIT" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "WORKING" ] + "endStates" : [ "String.WORKING" ] } diff --git a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.png b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.png index 93d0cef..82f2c00 100644 Binary files a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.png and b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.png differ diff --git a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.puml index beeb601..0da045d 100644 --- a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.puml @@ -21,11 +21,11 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> START +[*] --> String.START -START -[#1E90FF,bold]-> WORKING <> : INHERITED_SUBMIT +String.START -[#1E90FF,bold]-> String.WORKING <> : String.INHERITED_SUBMIT -WORKING --> [*] +String.WORKING --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.scxml.xml index 3f7965e..3f43942 100644 --- a/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/InheritanceStateMachineConfig/InheritanceStateMachineConfig.scxml.xml @@ -1,7 +1,7 @@ - + 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 9c4a014..eb64a1b 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderStates.SUBMITTED" ], + "startStates" : [ "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID" } ], "event" : { "rawName" : "OrderEvents.PAY", - "fullIdentifier" : "OrderEvents.PAY" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.PAY" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.FULFILLED", - "fullIdentifier" : "OrderStates.FULFILLED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED" } ], "event" : { "rawName" : "OrderEvents.FULFILL", - "fullIdentifier" : "OrderEvents.FULFILL" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.FULFILL" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "OrderEvents.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.CANCEL" }, "guards" : [ { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", @@ -74,15 +74,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "OrderEvents.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -91,12 +91,12 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" } ], "targetStates" : [ ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ ], @@ -105,15 +105,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1" } ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ ], @@ -122,11 +122,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2" } ], "event" : null, "guards" : [ { @@ -143,11 +143,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID3", - "fullIdentifier" : "OrderStates.PAID3" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID3" } ], "event" : null, "guards" : [ { @@ -164,11 +164,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1" } ], "targetStates" : [ { "rawName" : "OrderStates.HAPPEN", - "fullIdentifier" : "OrderStates.HAPPEN" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.HAPPEN" } ], "event" : null, "guards" : [ { @@ -185,11 +185,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED" } ], "event" : null, "guards" : [ ], @@ -199,11 +199,11 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED" } ], "event" : null, "guards" : [ ], @@ -213,11 +213,11 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID3", - "fullIdentifier" : "OrderStates.PAID3" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID3" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED" } ], "event" : null, "guards" : [ ], @@ -227,12 +227,12 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2" } ], "targetStates" : [ ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ { @@ -252,5 +252,5 @@ } ], "order" : null } ], - "endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] + "endStates" : [ "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED", "click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png index ce4c122..0acb1a6 100644 Binary files a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml index f4b8506..f224976 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderStates.SUBMITTED +[*] --> click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED state OrderStates.PAID1 <> @@ -39,7 +39,7 @@ OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <> : OrderEvents.ABCD / λ, action2 -OrderStates.CANCELED --> [*] -OrderStates.FULFILLED --> [*] +click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED --> [*] +click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.scxml.xml index 6b8dcf8..4c885ab 100644 --- a/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/KamilEnumStateMachineConfiguration/KamilEnumStateMachineConfiguration.scxml.xml @@ -37,5 +37,11 @@ + + + + + + diff --git a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.dot b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.dot index 7d2484a..bf85fa5 100644 --- a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.dot +++ b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.dot @@ -6,7 +6,7 @@ digraph statemachine { _start [shape=circle, label="", fillcolor=black, width=0.1]; _start -> INIT; DONE [fillcolor=lightgray]; - INIT -> BUSY [label="SUBMIT / loggingAction()", style="solid", color="black"]; - BUSY -> DONE [label="ORDER_EVENT", style="solid", color="black"]; + INIT -> BUSY [label="String.SUBMIT / loggingAction()", style="solid", color="black"]; + BUSY -> DONE [label="String.ORDER_EVENT", style="solid", color="black"]; } 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 dc6206c..003cc86 100644 --- a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json +++ b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.json @@ -2,141 +2,27 @@ "metadata" : { "triggers" : [ ], "entryPoints" : [ ], - "callChains" : [ { - "entryPoint" : { - "type" : "REST", - "name" : "POST /maven/orders/submit", - "className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java", - "metadata" : { - "path" : "/maven/orders/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ "RequestBody" ] - } ] - }, - "methodChain" : [ "click.kamil.maven.core.MavenOrderStateMachine.OrderController.submitOrder" ], - "triggerPoint" : { - "event" : "SUBMIT", - "className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 40, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "INIT", - "targetState" : "BUSY", - "event" : "SUBMIT" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /maven/orders/submit", - "className" : "click.kamil.maven.api.MavenOrderApi", - "methodName" : "submitOrder", - "sourceFile" : "api-module/src/main/java/click/kamil/maven/api/MavenOrderApi.java", - "metadata" : { - "path" : "/maven/orders/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ "RequestBody" ] - } ] - }, - "methodChain" : [ "click.kamil.maven.api.MavenOrderApi.submitOrder", "click.kamil.maven.core.MavenOrderStateMachine.OrderController.submitOrder" ], - "triggerPoint" : { - "event" : "SUBMIT", - "className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 40, - "polymorphicEvents" : [ "SUBMIT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "INIT", - "targetState" : "BUSY", - "event" : "SUBMIT" - } ] - }, { - "entryPoint" : { - "type" : "JMS", - "name" : "JMS: order.queue", - "className" : "click.kamil.maven.api.JmsOrderListener", - "methodName" : "onMessage", - "sourceFile" : "api-module/src/main/java/click/kamil/maven/api/JmsOrderListener.java", - "metadata" : { - "protocol" : "JMS", - "destination" : "order.queue" - }, - "parameters" : [ { - "name" : "message", - "type" : "String", - "annotations" : [ ] - } ] - }, - "methodChain" : [ "click.kamil.maven.api.JmsOrderListener.onMessage", "click.kamil.maven.core.MavenOrderStateMachine.OrderService.onMessage" ], - "triggerPoint" : { - "event" : "ORDER_EVENT", - "className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderService", - "methodName" : "onMessage", - "sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 52, - "polymorphicEvents" : [ "ORDER_EVENT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "BUSY", - "targetState" : "DONE", - "event" : "ORDER_EVENT" - } ] - } ], + "callChains" : [ ], "properties" : { "default" : { } } }, "name" : "click.kamil.maven.core.MavenOrderStateMachine", "renderChoicesAsDiamonds" : true, - "startStates" : [ "INIT" ], + "startStates" : [ "String.INIT" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"INIT\"", - "fullIdentifier" : "INIT" + "fullIdentifier" : "String.INIT" } ], "targetStates" : [ { "rawName" : "\"BUSY\"", - "fullIdentifier" : "BUSY" + "fullIdentifier" : "String.BUSY" } ], "event" : { "rawName" : "\"SUBMIT\"", - "fullIdentifier" : "SUBMIT" + "fullIdentifier" : "String.SUBMIT" }, "guards" : [ ], "actions" : [ { @@ -152,19 +38,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"BUSY\"", - "fullIdentifier" : "BUSY" + "fullIdentifier" : "String.BUSY" } ], "targetStates" : [ { "rawName" : "\"DONE\"", - "fullIdentifier" : "DONE" + "fullIdentifier" : "String.DONE" } ], "event" : { "rawName" : "\"ORDER_EVENT\"", - "fullIdentifier" : "ORDER_EVENT" + "fullIdentifier" : "String.ORDER_EVENT" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "DONE" ] + "endStates" : [ "String.DONE" ] } diff --git a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.puml b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.puml index 465e876..400c2cf 100644 --- a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.puml +++ b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.puml @@ -21,12 +21,12 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> INIT +[*] --> String.INIT -INIT -[#1E90FF,bold]-> BUSY <> : SUBMIT / loggingAction() -BUSY -[#1E90FF,bold]-> DONE <> : ORDER_EVENT +String.INIT -[#1E90FF,bold]-> String.BUSY <> : String.SUBMIT / loggingAction() +String.BUSY -[#1E90FF,bold]-> String.DONE <> : String.ORDER_EVENT -DONE --> [*] +String.DONE --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.scxml.xml b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.scxml.xml index e09c93e..7af610b 100644 --- a/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/MavenOrderStateMachine/MavenOrderStateMachine.scxml.xml @@ -1,10 +1,10 @@ - + - + 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 b6837c4..9838938 100644 --- a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritancestate.OneStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritancestate.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,15 +271,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -288,11 +288,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEX" } ], "event" : null, "guards" : [ { @@ -309,11 +309,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -323,11 +323,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17" } ], "event" : null, "guards" : [ { @@ -344,11 +344,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18" } ], "event" : null, "guards" : [ { @@ -365,11 +365,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -379,11 +379,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20" } ], "event" : null, "guards" : [ { @@ -400,11 +400,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -414,11 +414,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19" } ], "event" : null, "guards" : [ { @@ -435,11 +435,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -449,11 +449,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1" } ], "event" : null, "guards" : [ { @@ -470,11 +470,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -484,11 +484,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5" } ], "event" : null, "guards" : [ { @@ -505,11 +505,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -519,11 +519,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13" } ], "event" : null, "guards" : [ { @@ -540,11 +540,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14" } ], "event" : null, "guards" : [ { @@ -561,11 +561,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -575,11 +575,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10" } ], "event" : null, "guards" : [ { @@ -596,11 +596,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -610,11 +610,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12" } ], "event" : null, "guards" : [ { @@ -631,11 +631,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -645,11 +645,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8" } ], "event" : null, "guards" : [ { @@ -666,11 +666,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7" } ], "event" : null, "guards" : [ { @@ -687,11 +687,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -701,11 +701,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9" } ], "event" : null, "guards" : [ { @@ -722,11 +722,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -736,19 +736,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENTX", - "fullIdentifier" : "Events.EVENTX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENTX" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritancestate.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.png index b749fe7..1bc2205 100644 Binary files a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.puml index 7e16fb0..1a4633f 100644 --- a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritancestate.States.STATE1 state States.STATEY <> state States.STATE16 <> @@ -78,6 +78,6 @@ States.STATE8 -[#FF6347,bold]-> States.STATE9 <> : [guardVarEquals( States.STATE8 -[#FF6347,bold]-> States.STATE10 <> : (order=1) States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <> : Events.EVENTX -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritancestate.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.scxml.xml index ce49605..0e86c38 100644 --- a/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/OneStateMachineConfiguration/OneStateMachineConfiguration.scxml.xml @@ -140,5 +140,9 @@ + + + + diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.dot b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.dot index b515a49..24804a8 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.dot +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.dot @@ -6,7 +6,7 @@ digraph statemachine { _start [shape=circle, label="", fillcolor=black, width=0.1]; _start -> NEW; COMPLETED [fillcolor=lightgray]; - NEW -> PROCESSING [label="SUBMIT / processAction()", style="solid", color="black"]; - PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; + NEW -> PROCESSING [label="String.SUBMIT / processAction()", style="solid", color="black"]; + PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"]; } 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 ad9787c..89064aa 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.json @@ -1,19 +1,6 @@ { "metadata" : { - "triggers" : [ { - "event" : "SUBMIT", - "className" : "click.kamil.multi.core.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 18, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - } ], + "triggers" : [ ], "entryPoints" : [ { "type" : "REST", "name" : "POST /orders/submit", @@ -45,103 +32,27 @@ "annotations" : [ "RequestBody" ] } ] } ], - "callChains" : [ { - "entryPoint" : { - "type" : "REST", - "name" : "POST /orders/submit", - "className" : "click.kamil.multi.core.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java", - "metadata" : { - "path" : "/orders/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ "RequestBody" ] - } ] - }, - "methodChain" : [ "click.kamil.multi.core.OrderController.submitOrder" ], - "triggerPoint" : { - "event" : "SUBMIT", - "className" : "click.kamil.multi.core.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 18, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "NEW", - "targetState" : "PROCESSING", - "event" : "SUBMIT" - } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /orders/submit", - "className" : "click.kamil.multi.api.OrderApi", - "methodName" : "submitOrder", - "sourceFile" : "api-module/src/main/java/click/kamil/multi/api/OrderApi.java", - "metadata" : { - "path" : "/orders/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "orderId", - "type" : "String", - "annotations" : [ "RequestBody" ] - } ] - }, - "methodChain" : [ "click.kamil.multi.api.OrderApi.submitOrder", "click.kamil.multi.core.OrderController.submitOrder" ], - "triggerPoint" : { - "event" : "SUBMIT", - "className" : "click.kamil.multi.core.OrderController", - "methodName" : "submitOrder", - "sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 18, - "polymorphicEvents" : [ "SUBMIT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : [ { - "sourceState" : "NEW", - "targetState" : "PROCESSING", - "event" : "SUBMIT" - } ] - } ], + "callChains" : [ ], "properties" : { "default" : { } } }, "name" : "click.kamil.multi.core.OrderStateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "NEW" ], + "startStates" : [ "String.NEW" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"NEW\"", - "fullIdentifier" : "NEW" + "fullIdentifier" : "String.NEW" } ], "targetStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "event" : { "rawName" : "\"SUBMIT\"", - "fullIdentifier" : "SUBMIT" + "fullIdentifier" : "String.SUBMIT" }, "guards" : [ ], "actions" : [ { @@ -157,19 +68,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "\"PROCESSING\"", - "fullIdentifier" : "PROCESSING" + "fullIdentifier" : "String.PROCESSING" } ], "targetStates" : [ { "rawName" : "\"COMPLETED\"", - "fullIdentifier" : "COMPLETED" + "fullIdentifier" : "String.COMPLETED" } ], "event" : { "rawName" : "\"FINISH\"", - "fullIdentifier" : "FINISH" + "fullIdentifier" : "String.FINISH" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "COMPLETED" ] + "endStates" : [ "String.COMPLETED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.puml index 14ac988..634f286 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.puml @@ -21,12 +21,12 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> NEW +[*] --> String.NEW -NEW -[#1E90FF,bold]-> PROCESSING <> : SUBMIT / processAction() -PROCESSING -[#1E90FF,bold]-> COMPLETED <> : FINISH +String.NEW -[#1E90FF,bold]-> String.PROCESSING <> : String.SUBMIT / processAction() +String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <> : String.FINISH -COMPLETED --> [*] +String.COMPLETED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.scxml.xml index 6549088..67d968a 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfig/OrderStateMachineConfig.scxml.xml @@ -1,10 +1,10 @@ - + - + diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.json index c15f9e5..2d351b6 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.json @@ -1,7 +1,7 @@ { "metadata" : { "triggers" : [ { - "event" : "OrderEvent.PAY", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY", "className" : "click.kamil.enterprise.web.StateMachineDispatcher", "methodName" : "payOrder", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", @@ -14,7 +14,7 @@ "constraint" : null, "ambiguous" : false }, { - "event" : "OrderEvent.SHIP", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP", "className" : "click.kamil.enterprise.web.StateMachineDispatcher", "methodName" : "shipOrder", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", @@ -26,71 +26,6 @@ "external" : false, "constraint" : null, "ambiguous" : false - }, { - "event" : "DocumentEvent.SUBMIT", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "submitDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 44, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "DocumentEvent.APPROVE", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "approveDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 51, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "DocumentEvent.REJECT", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "rejectDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 58, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "UserEvent.VERIFY", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "verifyUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 65, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false - }, { - "event" : "UserEvent.SUSPEND", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "suspendUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 72, - "polymorphicEvents" : null, - "external" : false, - "constraint" : null, - "ambiguous" : false }, { "event" : "event", "className" : "click.kamil.enterprise.web.StateMachineDispatcher", @@ -98,145 +33,14 @@ "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceModule" : null, "stateMachineId" : null, - "sourceState" : "ORDER", + "sourceState" : "click.kamil.enterprise.machines.order.OrderState.ORDER", "lineNumber" : 81, "polymorphicEvents" : null, "external" : false, "constraint" : "\"ORDER\".equalsIgnoreCase(machineType)", "ambiguous" : false - }, { - "event" : "event", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "dispatch", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : "DOCUMENT", - "lineNumber" : 87, - "polymorphicEvents" : null, - "external" : false, - "constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)", - "ambiguous" : false - }, { - "event" : "event", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "dispatch", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : "USER", - "lineNumber" : 93, - "polymorphicEvents" : null, - "external" : false, - "constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)", - "ambiguous" : false } ], "entryPoints" : [ { - "type" : "REST", - "name" : "POST /api/machine/order/pay", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "payOrder", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/order/pay", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/order/ship", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "shipOrder", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/order/ship", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/document/submit", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "submitDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/document/approve", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "approveDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/approve", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/document/reject", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "rejectDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/reject", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/user/verify", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "verifyUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/user/verify", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { - "type" : "REST", - "name" : "POST /api/machine/user/suspend", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "suspendUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/user/suspend", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, { "type" : "REST", "name" : "POST /api/machine/{machineType}/transition/{event}", "className" : "click.kamil.enterprise.web.StateMachineController", @@ -279,7 +83,7 @@ }, "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ], "triggerPoint" : { - "event" : "OrderEvent.PAY", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY", "className" : "click.kamil.enterprise.web.StateMachineDispatcher", "methodName" : "payOrder", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", @@ -287,16 +91,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 30, - "polymorphicEvents" : [ "OrderEvent.PAY" ], + "polymorphicEvents" : [ "click.kamil.enterprise.machines.order.OrderEvent.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PENDING", - "event" : "OrderEvent.PAY" + "sourceState" : "click.kamil.enterprise.machines.order.OrderState.NEW", + "targetState" : "click.kamil.enterprise.machines.order.OrderState.PENDING", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY" } ] }, { "entryPoint" : { @@ -317,7 +121,7 @@ }, "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ], "triggerPoint" : { - "event" : "OrderEvent.SHIP", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP", "className" : "click.kamil.enterprise.web.StateMachineDispatcher", "methodName" : "shipOrder", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", @@ -325,187 +129,17 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 37, - "polymorphicEvents" : [ "OrderEvent.SHIP" ], + "polymorphicEvents" : [ "click.kamil.enterprise.machines.order.OrderEvent.SHIP" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PENDING", - "targetState" : "OrderState.SHIPPED", - "event" : "OrderEvent.SHIP" + "sourceState" : "click.kamil.enterprise.machines.order.OrderState.PENDING", + "targetState" : "click.kamil.enterprise.machines.order.OrderState.SHIPPED", + "event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP" } ] - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/document/submit", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "submitDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/submit", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.submitDocument", "click.kamil.enterprise.web.StateMachineDispatcher.submitDocument" ], - "triggerPoint" : { - "event" : "DocumentEvent.SUBMIT", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "submitDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 44, - "polymorphicEvents" : [ "DocumentEvent.SUBMIT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/document/approve", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "approveDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/approve", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.approveDocument", "click.kamil.enterprise.web.StateMachineDispatcher.approveDocument" ], - "triggerPoint" : { - "event" : "DocumentEvent.APPROVE", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "approveDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 51, - "polymorphicEvents" : [ "DocumentEvent.APPROVE" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/document/reject", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "rejectDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/document/reject", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.rejectDocument", "click.kamil.enterprise.web.StateMachineDispatcher.rejectDocument" ], - "triggerPoint" : { - "event" : "DocumentEvent.REJECT", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "rejectDocument", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 58, - "polymorphicEvents" : [ "DocumentEvent.REJECT" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/user/verify", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "verifyUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/user/verify", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.verifyUser", "click.kamil.enterprise.web.StateMachineDispatcher.verifyUser" ], - "triggerPoint" : { - "event" : "UserEvent.VERIFY", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "verifyUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 65, - "polymorphicEvents" : [ "UserEvent.VERIFY" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/user/suspend", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "suspendUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/user/suspend", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.suspendUser", "click.kamil.enterprise.web.StateMachineDispatcher.suspendUser" ], - "triggerPoint" : { - "event" : "UserEvent.SUSPEND", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "suspendUser", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : null, - "lineNumber" : 72, - "polymorphicEvents" : [ "UserEvent.SUSPEND" ], - "external" : false, - "constraint" : null, - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null }, { "entryPoint" : { "type" : "REST", @@ -539,7 +173,7 @@ "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceModule" : null, "stateMachineId" : null, - "sourceState" : "ORDER", + "sourceState" : "click.kamil.enterprise.machines.order.OrderState.ORDER", "lineNumber" : 81, "polymorphicEvents" : [ "", "", "" ], "external" : true, @@ -548,90 +182,6 @@ }, "contextMachineId" : null, "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/{machineType}/transition/{event}", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "transition", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/{machineType}/transition/{event}", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "machineType", - "type" : "String", - "annotations" : [ "PathVariable" ] - }, { - "name" : "event", - "type" : "String", - "annotations" : [ "PathVariable" ] - }, { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.transition", "click.kamil.enterprise.web.StateMachineDispatcher.dispatch" ], - "triggerPoint" : { - "event" : "true ? OrderEvent.valueOf(eventString.toUpperCase()) : true ? DocumentEvent.valueOf(eventString.toUpperCase()) : UserEvent.valueOf(eventString.toUpperCase())", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "dispatch", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : "DOCUMENT", - "lineNumber" : 87, - "polymorphicEvents" : [ "", "", "" ], - "external" : true, - "constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)", - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null - }, { - "entryPoint" : { - "type" : "REST", - "name" : "POST /api/machine/{machineType}/transition/{event}", - "className" : "click.kamil.enterprise.web.StateMachineController", - "methodName" : "transition", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java", - "metadata" : { - "path" : "/api/machine/{machineType}/transition/{event}", - "verb" : "POST" - }, - "parameters" : [ { - "name" : "machineType", - "type" : "String", - "annotations" : [ "PathVariable" ] - }, { - "name" : "event", - "type" : "String", - "annotations" : [ "PathVariable" ] - }, { - "name" : "userId", - "type" : "String", - "annotations" : [ "RequestParam" ] - } ] - }, - "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.transition", "click.kamil.enterprise.web.StateMachineDispatcher.dispatch" ], - "triggerPoint" : { - "event" : "true ? OrderEvent.valueOf(eventString.toUpperCase()) : true ? DocumentEvent.valueOf(eventString.toUpperCase()) : UserEvent.valueOf(eventString.toUpperCase())", - "className" : "click.kamil.enterprise.web.StateMachineDispatcher", - "methodName" : "dispatch", - "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", - "sourceModule" : null, - "stateMachineId" : null, - "sourceState" : "USER", - "lineNumber" : 93, - "polymorphicEvents" : [ "", "", "" ], - "external" : true, - "constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)", - "ambiguous" : false - }, - "contextMachineId" : null, - "matchedTransitions" : null } ], "properties" : { "default" : { } @@ -639,20 +189,20 @@ }, "name" : "click.kamil.enterprise.machines.order.OrderStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderState.NEW" ], + "startStates" : [ "click.kamil.enterprise.machines.order.OrderState.NEW" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.NEW", - "fullIdentifier" : "OrderState.NEW" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.NEW" } ], "targetStates" : [ { "rawName" : "OrderState.PENDING", - "fullIdentifier" : "OrderState.PENDING" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.PENDING" } ], "event" : { "rawName" : "OrderEvent.PAY", - "fullIdentifier" : "OrderEvent.PAY" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderEvent.PAY" }, "guards" : [ ], "actions" : [ { @@ -668,19 +218,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.PENDING", - "fullIdentifier" : "OrderState.PENDING" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.PENDING" } ], "targetStates" : [ { "rawName" : "OrderState.SHIPPED", - "fullIdentifier" : "OrderState.SHIPPED" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.SHIPPED" } ], "event" : { "rawName" : "OrderEvent.SHIP", - "fullIdentifier" : "OrderEvent.SHIP" + "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "OrderState.SHIPPED" ] + "endStates" : [ "click.kamil.enterprise.machines.order.OrderState.SHIPPED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.puml index 97bbeb3..e3e9cfc 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.puml @@ -21,12 +21,12 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderState.NEW +[*] --> click.kamil.enterprise.machines.order.OrderState.NEW OrderState.NEW -[#1E90FF,bold]-> OrderState.PENDING <> : OrderEvent.PAY / λ OrderState.PENDING -[#1E90FF,bold]-> OrderState.SHIPPED <> : OrderEvent.SHIP -OrderState.SHIPPED --> [*] +click.kamil.enterprise.machines.order.OrderState.SHIPPED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.scxml.xml index e05c8a3..595297f 100644 --- a/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/OrderStateMachineConfiguration/OrderStateMachineConfiguration.scxml.xml @@ -8,5 +8,9 @@ + + + + diff --git a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.json index 1aa2397..a0d2639 100644 --- a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.json @@ -200,16 +200,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" } ] }, { "entryPoint" : { @@ -234,16 +234,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.FULFILL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.PAID", - "targetState" : "OrderStates.FULFILLED", - "event" : "OrderEvents.FULFILL" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" } ] }, { "entryPoint" : { @@ -268,16 +268,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.CANCELED", - "event" : "OrderEvents.CANCEL" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" } ] }, { "entryPoint" : { @@ -302,16 +302,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 17, - "polymorphicEvents" : [ "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" } ] }, { "entryPoint" : { @@ -336,16 +336,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" } ] }, { "entryPoint" : { @@ -370,16 +370,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" } ] }, { "entryPoint" : { @@ -408,20 +408,20 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.PAY", "OrderEvents.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY", "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" }, { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.CANCELED", - "event" : "OrderEvents.CANCEL" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" } ] }, { "entryPoint" : { @@ -446,16 +446,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" } ] }, { "entryPoint" : { @@ -480,16 +480,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.FULFILL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.PAID", - "targetState" : "OrderStates.FULFILLED", - "event" : "OrderEvents.FULFILL" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" } ] }, { "entryPoint" : { @@ -514,16 +514,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 13, - "polymorphicEvents" : [ "OrderEvents.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.CANCELED", - "event" : "OrderEvents.CANCEL" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" } ] }, { "entryPoint" : { @@ -548,16 +548,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 21, - "polymorphicEvents" : [ "OrderEvents.ABCD" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.PAID", - "targetState" : "OrderStates.CANCELED", - "event" : "OrderEvents.ABCD" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD" } ] }, { "entryPoint" : { @@ -582,20 +582,20 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 21, - "polymorphicEvents" : [ "OrderEvents.ABCD", "OrderEvents.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD", "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderStates.SUBMITTED", - "targetState" : "OrderStates.PAID", - "event" : "OrderEvents.PAY" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" }, { - "sourceState" : "OrderStates.PAID", - "targetState" : "OrderStates.CANCELED", - "event" : "OrderEvents.ABCD" + "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID", + "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", + "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD" } ] } ], "properties" : { @@ -606,20 +606,20 @@ }, "name" : "click.kamil.examples.statemachine.polymorphic.PolymorphicStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderStates.SUBMITTED" ], + "startStates" : [ "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID" } ], "event" : { "rawName" : "OrderEvents.PAY", - "fullIdentifier" : "OrderEvents.PAY" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" }, "guards" : [ ], "actions" : [ ], @@ -628,15 +628,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.FULFILLED", - "fullIdentifier" : "OrderStates.FULFILLED" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED" } ], "event" : { "rawName" : "OrderEvents.FULFILL", - "fullIdentifier" : "OrderEvents.FULFILL" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" }, "guards" : [ ], "actions" : [ ], @@ -645,15 +645,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "OrderEvents.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -662,19 +662,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] + "endStates" : [ "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.puml index 8fae88b..d2ccdae 100644 --- a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderStates.SUBMITTED +[*] --> click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <> : OrderEvents.PAY @@ -29,7 +29,7 @@ OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <> : OrderEve OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <> : OrderEvents.CANCEL OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <> : OrderEvents.ABCD -OrderStates.CANCELED --> [*] -OrderStates.FULFILLED --> [*] +click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED --> [*] +click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.scxml.xml index 1e13798..119b96c 100644 --- a/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/PolymorphicStateMachineConfiguration/PolymorphicStateMachineConfiguration.scxml.xml @@ -12,5 +12,11 @@ + + + + + + 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 5cbf91a..976f43c 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderStates.SUBMITTED" ], + "startStates" : [ "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "event" : { "rawName" : "OrderEvents.PAY", - "fullIdentifier" : "OrderEvents.PAY" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.PAY" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.FULFILLED", - "fullIdentifier" : "OrderStates.FULFILLED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.FULFILLED" } ], "event" : { "rawName" : "OrderEvents.FULFILL", - "fullIdentifier" : "OrderEvents.FULFILL" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.FULFILL" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "OrderEvents.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.CANCEL" }, "guards" : [ { "expression" : "new Guard(){\n @Override public boolean evaluate( StateContext context){\n return false;\n }\n}\n", @@ -74,15 +74,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED" } ], "event" : { "rawName" : "OrderEvents.CANCEL", - "fullIdentifier" : "OrderEvents.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -91,12 +91,12 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" } ], "targetStates" : [ ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ ], @@ -105,11 +105,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2" } ], "event" : null, "guards" : [ { @@ -126,11 +126,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.SUBMITTED", - "fullIdentifier" : "OrderStates.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID3", - "fullIdentifier" : "OrderStates.PAID3" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3" } ], "event" : null, "guards" : [ ], @@ -140,11 +140,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID1" } ], "event" : null, "guards" : [ { @@ -161,11 +161,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2" } ], "event" : null, "guards" : [ { @@ -182,11 +182,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.HAPPEN", - "fullIdentifier" : "OrderStates.HAPPEN" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.HAPPEN" } ], "event" : null, "guards" : [ { @@ -203,11 +203,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "OrderStates.PAID", - "fullIdentifier" : "OrderStates.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID" } ], "targetStates" : [ { "rawName" : "OrderStates.PAID3", - "fullIdentifier" : "OrderStates.PAID3" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3" } ], "event" : null, "guards" : [ ], @@ -217,11 +217,11 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID2", - "fullIdentifier" : "OrderStates.PAID2" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED" } ], "event" : null, "guards" : [ ], @@ -231,11 +231,11 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID3", - "fullIdentifier" : "OrderStates.PAID3" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3" } ], "targetStates" : [ { "rawName" : "OrderStates.CANCELED", - "fullIdentifier" : "OrderStates.CANCELED" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED" } ], "event" : null, "guards" : [ ], @@ -245,12 +245,12 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderStates.PAID1", - "fullIdentifier" : "OrderStates.PAID1" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID1" } ], "targetStates" : [ ], "event" : { "rawName" : "OrderEvents.ABCD", - "fullIdentifier" : "OrderEvents.ABCD" + "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.ABCD" }, "guards" : [ ], "actions" : [ { @@ -270,5 +270,5 @@ } ], "order" : null } ], - "endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] + "endStates" : [ "click.kamil.examples.statemachine.simple.OrderStates.CANCELED", "click.kamil.examples.statemachine.simple.OrderStates.FULFILLED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png index d57c055..4fcdd35 100644 Binary files a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml index 82cada7..fd5ca24 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderStates.SUBMITTED +[*] --> click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED state OrderStates.SUBMITTED <> state OrderStates.PAID <> @@ -41,7 +41,7 @@ OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <> OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <> : OrderEvents.ABCD / λ, action2 -OrderStates.CANCELED --> [*] -OrderStates.FULFILLED --> [*] +click.kamil.examples.statemachine.simple.OrderStates.CANCELED --> [*] +click.kamil.examples.statemachine.simple.OrderStates.FULFILLED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.scxml.xml index b05bfca..1e1240f 100644 --- a/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/SimpleEnumStateMachineConfiguration/SimpleEnumStateMachineConfiguration.scxml.xml @@ -42,5 +42,11 @@ + + + + + + diff --git a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.json index f80bf43..9b39659 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.json @@ -45,7 +45,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.DocumentController.submit", "click.kamil.examples.statemachine.layered.web.CommandGateway.submitDocument", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentSubmit", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.SUBMIT", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -53,16 +53,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.SUBMIT" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.DRAFT", - "targetState" : "DocumentState.SUBMITTED", - "event" : "DocumentTransitionEvent.SUBMIT" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" } ] }, { "entryPoint" : { @@ -79,7 +79,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.DocumentController.approve", "click.kamil.examples.statemachine.layered.web.CommandGateway.approveDocument", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentApprove", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.APPROVE", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -87,16 +87,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.APPROVE" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.SUBMITTED", - "targetState" : "DocumentState.APPROVED", - "event" : "DocumentTransitionEvent.APPROVE" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" } ] }, { "entryPoint" : { @@ -113,7 +113,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.DocumentController.reject", "click.kamil.examples.statemachine.layered.web.CommandGateway.rejectDocument", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentReject", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.REJECT", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -121,16 +121,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.REJECT" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.SUBMITTED", - "targetState" : "DocumentState.REJECTED", - "event" : "DocumentTransitionEvent.REJECT" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" } ] }, { "entryPoint" : { @@ -151,7 +151,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentSubmit", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.SUBMIT", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -159,16 +159,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.SUBMIT" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" ], "external" : false, "constraint" : "command == DOCUMENT_SUBMIT", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.DRAFT", - "targetState" : "DocumentState.SUBMITTED", - "event" : "DocumentTransitionEvent.SUBMIT" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" } ] }, { "entryPoint" : { @@ -189,7 +189,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentApprove", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.APPROVE", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -197,16 +197,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.APPROVE" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" ], "external" : false, "constraint" : "command == DOCUMENT_APPROVE", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.SUBMITTED", - "targetState" : "DocumentState.APPROVED", - "event" : "DocumentTransitionEvent.APPROVE" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" } ] }, { "entryPoint" : { @@ -227,7 +227,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.documentReject", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendDocumentEvent" ], "triggerPoint" : { - "event" : "DocumentTransitionEvent.REJECT", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendDocumentEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -235,16 +235,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 81, - "polymorphicEvents" : [ "DocumentTransitionEvent.REJECT" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" ], "external" : false, "constraint" : "command == DOCUMENT_REJECT", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "DocumentState.SUBMITTED", - "targetState" : "DocumentState.REJECTED", - "event" : "DocumentTransitionEvent.REJECT" + "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED", + "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED", + "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" } ] } ], "properties" : { @@ -253,20 +253,20 @@ }, "name" : "click.kamil.examples.statemachine.layered.document.config.StandardDocumentStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "DocumentState.DRAFT" ], + "startStates" : [ "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "DocumentState.DRAFT", - "fullIdentifier" : "DocumentState.DRAFT" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT" } ], "targetStates" : [ { "rawName" : "DocumentState.SUBMITTED", - "fullIdentifier" : "DocumentState.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED" } ], "event" : { "rawName" : "DocumentTransitionEvent.SUBMIT", - "fullIdentifier" : "DocumentTransitionEvent.SUBMIT" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" }, "guards" : [ ], "actions" : [ ], @@ -275,15 +275,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "DocumentState.SUBMITTED", - "fullIdentifier" : "DocumentState.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED" } ], "targetStates" : [ { "rawName" : "DocumentState.APPROVED", - "fullIdentifier" : "DocumentState.APPROVED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED" } ], "event" : { "rawName" : "DocumentTransitionEvent.APPROVE", - "fullIdentifier" : "DocumentTransitionEvent.APPROVE" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" }, "guards" : [ ], "actions" : [ ], @@ -292,19 +292,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "DocumentState.SUBMITTED", - "fullIdentifier" : "DocumentState.SUBMITTED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED" } ], "targetStates" : [ { "rawName" : "DocumentState.REJECTED", - "fullIdentifier" : "DocumentState.REJECTED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED" } ], "event" : { "rawName" : "DocumentTransitionEvent.REJECT", - "fullIdentifier" : "DocumentTransitionEvent.REJECT" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "DocumentState.REJECTED", "DocumentState.APPROVED" ] + "endStates" : [ "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED", "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.puml index b5b833a..dec2f30 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.puml @@ -21,14 +21,14 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> DocumentState.DRAFT +[*] --> click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT DocumentState.DRAFT -[#1E90FF,bold]-> DocumentState.SUBMITTED <> : DocumentTransitionEvent.SUBMIT DocumentState.SUBMITTED -[#1E90FF,bold]-> DocumentState.APPROVED <> : DocumentTransitionEvent.APPROVE DocumentState.SUBMITTED -[#1E90FF,bold]-> DocumentState.REJECTED <> : DocumentTransitionEvent.REJECT -DocumentState.REJECTED --> [*] -DocumentState.APPROVED --> [*] +click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED --> [*] +click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.scxml.xml index 8be6741..eaba648 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/StandardDocumentStateMachineConfiguration/StandardDocumentStateMachineConfiguration.scxml.xml @@ -11,5 +11,11 @@ + + + + + + diff --git a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.json b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.json index d206b2a..592b34a 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.json @@ -45,7 +45,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.OrderController.pay", "click.kamil.examples.statemachine.layered.web.CommandGateway.payOrder", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderPay", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.PAY", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -53,16 +53,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PAID", - "event" : "OrderTransitionEvent.PAY" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" } ] }, { "entryPoint" : { @@ -79,7 +79,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.OrderController.ship", "click.kamil.examples.statemachine.layered.web.CommandGateway.shipOrder", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderShip", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.SHIP", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -87,16 +87,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.SHIP" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.SHIPPED", - "event" : "OrderTransitionEvent.SHIP" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" } ] }, { "entryPoint" : { @@ -113,7 +113,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.OrderController.cancel", "click.kamil.examples.statemachine.layered.web.CommandGateway.cancelOrder", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderCancel", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.CANCEL", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -121,16 +121,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderTransitionEvent.CANCEL" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL" } ] }, { "entryPoint" : { @@ -147,7 +147,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.StringDispatchController.payWithStringKey", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderPay", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.PAY", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -155,16 +155,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" ], "external" : false, "constraint" : "command == ORDER_PAY", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PAID", - "event" : "OrderTransitionEvent.PAY" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" } ] }, { "entryPoint" : { @@ -181,7 +181,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.StringDispatchController.shipWithStringKey", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderShip", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.SHIP", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -189,16 +189,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.SHIP" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" ], "external" : false, "constraint" : "command == ORDER_SHIP", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.SHIPPED", - "event" : "OrderTransitionEvent.SHIP" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" } ] }, { "entryPoint" : { @@ -215,7 +215,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.RichOrderController.payViaRichEvent", "click.kamil.examples.statemachine.layered.web.CommandGateway.payOrderViaRichEvent", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderPayViaRichEvent", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.PAY", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -223,16 +223,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PAID", - "event" : "OrderTransitionEvent.PAY" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" } ] }, { "entryPoint" : { @@ -249,7 +249,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.RichOrderController.shipViaRichEvent", "click.kamil.examples.statemachine.layered.web.CommandGateway.shipOrderViaRichEvent", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderShipViaRichEvent", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.SHIP", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -257,16 +257,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.SHIP" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" ], "external" : false, "constraint" : null, "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.SHIPPED", - "event" : "OrderTransitionEvent.SHIP" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" } ] }, { "entryPoint" : { @@ -287,7 +287,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderPay", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.PAY", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -295,16 +295,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.PAY" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" ], "external" : false, "constraint" : "command == ORDER_PAY", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PAID", - "event" : "OrderTransitionEvent.PAY" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.NEW", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" } ] }, { "entryPoint" : { @@ -325,7 +325,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderShip", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.SHIP", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -333,16 +333,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.SHIP" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" ], "external" : false, "constraint" : "command == ORDER_SHIP", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.SHIPPED", - "event" : "OrderTransitionEvent.SHIP" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" } ] }, { "entryPoint" : { @@ -363,7 +363,7 @@ }, "methodChain" : [ "click.kamil.examples.statemachine.layered.web.GenericCommandController.execute", "click.kamil.examples.statemachine.layered.web.CommandGateway.executeViaMapper", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.dispatch", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.orderCancel", "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher.sendOrderEvent" ], "triggerPoint" : { - "event" : "OrderTransitionEvent.CANCEL", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "methodName" : "sendOrderEvent", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", @@ -371,16 +371,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 75, - "polymorphicEvents" : [ "OrderTransitionEvent.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL" ], "external" : false, "constraint" : "command == ORDER_CANCEL", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PAID", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderTransitionEvent.CANCEL" + "sourceState" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID", + "targetState" : "click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED", + "event" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL" } ] } ], "properties" : { @@ -389,20 +389,20 @@ }, "name" : "click.kamil.examples.statemachine.layered.order.config.StandardOrderStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderState.NEW" ], + "startStates" : [ "click.kamil.examples.statemachine.layered.order.OrderState.NEW" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.NEW", - "fullIdentifier" : "OrderState.NEW" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.NEW" } ], "targetStates" : [ { "rawName" : "OrderState.PAID", - "fullIdentifier" : "OrderState.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID" } ], "event" : { "rawName" : "OrderTransitionEvent.PAY", - "fullIdentifier" : "OrderTransitionEvent.PAY" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.PAY" }, "guards" : [ ], "actions" : [ ], @@ -411,15 +411,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.PAID", - "fullIdentifier" : "OrderState.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID" } ], "targetStates" : [ { "rawName" : "OrderState.SHIPPED", - "fullIdentifier" : "OrderState.SHIPPED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED" } ], "event" : { "rawName" : "OrderTransitionEvent.SHIP", - "fullIdentifier" : "OrderTransitionEvent.SHIP" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP" }, "guards" : [ ], "actions" : [ ], @@ -428,19 +428,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.PAID", - "fullIdentifier" : "OrderState.PAID" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.PAID" } ], "targetStates" : [ { "rawName" : "OrderState.CANCELLED", - "fullIdentifier" : "OrderState.CANCELLED" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED" } ], "event" : { "rawName" : "OrderTransitionEvent.CANCEL", - "fullIdentifier" : "OrderTransitionEvent.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.CANCEL" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "OrderState.SHIPPED", "OrderState.CANCELLED" ] + "endStates" : [ "click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED", "click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.puml index 772b5eb..d0f48d5 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.puml @@ -21,14 +21,14 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderState.NEW +[*] --> click.kamil.examples.statemachine.layered.order.OrderState.NEW OrderState.NEW -[#1E90FF,bold]-> OrderState.PAID <> : OrderTransitionEvent.PAY OrderState.PAID -[#1E90FF,bold]-> OrderState.SHIPPED <> : OrderTransitionEvent.SHIP OrderState.PAID -[#1E90FF,bold]-> OrderState.CANCELLED <> : OrderTransitionEvent.CANCEL -OrderState.SHIPPED --> [*] -OrderState.CANCELLED --> [*] +click.kamil.examples.statemachine.layered.order.OrderState.SHIPPED --> [*] +click.kamil.examples.statemachine.layered.order.OrderState.CANCELLED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.scxml.xml index 71ef772..295e6d9 100644 --- a/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/StandardOrderStateMachineConfiguration/StandardOrderStateMachineConfiguration.scxml.xml @@ -11,5 +11,11 @@ + + + + + + diff --git a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.json b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.json index 3d5d9d1..b5f162b 100644 --- a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.json +++ b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.json @@ -101,7 +101,7 @@ }, "methodChain" : [ "click.kamil.web.OrderController.processOrder", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ], "triggerPoint" : { - "event" : "OrderEvent.PROCESS", + "event" : "click.kamil.domain.OrderEvent.PROCESS", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessage", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -109,16 +109,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 25, - "polymorphicEvents" : [ "OrderEvent.PROCESS" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.PROCESS" ], "external" : false, "constraint" : "event instanceof OrderEvent", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PROCESSING", - "event" : "OrderEvent.PROCESS" + "sourceState" : "click.kamil.domain.OrderState.NEW", + "targetState" : "click.kamil.domain.OrderState.PROCESSING", + "event" : "click.kamil.domain.OrderEvent.PROCESS" } ] }, { "entryPoint" : { @@ -135,7 +135,7 @@ }, "methodChain" : [ "click.kamil.web.OrderController.completeOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ], "triggerPoint" : { - "event" : "OrderEvent.COMPLETE", + "event" : "click.kamil.domain.OrderEvent.COMPLETE", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessage", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -143,16 +143,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 25, - "polymorphicEvents" : [ "OrderEvent.COMPLETE" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.COMPLETE" ], "external" : false, "constraint" : "event instanceof OrderEvent", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PROCESSING", - "targetState" : "OrderState.COMPLETED", - "event" : "OrderEvent.COMPLETE" + "sourceState" : "click.kamil.domain.OrderState.PROCESSING", + "targetState" : "click.kamil.domain.OrderState.COMPLETED", + "event" : "click.kamil.domain.OrderEvent.COMPLETE" } ] }, { "entryPoint" : { @@ -169,7 +169,7 @@ }, "methodChain" : [ "click.kamil.web.OrderController.cancelOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ], "triggerPoint" : { - "event" : "OrderEvent.CANCEL", + "event" : "click.kamil.domain.OrderEvent.CANCEL", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessage", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -177,20 +177,20 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 25, - "polymorphicEvents" : [ "OrderEvent.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.CANCEL" ], "external" : false, "constraint" : "event instanceof OrderEvent", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderEvent.CANCEL" + "sourceState" : "click.kamil.domain.OrderState.NEW", + "targetState" : "click.kamil.domain.OrderState.CANCELLED", + "event" : "click.kamil.domain.OrderEvent.CANCEL" }, { - "sourceState" : "OrderState.PROCESSING", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderEvent.CANCEL" + "sourceState" : "click.kamil.domain.OrderState.PROCESSING", + "targetState" : "click.kamil.domain.OrderState.CANCELLED", + "event" : "click.kamil.domain.OrderEvent.CANCEL" } ] }, { "entryPoint" : { @@ -207,7 +207,7 @@ }, "methodChain" : [ "click.kamil.web.OrderController.functionalCompleteOrder", "click.kamil.web.OrderController.triggerTransitionFunction", "click.kamil.service.StateMachineServiceImpl.sendMessage" ], "triggerPoint" : { - "event" : "OrderEvent.COMPLETE", + "event" : "click.kamil.domain.OrderEvent.COMPLETE", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessage", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -215,16 +215,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 25, - "polymorphicEvents" : [ "OrderEvent.COMPLETE" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.COMPLETE" ], "external" : false, "constraint" : "event instanceof OrderEvent", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.PROCESSING", - "targetState" : "OrderState.COMPLETED", - "event" : "OrderEvent.COMPLETE" + "sourceState" : "click.kamil.domain.OrderState.PROCESSING", + "targetState" : "click.kamil.domain.OrderState.COMPLETED", + "event" : "click.kamil.domain.OrderEvent.COMPLETE" } ] }, { "entryPoint" : { @@ -279,7 +279,7 @@ }, "methodChain" : [ "click.kamil.web.JmsOrderListener.receiveProcessCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ], "triggerPoint" : { - "event" : "OrderEvent.PROCESS", + "event" : "click.kamil.domain.OrderEvent.PROCESS", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessage", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -287,16 +287,16 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 25, - "polymorphicEvents" : [ "OrderEvent.PROCESS" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.PROCESS" ], "external" : false, "constraint" : "event instanceof OrderEvent", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.PROCESSING", - "event" : "OrderEvent.PROCESS" + "sourceState" : "click.kamil.domain.OrderState.NEW", + "targetState" : "click.kamil.domain.OrderState.PROCESSING", + "event" : "click.kamil.domain.OrderEvent.PROCESS" } ] }, { "entryPoint" : { @@ -317,7 +317,7 @@ }, "methodChain" : [ "click.kamil.web.JmsOrderListener.receiveCancelCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithProvider" ], "triggerPoint" : { - "event" : "OrderEvent.CANCEL", + "event" : "click.kamil.domain.OrderEvent.CANCEL", "className" : "click.kamil.service.StateMachineServiceImpl", "methodName" : "sendMessageWithProvider", "sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java", @@ -325,20 +325,20 @@ "stateMachineId" : null, "sourceState" : null, "lineNumber" : 50, - "polymorphicEvents" : [ "OrderEvent.CANCEL" ], + "polymorphicEvents" : [ "click.kamil.domain.OrderEvent.CANCEL" ], "external" : false, "constraint" : "event != null", "ambiguous" : false }, "contextMachineId" : null, "matchedTransitions" : [ { - "sourceState" : "OrderState.NEW", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderEvent.CANCEL" + "sourceState" : "click.kamil.domain.OrderState.NEW", + "targetState" : "click.kamil.domain.OrderState.CANCELLED", + "event" : "click.kamil.domain.OrderEvent.CANCEL" }, { - "sourceState" : "OrderState.PROCESSING", - "targetState" : "OrderState.CANCELLED", - "event" : "OrderEvent.CANCEL" + "sourceState" : "click.kamil.domain.OrderState.PROCESSING", + "targetState" : "click.kamil.domain.OrderState.CANCELLED", + "event" : "click.kamil.domain.OrderEvent.CANCEL" } ] } ], "properties" : { @@ -347,20 +347,20 @@ }, "name" : "click.kamil.domain.StateMachineConfig", "renderChoicesAsDiamonds" : true, - "startStates" : [ "OrderState.NEW" ], + "startStates" : [ "click.kamil.domain.OrderState.NEW" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.NEW", - "fullIdentifier" : "OrderState.NEW" + "fullIdentifier" : "click.kamil.domain.OrderState.NEW" } ], "targetStates" : [ { "rawName" : "OrderState.PROCESSING", - "fullIdentifier" : "OrderState.PROCESSING" + "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING" } ], "event" : { "rawName" : "OrderEvent.PROCESS", - "fullIdentifier" : "OrderEvent.PROCESS" + "fullIdentifier" : "click.kamil.domain.OrderEvent.PROCESS" }, "guards" : [ ], "actions" : [ ], @@ -369,15 +369,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.PROCESSING", - "fullIdentifier" : "OrderState.PROCESSING" + "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING" } ], "targetStates" : [ { "rawName" : "OrderState.COMPLETED", - "fullIdentifier" : "OrderState.COMPLETED" + "fullIdentifier" : "click.kamil.domain.OrderState.COMPLETED" } ], "event" : { "rawName" : "OrderEvent.COMPLETE", - "fullIdentifier" : "OrderEvent.COMPLETE" + "fullIdentifier" : "click.kamil.domain.OrderEvent.COMPLETE" }, "guards" : [ ], "actions" : [ ], @@ -386,15 +386,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.NEW", - "fullIdentifier" : "OrderState.NEW" + "fullIdentifier" : "click.kamil.domain.OrderState.NEW" } ], "targetStates" : [ { "rawName" : "OrderState.CANCELLED", - "fullIdentifier" : "OrderState.CANCELLED" + "fullIdentifier" : "click.kamil.domain.OrderState.CANCELLED" } ], "event" : { "rawName" : "OrderEvent.CANCEL", - "fullIdentifier" : "OrderEvent.CANCEL" + "fullIdentifier" : "click.kamil.domain.OrderEvent.CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -403,19 +403,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "OrderState.PROCESSING", - "fullIdentifier" : "OrderState.PROCESSING" + "fullIdentifier" : "click.kamil.domain.OrderState.PROCESSING" } ], "targetStates" : [ { "rawName" : "OrderState.CANCELLED", - "fullIdentifier" : "OrderState.CANCELLED" + "fullIdentifier" : "click.kamil.domain.OrderState.CANCELLED" } ], "event" : { "rawName" : "OrderEvent.CANCEL", - "fullIdentifier" : "OrderEvent.CANCEL" + "fullIdentifier" : "click.kamil.domain.OrderEvent.CANCEL" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "OrderState.COMPLETED", "OrderState.CANCELLED" ] + "endStates" : [ "click.kamil.domain.OrderState.COMPLETED", "click.kamil.domain.OrderState.CANCELLED" ] } diff --git a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.puml b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.puml index c9cfecb..aefe028 100644 --- a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.puml +++ b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> OrderState.NEW +[*] --> click.kamil.domain.OrderState.NEW OrderState.NEW -[#1E90FF,bold]-> OrderState.PROCESSING <> : OrderEvent.PROCESS @@ -29,7 +29,7 @@ OrderState.PROCESSING -[#1E90FF,bold]-> OrderState.COMPLETED <> : Orde OrderState.NEW -[#1E90FF,bold]-> OrderState.CANCELLED <> : OrderEvent.CANCEL OrderState.PROCESSING -[#1E90FF,bold]-> OrderState.CANCELLED <> : OrderEvent.CANCEL -OrderState.COMPLETED --> [*] -OrderState.CANCELLED --> [*] +click.kamil.domain.OrderState.COMPLETED --> [*] +click.kamil.domain.OrderState.CANCELLED --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.scxml.xml b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.scxml.xml index c661eba..eff71a9 100644 --- a/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/StateMachineConfig/StateMachineConfig.scxml.xml @@ -12,5 +12,11 @@ + + + + + + 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 45fa931..c8375ff 100644 --- a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.ThreeStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,15 +271,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -288,15 +288,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -305,15 +305,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -322,15 +322,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -339,15 +339,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -356,15 +356,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -373,11 +373,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEX" } ], "event" : null, "guards" : [ { @@ -394,11 +394,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -408,11 +408,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE17" } ], "event" : null, "guards" : [ { @@ -429,11 +429,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE18" } ], "event" : null, "guards" : [ { @@ -450,11 +450,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -464,11 +464,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE20" } ], "event" : null, "guards" : [ { @@ -485,11 +485,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -499,11 +499,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE19" } ], "event" : null, "guards" : [ { @@ -520,11 +520,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -534,11 +534,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" } ], "event" : null, "guards" : [ { @@ -555,11 +555,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -569,11 +569,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE5" } ], "event" : null, "guards" : [ { @@ -590,11 +590,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -604,11 +604,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE13" } ], "event" : null, "guards" : [ { @@ -625,11 +625,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE14" } ], "event" : null, "guards" : [ { @@ -646,11 +646,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -660,11 +660,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE10" } ], "event" : null, "guards" : [ { @@ -681,11 +681,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -695,11 +695,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE12" } ], "event" : null, "guards" : [ { @@ -716,11 +716,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -730,11 +730,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE8" } ], "event" : null, "guards" : [ { @@ -751,11 +751,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE7" } ], "event" : null, "guards" : [ { @@ -772,11 +772,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -786,11 +786,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE9" } ], "event" : null, "guards" : [ { @@ -807,11 +807,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -821,15 +821,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENTX", - "fullIdentifier" : "Events.EVENTX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENTX" }, "guards" : [ ], "actions" : [ ], @@ -838,11 +838,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1" } ], "event" : null, "guards" : [ { @@ -859,11 +859,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_1" } ], "event" : null, "guards" : [ ], @@ -873,15 +873,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_3", - "fullIdentifier" : "States.STATE_EXTRA_3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_3" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -890,15 +890,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], @@ -907,19 +907,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_2", - "fullIdentifier" : "States.STATE_EXTRA_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE_EXTRA_2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.png index 8da832e..f47eb97 100644 Binary files a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.puml index dcb4963..34e2cdf 100644 --- a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATE1 state States.STATEY <> state States.STATE16 <> @@ -89,6 +89,6 @@ States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <> : Event States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.scxml.xml index 2b81fe0..83a22a2 100644 --- a/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/ThreeStateMachineConfiguration/ThreeStateMachineConfiguration.scxml.xml @@ -160,5 +160,9 @@ + + + + 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 d92bb0e..7f05503 100644 --- a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.json @@ -11,20 +11,20 @@ }, "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.TwoStateMachineConfiguration", "renderChoicesAsDiamonds" : true, - "startStates" : [ "States.STATE1" ], + "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1" ], "transitions" : [ { "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE2" } ], "event" : { "rawName" : "Events.EVENT1", - "fullIdentifier" : "Events.EVENT1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT1" }, "guards" : [ ], "actions" : [ ], @@ -33,15 +33,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE3" } ], "event" : { "rawName" : "Events.EVENT2", - "fullIdentifier" : "Events.EVENT2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT2" }, "guards" : [ ], "actions" : [ ], @@ -50,15 +50,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE4" } ], "event" : { "rawName" : "Events.EVENT3", - "fullIdentifier" : "Events.EVENT3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT3" }, "guards" : [ ], "actions" : [ ], @@ -67,15 +67,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE5" } ], "event" : { "rawName" : "Events.EVENT4", - "fullIdentifier" : "Events.EVENT4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT4" }, "guards" : [ ], "actions" : [ ], @@ -84,15 +84,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE6" } ], "event" : { "rawName" : "Events.EVENT5", - "fullIdentifier" : "Events.EVENT5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT5" }, "guards" : [ ], "actions" : [ ], @@ -101,15 +101,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE6" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE7" } ], "event" : { "rawName" : "Events.EVENT6", - "fullIdentifier" : "Events.EVENT6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT6" }, "guards" : [ ], "actions" : [ ], @@ -118,15 +118,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE7" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE8" } ], "event" : { "rawName" : "Events.EVENT7", - "fullIdentifier" : "Events.EVENT7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT7" }, "guards" : [ ], "actions" : [ ], @@ -135,15 +135,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "event" : { "rawName" : "Events.EVENT8", - "fullIdentifier" : "Events.EVENT8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT8" }, "guards" : [ ], "actions" : [ ], @@ -152,15 +152,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE10" } ], "event" : { "rawName" : "Events.EVENT9", - "fullIdentifier" : "Events.EVENT9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT9" }, "guards" : [ ], "actions" : [ ], @@ -169,15 +169,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE10" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "event" : { "rawName" : "Events.EVENT10", - "fullIdentifier" : "Events.EVENT10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT10" }, "guards" : [ ], "actions" : [ ], @@ -186,15 +186,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE12" } ], "event" : { "rawName" : "Events.EVENT11", - "fullIdentifier" : "Events.EVENT11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT11" }, "guards" : [ ], "actions" : [ ], @@ -203,15 +203,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE13" } ], "event" : { "rawName" : "Events.EVENT12", - "fullIdentifier" : "Events.EVENT12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT12" }, "guards" : [ ], "actions" : [ ], @@ -220,15 +220,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE13" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE14" } ], "event" : { "rawName" : "Events.EVENT13", - "fullIdentifier" : "Events.EVENT13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT13" }, "guards" : [ ], "actions" : [ ], @@ -237,15 +237,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE15" } ], "event" : { "rawName" : "Events.EVENT14", - "fullIdentifier" : "Events.EVENT14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT14" }, "guards" : [ ], "actions" : [ ], @@ -254,15 +254,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE15" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "event" : { "rawName" : "Events.EVENT15", - "fullIdentifier" : "Events.EVENT15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT15" }, "guards" : [ ], "actions" : [ ], @@ -271,15 +271,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -288,15 +288,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE2", - "fullIdentifier" : "States.STATE2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE2" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -305,15 +305,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE3", - "fullIdentifier" : "States.STATE3" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE3" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -322,15 +322,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -339,15 +339,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -356,15 +356,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE4", - "fullIdentifier" : "States.STATE4" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE4" } ], "targetStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEY" } ], "event" : { "rawName" : "Events.EVENTY", - "fullIdentifier" : "Events.EVENTY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENTY" }, "guards" : [ ], "actions" : [ ], @@ -373,11 +373,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEX", - "fullIdentifier" : "States.STATEX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEX" } ], "event" : null, "guards" : [ { @@ -394,11 +394,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATEY", - "fullIdentifier" : "States.STATEY" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEY" } ], "targetStates" : [ { "rawName" : "States.STATEZ", - "fullIdentifier" : "States.STATEZ" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEZ" } ], "event" : null, "guards" : [ ], @@ -408,11 +408,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE17" } ], "event" : null, "guards" : [ { @@ -429,11 +429,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE18" } ], "event" : null, "guards" : [ { @@ -450,11 +450,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE19" } ], "event" : null, "guards" : [ ], @@ -464,11 +464,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE20" } ], "event" : null, "guards" : [ { @@ -485,11 +485,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE17", - "fullIdentifier" : "States.STATE17" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE17" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -499,11 +499,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE19" } ], "event" : null, "guards" : [ { @@ -520,11 +520,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE18", - "fullIdentifier" : "States.STATE18" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE18" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -534,11 +534,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1" } ], "event" : null, "guards" : [ { @@ -555,11 +555,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE19", - "fullIdentifier" : "States.STATE19" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE19" } ], "targetStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE20" } ], "event" : null, "guards" : [ ], @@ -569,11 +569,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE5" } ], "event" : null, "guards" : [ { @@ -590,11 +590,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE20", - "fullIdentifier" : "States.STATE20" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE20" } ], "targetStates" : [ { "rawName" : "States.STATE1", - "fullIdentifier" : "States.STATE1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1" } ], "event" : null, "guards" : [ ], @@ -604,11 +604,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE13", - "fullIdentifier" : "States.STATE13" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE13" } ], "event" : null, "guards" : [ { @@ -625,11 +625,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE14" } ], "event" : null, "guards" : [ { @@ -646,11 +646,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "targetStates" : [ { "rawName" : "States.STATE15", - "fullIdentifier" : "States.STATE15" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE15" } ], "event" : null, "guards" : [ ], @@ -660,11 +660,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE10" } ], "event" : null, "guards" : [ { @@ -681,11 +681,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE12" } ], "targetStates" : [ { "rawName" : "States.STATE11", - "fullIdentifier" : "States.STATE11" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE11" } ], "event" : null, "guards" : [ ], @@ -695,11 +695,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE12", - "fullIdentifier" : "States.STATE12" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE12" } ], "event" : null, "guards" : [ { @@ -716,11 +716,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE14", - "fullIdentifier" : "States.STATE14" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE14" } ], "targetStates" : [ { "rawName" : "States.STATE16", - "fullIdentifier" : "States.STATE16" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE16" } ], "event" : null, "guards" : [ ], @@ -730,11 +730,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE8" } ], "event" : null, "guards" : [ { @@ -751,11 +751,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE7", - "fullIdentifier" : "States.STATE7" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE7" } ], "event" : null, "guards" : [ { @@ -772,11 +772,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "targetStates" : [ { "rawName" : "States.STATE6", - "fullIdentifier" : "States.STATE6" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE6" } ], "event" : null, "guards" : [ ], @@ -786,11 +786,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE9", - "fullIdentifier" : "States.STATE9" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE9" } ], "event" : null, "guards" : [ { @@ -807,11 +807,11 @@ "type" : "CHOICE", "sourceStates" : [ { "rawName" : "States.STATE8", - "fullIdentifier" : "States.STATE8" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE8" } ], "targetStates" : [ { "rawName" : "States.STATE10", - "fullIdentifier" : "States.STATE10" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE10" } ], "event" : null, "guards" : [ ], @@ -821,15 +821,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE5", - "fullIdentifier" : "States.STATE5" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE5" } ], "targetStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE_EXTRA_1" } ], "event" : { "rawName" : "Events.EVENTX", - "fullIdentifier" : "Events.EVENTX" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENTX" }, "guards" : [ ], "actions" : [ ], @@ -838,15 +838,15 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL", - "fullIdentifier" : "Events.EVENT_CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL" }, "guards" : [ ], "actions" : [ ], @@ -855,19 +855,19 @@ "type" : "EXTERNAL", "sourceStates" : [ { "rawName" : "States.STATE_EXTRA_1", - "fullIdentifier" : "States.STATE_EXTRA_1" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE_EXTRA_1" } ], "targetStates" : [ { "rawName" : "States.CANCEL", - "fullIdentifier" : "States.CANCEL" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.CANCEL" } ], "event" : { "rawName" : "Events.EVENT_CANCEL_2", - "fullIdentifier" : "Events.EVENT_CANCEL_2" + "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.Events.EVENT_CANCEL_2" }, "guards" : [ ], "actions" : [ ], "order" : null } ], - "endStates" : [ "States.STATEZ" ] + "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEZ" ] } diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.png b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.png index cf4c706..02f6524 100644 Binary files a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.png and b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.png differ diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.puml b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.puml index be25fa3..c92403d 100644 --- a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.puml +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.puml @@ -21,7 +21,7 @@ skinparam ArrowThickness 1 skinparam dpi 110 skinparam svgLinkTarget _self -[*] --> States.STATE1 +[*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATE1 state States.STATEY <> state States.STATE16 <> @@ -85,6 +85,6 @@ States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <> : Events.EVENT States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <> : Events.EVENT_CANCEL_2 -States.STATEZ --> [*] +click.kamil.examples.statemachine.inheritanceextrafunctionsstate.States.STATEZ --> [*] @enduml diff --git a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.scxml.xml b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.scxml.xml index 4f9b7c7..df0a692 100644 --- a/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.scxml.xml +++ b/state_machine_exporter/src/test/resources/golden/TwoStateMachineExtraFunctionsConfiguration/TwoStateMachineConfiguration.scxml.xml @@ -149,5 +149,9 @@ + + + +