Enforce package-canonical enum identifiers across analysis export.

Resolve generic configurer type arguments, canonicalize transitions and triggers consistently, validate after property resolution, and update regression goldens.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-12 00:48:43 +02:00
parent ea9b8d6cff
commit 0aca0aade9
116 changed files with 3561 additions and 2727 deletions

View File

@@ -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);
}
}

View File

@@ -3,11 +3,15 @@ package click.kamil.springstatemachineexporter.analysis.enricher;
import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult;
import click.kamil.springstatemachineexporter.analysis.model.CallChain; import click.kamil.springstatemachineexporter.analysis.model.CallChain;
import click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata; 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.analysis.service.CodebaseIntelligenceProvider;
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Slf4j @Slf4j
public class CallChainEnricher implements AnalysisEnricher { public class CallChainEnricher implements AnalysisEnricher {
@@ -16,10 +20,25 @@ public class CallChainEnricher implements AnalysisEnricher {
public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) {
log.info("Enriching {} with call chains", result.getName()); log.info("Enriching {} with call chains", result.getName());
StateMachineTypeResolver.MachineTypes machineTypes =
StateMachineTypeResolver.resolveTypes(result.getName(), context);
List<TriggerPoint> canonicalTriggers = intelligence.findTriggerPoints().stream()
.map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes))
.collect(Collectors.toList());
List<CallChain> chains = intelligence.findCallChains( List<CallChain> chains = intelligence.findCallChains(
result.getMetadata().getEntryPoints(), 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); chains = MachineScopeFilter.filterCallChainsForMachine(chains, result.getName(), context);
result.addMetadata(CodebaseMetadata.builder() result.addMetadata(CodebaseMetadata.builder()

View File

@@ -15,17 +15,14 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; 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.EventMatchingEngine;
import click.kamil.springstatemachineexporter.analysis.enricher.matching.StrictFqnMatchingEngine; 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; import click.kamil.springstatemachineexporter.analysis.resolver.BooleanConstraintEvaluator;
public class TransitionLinkerEnricher implements AnalysisEnricher { public class TransitionLinkerEnricher implements AnalysisEnricher {
private static final ExportOptions LINK_FORMAT_OPTIONS = ExportOptions.builder().build();
private final BeanResolutionEngine routingEngine = new HeuristicBeanResolutionEngine(); private final BeanResolutionEngine routingEngine = new HeuristicBeanResolutionEngine();
private final EventMatchingEngine matchingEngine = new StrictFqnMatchingEngine(); private final EventMatchingEngine matchingEngine = new StrictFqnMatchingEngine();
@@ -52,9 +49,9 @@ public class TransitionLinkerEnricher implements AnalysisEnricher {
for (Transition t : stateMachineTransitions) { for (Transition t : stateMachineTransitions) {
if (t.getEvent() != null && matchingEngine.matches(t.getEvent(), tp)) { if (t.getEvent() != null && matchingEngine.matches(t.getEvent(), tp)) {
String smEventForLink = formatEventForLink(t.getEvent()); String smEventForLink = canonicalEvent(t.getEvent());
for (State smSourceState : t.getSourceStates()) { for (State smSourceState : t.getSourceStates()) {
String smSourceForLink = formatSourceForLink(smSourceState); String smSourceForLink = canonicalState(smSourceState);
String smSource = simplify(smSourceForLink); String smSource = simplify(smSourceForLink);
if (triggerSource == null || triggerSource.equals(smSource)) { if (triggerSource == null || triggerSource.equals(smSource)) {
if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) { if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) {
@@ -69,7 +66,7 @@ public class TransitionLinkerEnricher implements AnalysisEnricher {
} }
} else { } else {
for (State smTargetState : t.getTargetStates()) { for (State smTargetState : t.getTargetStates()) {
String targetForLink = formatSourceForLink(smTargetState); String targetForLink = canonicalState(smTargetState);
MatchedTransition mt = MatchedTransition.builder() MatchedTransition mt = MatchedTransition.builder()
.sourceState(smSourceForLink) .sourceState(smSourceForLink)
.targetState(targetForLink) .targetState(targetForLink)
@@ -162,20 +159,18 @@ public class TransitionLinkerEnricher implements AnalysisEnricher {
return simplified; return simplified;
} }
private String formatSourceForLink(State state) { private String canonicalState(State state) {
if (state == null) return null; if (state == null) {
return simplifyForLink(LINK_FORMAT_OPTIONS.formatState(state)); return null;
}
return state.fullIdentifier() != null ? state.fullIdentifier() : state.rawName();
} }
private String formatEventForLink(click.kamil.springstatemachineexporter.model.Event event) { private String canonicalEvent(click.kamil.springstatemachineexporter.model.Event event) {
if (event == null) return null; if (event == null) {
return LINK_FORMAT_OPTIONS.formatEvent(event); return null;
} }
return event.fullIdentifier() != null ? event.fullIdentifier() : event.rawName();
private String simplifyForLink(String name) {
if (name == null) return "";
if (name.contains("\"")) return name;
return name.replaceAll("[^a-zA-Z0-9_.]", "");
} }
private boolean isGuardedContains(String smEvent, String triggerEvent) { private boolean isGuardedContains(String smEvent, String triggerEvent) {

View File

@@ -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 <State, Event>} 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<TriggerPoint> triggers = result.getMetadata().getTriggers();
List<TriggerPoint> canonicalTriggers = triggers == null ? null : triggers.stream()
.map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes))
.collect(Collectors.toList());
List<CallChain> callChains = result.getMetadata().getCallChains();
List<CallChain> 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());
}
}

View File

@@ -2,11 +2,14 @@ package click.kamil.springstatemachineexporter.analysis.enricher;
import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult;
import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint; 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.analysis.service.CodebaseIntelligenceProvider;
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Slf4j @Slf4j
public class TriggerEnricher implements AnalysisEnricher { public class TriggerEnricher implements AnalysisEnricher {
@@ -15,7 +18,12 @@ public class TriggerEnricher implements AnalysisEnricher {
public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) { public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) {
log.info("Enriching {} with triggers", result.getName()); log.info("Enriching {} with triggers", result.getName());
List<TriggerPoint> triggers = intelligence.findTriggerPoints(); StateMachineTypeResolver.MachineTypes machineTypes =
StateMachineTypeResolver.resolveTypes(result.getName(), context);
List<TriggerPoint> triggers = intelligence.findTriggerPoints().stream()
.map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes))
.collect(Collectors.toList());
triggers = MachineScopeFilter.filterTriggersForMachine(triggers, result.getName(), context); triggers = MachineScopeFilter.filterTriggersForMachine(triggers, result.getName(), context);
result.addMetadata(click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata.builder() result.addMetadata(click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata.builder()

View File

@@ -12,18 +12,18 @@ public class StrictFqnMatchingEngine implements EventMatchingEngine {
return false; return false;
} }
String smEventRaw = stateMachineEvent.fullIdentifier() != null ? stateMachineEvent.fullIdentifier() : stateMachineEvent.rawName();
String rawTriggerEvent = triggerPoint.getEvent();
if (triggerPoint.isExternal()) { if (triggerPoint.isExternal()) {
List<String> polyEvents = triggerPoint.getPolymorphicEvents() != null List<String> polyEvents = triggerPoint.getPolymorphicEvents() != null
? triggerPoint.getPolymorphicEvents() ? triggerPoint.getPolymorphicEvents()
: java.util.Collections.emptyList(); : java.util.Collections.emptyList();
if (polyEvents.isEmpty()) { if (polyEvents.isEmpty() && isDynamicVariable(rawTriggerEvent)) {
return false; return false;
} }
} }
String smEventRaw = stateMachineEvent.fullIdentifier() != null ? stateMachineEvent.fullIdentifier() : stateMachineEvent.rawName();
String rawTriggerEvent = triggerPoint.getEvent();
if (rawTriggerEvent != null && rawTriggerEvent.startsWith("<SYMBOLIC: ") && rawTriggerEvent.endsWith(".*>")) { if (rawTriggerEvent != null && rawTriggerEvent.startsWith("<SYMBOLIC: ") && rawTriggerEvent.endsWith(".*>")) {
return false; return false;
} }
@@ -150,6 +150,10 @@ public class StrictFqnMatchingEngine implements EventMatchingEngine {
} }
if (eventStr.contains(".")) { 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('.')); String firstPart = eventStr.substring(0, eventStr.indexOf('.'));
if (!firstPart.isEmpty() && Character.isLowerCase(firstPart.charAt(0))) { if (!firstPart.isEmpty() && Character.isLowerCase(firstPart.charAt(0))) {
return true; return true;

View File

@@ -1,6 +1,7 @@
package click.kamil.springstatemachineexporter.analysis.enricher.routing; package click.kamil.springstatemachineexporter.analysis.enricher.routing;
import click.kamil.springstatemachineexporter.analysis.model.CallChain; import click.kamil.springstatemachineexporter.analysis.model.CallChain;
import click.kamil.springstatemachineexporter.analysis.resolver.StateMachineTypeResolver;
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext; import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
import org.eclipse.jdt.core.dom.TypeDeclaration; import org.eclipse.jdt.core.dom.TypeDeclaration;
@@ -16,17 +17,18 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine {
String triggerEventFqn = chain.getTriggerPoint().getEventTypeFqn(); String triggerEventFqn = chain.getTriggerPoint().getEventTypeFqn();
String triggerStateFqn = chain.getTriggerPoint().getStateTypeFqn(); String triggerStateFqn = chain.getTriggerPoint().getStateTypeFqn();
if (triggerEventFqn != null || triggerStateFqn != null) { if (triggerEventFqn != null || triggerStateFqn != null) {
String[] machineTypes = getStateMachineTypeArguments(currentMachineName, context); String[] machineTypes = StateMachineTypeResolver.resolve(currentMachineName, context);
String machineStateFqn = machineTypes[0]; String machineStateFqn = machineTypes[0];
String machineEventFqn = machineTypes[1]; String machineEventFqn = machineTypes[1];
if (triggerEventFqn != null && machineEventFqn != null) { if (triggerEventFqn != null && machineEventFqn != null) {
if (eraseGenerics(triggerEventFqn).equals(eraseGenerics(machineEventFqn))) { if (eraseGenerics(triggerEventFqn).equals(eraseGenerics(machineEventFqn))) {
return true; // Match! return true;
} }
if (isTypeMismatched(triggerEventFqn, machineEventFqn)) { if (isTypeMismatched(triggerEventFqn, machineEventFqn)) {
return false; // Mismatch! return false;
} }
return false;
} }
if (triggerStateFqn != null && machineStateFqn != null) { if (triggerStateFqn != null && machineStateFqn != null) {
if (eraseGenerics(triggerStateFqn).equals(eraseGenerics(machineStateFqn))) { if (eraseGenerics(triggerStateFqn).equals(eraseGenerics(machineStateFqn))) {
@@ -298,59 +300,6 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine {
return null; 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<String> 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<String> 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) { private String eraseGenerics(String type) {
if (type == null) return null; if (type == null) return null;
int idx = type.indexOf('<'); int idx = type.indexOf('<');
@@ -360,43 +309,6 @@ public class HeuristicBeanResolutionEngine implements BeanResolutionEngine {
return type; 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) { private boolean isTypeMismatched(String type1, String type2) {
if (type1 == null || type2 == null) return false; if (type1 == null || type2 == null) return false;
type1 = eraseGenerics(type1); type1 = eraseGenerics(type1);

View File

@@ -3,6 +3,10 @@ package click.kamil.springstatemachineexporter.analysis.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; 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 click.kamil.springstatemachineexporter.model.Transition;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; 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 != null) {
if (metadata.getTriggers() != null) { List<TriggerPoint> resolvedTriggers = metadata.getTriggers() == null ? null
for (var trigger : metadata.getTriggers()) { : metadata.getTriggers().stream()
if (trigger.getEvent() != null) { .map(trigger -> resolveTrigger(trigger, resolver, properties))
trigger.setEvent(resolver.resolveValue(trigger.getEvent(), properties)); .collect(java.util.stream.Collectors.toList());
}
} List<CallChain> resolvedCallChains = metadata.getCallChains() == null ? null
} : metadata.getCallChains().stream()
.map(chain -> resolveCallChain(chain, resolver, properties))
.collect(java.util.stream.Collectors.toList());
if (metadata.getEntryPoints() != null) { if (metadata.getEntryPoints() != null) {
for (var ep : metadata.getEntryPoints()) { for (var ep : metadata.getEntryPoints()) {
if (ep.getName() != null) { 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<String, String> properties) {
List<String> 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<String, String> properties) {
TriggerPoint trigger = chain.getTriggerPoint() == null
? null
: resolveTrigger(chain.getTriggerPoint(), resolver, properties);
List<MatchedTransition> 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) { public void addMetadata(CodebaseMetadata newMetadata) {
if (newMetadata == null) return; if (newMetadata == null) return;

View File

@@ -1,5 +1,6 @@
package click.kamil.springstatemachineexporter.analysis.model; package click.kamil.springstatemachineexporter.analysis.model;
import click.kamil.springstatemachineexporter.analysis.resolver.MachineEnumCanonicalizer;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@@ -49,14 +50,14 @@ public class TriggerPoint {
this.sourceFile = sourceFile; this.sourceFile = sourceFile;
this.sourceModule = sourceModule; this.sourceModule = sourceModule;
this.stateMachineId = stateMachineId; this.stateMachineId = stateMachineId;
this.sourceState = sourceState; this.sourceState = MachineEnumCanonicalizer.canonicalizeLabel(sourceState, stateTypeFqn);
this.lineNumber = lineNumber; this.lineNumber = lineNumber;
this.stateTypeFqn = stateTypeFqn; this.stateTypeFqn = stateTypeFqn;
this.eventTypeFqn = eventTypeFqn; this.eventTypeFqn = eventTypeFqn;
this.event = qualifyEvent(event, eventTypeFqn); this.event = MachineEnumCanonicalizer.qualifyEventIdentifier(event, eventTypeFqn);
if (polymorphicEvents != null) { if (polymorphicEvents != null) {
this.polymorphicEvents = polymorphicEvents.stream() this.polymorphicEvents = polymorphicEvents.stream()
.map(pe -> qualifyEvent(pe, eventTypeFqn)) .map(pe -> MachineEnumCanonicalizer.qualifyEventIdentifier(pe, eventTypeFqn))
.collect(java.util.stream.Collectors.toList()); .collect(java.util.stream.Collectors.toList());
} else { } else {
this.polymorphicEvents = null; this.polymorphicEvents = null;
@@ -65,66 +66,4 @@ public class TriggerPoint {
this.constraint = constraint; this.constraint = constraint;
this.ambiguous = ambiguous; this.ambiguous = ambiguous;
} }
private static String qualifyEvent(String e, String eventTypeFqn) {
if (e == null || eventTypeFqn == null || e.isEmpty()) {
return e;
}
if (e.startsWith("<SYMBOLIC: ")) {
return e;
}
if (isWildcardVariable(e)) {
return e;
}
if (Character.isLowerCase(e.charAt(0))) {
return e;
}
if (!isEnumConstantCandidate(e)) {
return e;
}
String simpleEventType = eventTypeFqn.contains(".") ? eventTypeFqn.substring(eventTypeFqn.lastIndexOf('.') + 1) : eventTypeFqn;
if (e.contains(".")) {
String qualifier = e.substring(0, e.lastIndexOf('.'));
String lastSegment = e.substring(e.lastIndexOf('.') + 1);
String simpleQualifier = qualifier.contains(".") ? qualifier.substring(qualifier.lastIndexOf('.') + 1) : qualifier;
if (simpleQualifier.equals(simpleEventType)) {
return simpleEventType + "." + lastSegment;
}
return e;
}
if (eventTypeFqn.startsWith("java.lang.") || eventTypeFqn.equals("String") || eventTypeFqn.equals("int") || eventTypeFqn.equals("long") || eventTypeFqn.equals("char")) {
return e;
}
return simpleEventType + "." + e;
}
private static boolean isEnumConstantCandidate(String eventStr) {
if (eventStr == null) return false;
if (eventStr.startsWith("<SYMBOLIC: ")) {
return false;
}
if (eventStr.contains(" ") || eventStr.contains("(") || eventStr.contains(")") || eventStr.contains("?")) {
return false;
}
return true;
}
private static boolean isWildcardVariable(String eventStr) {
if (eventStr == null) return false;
if (eventStr.equals("event") || eventStr.equals("e") ||
eventStr.equals("msg") || eventStr.equals("message") ||
eventStr.equals("payload")) {
return true;
}
if (eventStr.contains(".valueOf(") || eventStr.contains("valueOf (")) {
return true;
}
if (eventStr.contains(" ? ") && eventStr.contains(" : ")) {
return true;
}
return false;
}
} }

View File

@@ -0,0 +1,301 @@
package click.kamil.springstatemachineexporter.analysis.resolver;
import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint;
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.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Canonicalizes enum-backed state/event identifiers for analysis using the owning machine config's
* {@code StateMachineConfigurerAdapter<State, Event>} type parameters.
*
* <p>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<Transition> 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<String> canonicalizeStateLabels(Set<String> 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<State> canonicalizeStates(Set<State> 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<String> 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("<SYMBOLIC: ")) {
return event;
}
if (isWildcardVariable(event)) {
return event;
}
if (Character.isLowerCase(event.charAt(0))) {
return event;
}
if (!isEnumConstantCandidate(event)) {
return event;
}
if (isStringOrPrimitiveType(eventTypeFqn)) {
return event;
}
if (isMachineEnumReference(event, eventTypeFqn)) {
return canonicalizeLabel(event, stripGenerics(eventTypeFqn));
}
return event;
}
private static String preferFullTypeFqn(String primary, String fallback) {
if (primary != null && primary.contains(".")) {
return stripGenerics(primary);
}
if (fallback != null && fallback.contains(".")) {
return stripGenerics(fallback);
}
return primary != null ? primary : fallback;
}
private static String stripGenerics(String typeFqn) {
int idx = typeFqn.indexOf('<');
return idx >= 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("<SYMBOLIC: ")) {
return false;
}
return !eventStr.contains(" ") && !eventStr.contains("(") && !eventStr.contains(")")
&& !eventStr.contains("?");
}
private static boolean isWildcardVariable(String eventStr) {
if (eventStr == null) {
return false;
}
if (eventStr.equals("event") || eventStr.equals("e")
|| eventStr.equals("msg") || eventStr.equals("message")
|| eventStr.equals("payload")) {
return true;
}
if (eventStr.contains(".valueOf(") || eventStr.contains("valueOf (")) {
return true;
}
return eventStr.contains(" ? ") && eventStr.contains(" : ");
}
private static List<State> canonicalizeStates(List<State> states, String stateTypeFqn) {
if (states == null) {
return null;
}
List<State> 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("<SYMBOLIC: ")) {
return false;
}
if (value.length() >= 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;
}
}

View File

@@ -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<S, E>} 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<String> 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<String> 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<String> 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<String> visited,
Map<String, String> 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<String, String> 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<String, String> extendBindings(
String rawTypeName,
List<?> typeArgs,
CompilationUnit cu,
CodebaseContext context,
Map<String, String> parentBindings) {
Map<String, String> bindings = new HashMap<>(parentBindings);
AbstractTypeDeclaration td = context.getAbstractTypeDeclaration(rawTypeName, cu);
if (!(td instanceof TypeDeclaration typeDecl) || typeArgs.isEmpty()) {
return bindings;
}
List<TypeParameter> 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<String, String> 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;
}
}

View File

@@ -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<TriggerPoint> triggers = canonicalizeTriggers(metadata.getTriggers(), machineTypes);
List<CallChain> 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<TriggerPoint> canonicalizeTriggers(
List<TriggerPoint> triggers,
StateMachineTypeResolver.MachineTypes machineTypes) {
if (triggers == null) {
return null;
}
return triggers.stream()
.map(trigger -> MachineEnumCanonicalizer.canonicalizeTriggerPoint(trigger, machineTypes))
.collect(Collectors.toList());
}
private static List<CallChain> canonicalizeCallChains(
List<CallChain> 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<MatchedTransition> matched = canonicalizeMatchedTransitions(
chain.getMatchedTransitions(), machineTypes);
return chain.toBuilder()
.triggerPoint(trigger)
.matchedTransitions(matched)
.build();
})
.collect(Collectors.toList());
}
private static List<MatchedTransition> canonicalizeMatchedTransitions(
List<MatchedTransition> 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());
}
}

View File

@@ -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 <State, Event>} types.
*/
public class AnalysisCanonicalFormException extends IllegalStateException {
private final List<AnalysisCanonicalFormValidator.Violation> violations;
public AnalysisCanonicalFormException(List<AnalysisCanonicalFormValidator.Violation> violations) {
super(formatMessage(violations));
this.violations = List.copyOf(violations);
}
public List<AnalysisCanonicalFormValidator.Violation> getViolations() {
return violations;
}
private static String formatMessage(List<AnalysisCanonicalFormValidator.Violation> 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();
}
}

View File

@@ -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 <State, Event>} types.
*
* <p>String/primitive machines ({@code StateMachineConfigurerAdapter<String, String>}) are skipped.
*/
public final class AnalysisCanonicalFormValidator {
public record Violation(String path, String actual, String expected) {
}
private AnalysisCanonicalFormValidator() {
}
public static List<Violation> validate(AnalysisResult result, CodebaseContext context) {
List<Violation> 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<Violation> 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<Transition> transitions,
StateMachineTypeResolver.MachineTypes machineTypes,
List<Violation> 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<State> states,
String stateTypeFqn,
String pathPrefix,
List<Violation> 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<State> states,
String stateTypeFqn,
String pathPrefix,
List<Violation> 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<String> labels,
String stateTypeFqn,
String pathPrefix,
List<Violation> violations) {
if (labels == null) {
return;
}
int i = 0;
for (String label : labels) {
requireCanonical(pathPrefix + "[" + i++ + "]", label, stateTypeFqn, violations);
}
}
private static void validateTriggers(
List<TriggerPoint> triggers,
StateMachineTypeResolver.MachineTypes machineTypes,
List<Violation> 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<CallChain> callChains,
StateMachineTypeResolver.MachineTypes machineTypes,
List<Violation> 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<Violation> violations) {
if (!MachineEnumCanonicalizer.isMachineEnumReference(value, enumTypeFqn)) {
return;
}
String expected = MachineEnumCanonicalizer.canonicalizeLabel(value, enumTypeFqn);
if (!expected.equals(value)) {
violations.add(new Violation(path, value, expected));
}
}
}

View File

@@ -1,11 +1,14 @@
package click.kamil.springstatemachineexporter.service; package click.kamil.springstatemachineexporter.service;
import click.kamil.springstatemachineexporter.analysis.enricher.CallChainEnricher; 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.EntryPointEnricher;
import click.kamil.springstatemachineexporter.analysis.enricher.PropertyEnricher; import click.kamil.springstatemachineexporter.analysis.enricher.PropertyEnricher;
import click.kamil.springstatemachineexporter.analysis.enricher.TriggerEnricher; import click.kamil.springstatemachineexporter.analysis.enricher.TriggerEnricher;
import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult; import click.kamil.springstatemachineexporter.analysis.model.AnalysisResult;
import click.kamil.springstatemachineexporter.analysis.model.BusinessFlow; 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.CodebaseIntelligenceProvider;
import click.kamil.springstatemachineexporter.analysis.service.EnrichmentService; import click.kamil.springstatemachineexporter.analysis.service.EnrichmentService;
import click.kamil.springstatemachineexporter.analysis.service.JdtIntelligenceProvider; import click.kamil.springstatemachineexporter.analysis.service.JdtIntelligenceProvider;
@@ -47,6 +50,7 @@ public class ExportService {
new PropertyEnricher(), new PropertyEnricher(),
new CallChainEnricher(), new CallChainEnricher(),
new click.kamil.springstatemachineexporter.analysis.enricher.path.ForwardPathEstimationEnricher(), new click.kamil.springstatemachineexporter.analysis.enricher.path.ForwardPathEstimationEnricher(),
new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(),
new click.kamil.springstatemachineexporter.analysis.enricher.TransitionLinkerEnricher() new click.kamil.springstatemachineexporter.analysis.enricher.TransitionLinkerEnricher()
))); )));
} }
@@ -233,16 +237,23 @@ public class ExportService {
StateMachineAggregator aggregator = new StateMachineAggregator(context); StateMachineAggregator aggregator = new StateMachineAggregator(context);
List<Transition> transitions = aggregator.aggregateTransitions(td); List<Transition> transitions = aggregator.aggregateTransitions(td);
StateMachineTypeResolver.MachineTypes machineTypes = StateMachineTypeResolver.resolveTypes(className, context);
MachineEnumCanonicalizer.canonicalizeTransitions(transitions, machineTypes);
aggregator.aggregateStates(td); aggregator.aggregateStates(td);
Set<String> initialStatesAst = aggregator.getInitialStates(); Set<String> initialStatesAst = MachineEnumCanonicalizer.canonicalizeStateLabels(
Set<String> endStatesAst = aggregator.getEndStates(); aggregator.getInitialStates(), machineTypes.stateTypeFqn());
Set<String> endStatesAst = MachineEnumCanonicalizer.canonicalizeStateLabels(
aggregator.getEndStates(), machineTypes.stateTypeFqn());
log.debug("Start States Ast: {}", initialStatesAst); log.debug("Start States Ast: {}", initialStatesAst);
log.debug("End States Ast: {}", endStatesAst); log.debug("End States Ast: {}", endStatesAst);
Set<String> startStates = TransitionStateUtils.findStartStates(transitions, initialStatesAst); Set<String> startStates = TransitionStateUtils.findStartStates(transitions, initialStatesAst);
Set<String> endStates = TransitionStateUtils.findEndStates(transitions, endStatesAst); Set<String> endStates = TransitionStateUtils.findEndStates(transitions, endStatesAst);
Set<click.kamil.springstatemachineexporter.model.State> allStates = TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst); Set<click.kamil.springstatemachineexporter.model.State> allStates = MachineEnumCanonicalizer.canonicalizeStates(
TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst),
machineTypes.stateTypeFqn());
if (allStates.isEmpty() && transitions.isEmpty()) { if (allStates.isEmpty() && transitions.isEmpty()) {
log.info("Skipping empty state machine config: {}", className); log.info("Skipping empty state machine config: {}", className);
@@ -262,6 +273,7 @@ public class ExportService {
enrichmentService.enrich(result, context, intelligence); enrichmentService.enrich(result, context, intelligence);
resolveProperties(result, activeProfiles); resolveProperties(result, activeProfiles);
AnalysisResultFinalizer.finalizeResult(result, context);
generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat);
} }
@@ -276,9 +288,14 @@ public class ExportService {
List<Transition> transitions = AstTransitionParser.parseTransitions(m, context); List<Transition> transitions = AstTransitionParser.parseTransitions(m, context);
StateMachineTypeResolver.MachineTypes machineTypes = StateMachineTypeResolver.resolveTypes(parentFqn, context);
MachineEnumCanonicalizer.canonicalizeTransitions(transitions, machineTypes);
Set<String> startStates = TransitionStateUtils.findStartStates(transitions, null); Set<String> startStates = TransitionStateUtils.findStartStates(transitions, null);
Set<String> endStates = TransitionStateUtils.findEndStates(transitions, null); Set<String> endStates = TransitionStateUtils.findEndStates(transitions, null);
Set<click.kamil.springstatemachineexporter.model.State> allStates = TransitionStateUtils.findAllStates(transitions, null, null); Set<click.kamil.springstatemachineexporter.model.State> allStates = MachineEnumCanonicalizer.canonicalizeStates(
TransitionStateUtils.findAllStates(transitions, null, null),
machineTypes.stateTypeFqn());
if (allStates.isEmpty() && transitions.isEmpty()) { if (allStates.isEmpty() && transitions.isEmpty()) {
log.info("Skipping empty state machine bean: {}", uniqueName); log.info("Skipping empty state machine bean: {}", uniqueName);
@@ -298,6 +315,7 @@ public class ExportService {
enrichmentService.enrich(result, context, intelligence); enrichmentService.enrich(result, context, intelligence);
resolveProperties(result, activeProfiles); resolveProperties(result, activeProfiles);
AnalysisResultFinalizer.finalizeResult(result, context);
generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat); generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat);
} }

View File

@@ -132,6 +132,12 @@ public class RegressionTest {
Path.of("src/test/resources/golden/EnterpriseStateMachineConfig"), Path.of("src/test/resources/golden/EnterpriseStateMachineConfig"),
"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( new TestScenario(
"Multi-Module Sample", "Multi-Module Sample",
root.resolve("state_machines/multi_module_sample/core-module"), root.resolve("state_machines/multi_module_sample/core-module"),

View File

@@ -224,7 +224,7 @@ class TransitionLinkerEnricherTest {
CallChain updatedChain = result.getMetadata().getCallChains().get(0); CallChain updatedChain = result.getMetadata().getCallChains().get(0);
assertThat(updatedChain.getMatchedTransitions()).hasSize(1); 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 @Test

View File

@@ -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();
}
}

View File

@@ -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<OrderState, OrderEvent> {
}
""");
}
}

View File

@@ -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");
}
}

View File

@@ -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<OrderState, OrderEvent> {
}
""");
}
}

View File

@@ -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;
}
}

View File

@@ -230,6 +230,7 @@ class AnalysisCacheCorrectnessTest {
new TriggerEnricher(), new TriggerEnricher(),
new EntryPointEnricher(), new EntryPointEnricher(),
new CallChainEnricher(), new CallChainEnricher(),
new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(),
new TransitionLinkerEnricher())); new TransitionLinkerEnricher()));
List<String> configNames = List.of( List<String> configNames = List.of(
@@ -274,6 +275,7 @@ class AnalysisCacheCorrectnessTest {
new TriggerEnricher(), new TriggerEnricher(),
new EntryPointEnricher(), new EntryPointEnricher(),
new CallChainEnricher(), new CallChainEnricher(),
new click.kamil.springstatemachineexporter.analysis.enricher.TriggerCanonicalizationEnricher(),
new TransitionLinkerEnricher())); new TransitionLinkerEnricher()));
List<String> configNames = TwelveConfigHierarchyTestSupport.concreteConfigNames(); List<String> configNames = TwelveConfigHierarchyTestSupport.concreteConfigNames();

View File

@@ -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<OrderState, OrderEvent> {
}
""");
}
}

View File

@@ -76,7 +76,7 @@ class DispatcherEndpointTest {
.hasSize(1) .hasSize(1)
.first() .first()
.extracting("event") .extracting("event")
.isEqualTo("OrderEvent.PAY"); .isEqualTo("com.example.OrderEvent.PAY");
} }
@Test @Test

View File

@@ -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;
}
}

View File

@@ -41,28 +41,48 @@ class LayeredDispatcherSampleTest {
JsonNode documentMachine = readMachineJson(tempDir, "StandardDocumentStateMachineConfiguration", mapper); JsonNode documentMachine = readMachineJson(tempDir, "StandardDocumentStateMachineConfiguration", mapper);
assertEndpointLinksSingleTransition(orderMachine, "POST /api/orders/pay", 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", 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", 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", 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", 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", 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", 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", 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", 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", 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 @Test
@@ -75,8 +95,10 @@ class LayeredDispatcherSampleTest {
JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper()); JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper());
assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/pay", "OrderTransitionEvent.PAY"); assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/pay",
assertSingleMatchedChain(orderMachine, "POST /api/string-dispatch/orders/ship", "OrderTransitionEvent.SHIP"); "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 @Test
@@ -90,14 +112,21 @@ class LayeredDispatcherSampleTest {
JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper()); JsonNode orderMachine = readMachineJson(tempDir, "StandardOrderStateMachineConfiguration", new ObjectMapper());
assertEndpointLinksSingleTransition(orderMachine, "POST /api/commands/order.pay", 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", assertEndpointLinksSingleTransition(orderMachine, "POST /api/commands/order.ship",
"OrderTransitionEvent.SHIP", "OrderState.PAID", "OrderState.SHIPPED"); "click.kamil.examples.statemachine.layered.order.OrderTransitionEvent.SHIP",
assertSingleMatchedChain(orderMachine, "POST /api/commands/order.pay", "OrderTransitionEvent.PAY"); "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()); JsonNode documentMachine = readMachineJson(tempDir, "StandardDocumentStateMachineConfiguration", new ObjectMapper());
assertEndpointLinksSingleTransition(documentMachine, "POST /api/commands/document.submit", 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"); JsonNode entryPoints = documentMachine.path("metadata").path("entryPoints");
assertThat(entryPoints.isArray()).isTrue(); assertThat(entryPoints.isArray()).isTrue();
assertThat(entryPoints.findValuesAsText("name")) assertThat(entryPoints.findValuesAsText("name"))

View File

@@ -42,7 +42,7 @@ class StringDispatchCallGraphGapTest {
assertThat(matchedChains).hasSize(1); assertThat(matchedChains).hasSize(1);
assertThat(matchedChains.get(0).get("matchedTransitions")).hasSize(1); assertThat(matchedChains.get(0).get("matchedTransitions")).hasSize(1);
assertThat(matchedChains.get(0).get("matchedTransitions").get(0).get("event").asText()) 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) private static JsonNode readMachineJson(Path outputDir, String configBaseName, ObjectMapper mapper)

View File

@@ -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<AnalysisCanonicalFormValidator.Violation> 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<String, String> {
}
""");
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<OrderState, OrderEvent> {
}
""");
}
}

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig", "name" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "ComplexStateMachineConfig.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT10", "rawName" : "Events.EVENT10",
"fullIdentifier" : "Events.EVENT10" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT10"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT11", "rawName" : "Events.EVENT11",
"fullIdentifier" : "Events.EVENT11" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT11"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT12", "rawName" : "Events.EVENT12",
"fullIdentifier" : "Events.EVENT12" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT12"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT13", "rawName" : "Events.EVENT13",
"fullIdentifier" : "Events.EVENT13" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT13"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT14", "rawName" : "Events.EVENT14",
"fullIdentifier" : "Events.EVENT14" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT14"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT15", "rawName" : "Events.EVENT15",
"fullIdentifier" : "Events.EVENT15" "fullIdentifier" : "ComplexStateMachineConfig.Events.EVENT15"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,11 +271,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -292,11 +292,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -313,11 +313,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -327,11 +327,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -348,11 +348,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -362,11 +362,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -383,11 +383,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -397,11 +397,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -418,11 +418,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -432,11 +432,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE5"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -453,11 +453,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -467,11 +467,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE13"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -488,11 +488,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -509,11 +509,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE15"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -523,11 +523,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -544,11 +544,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE11"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -558,11 +558,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE12"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -579,11 +579,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -593,11 +593,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -614,11 +614,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -635,11 +635,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -649,11 +649,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -670,11 +670,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "ComplexStateMachineConfig.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 206 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> ComplexStateMachineConfig.States.STATE1
state States.STATE16 <<choice>> state States.STATE16 <<choice>>
state States.STATE17 <<choice>> state States.STATE17 <<choice>>

View File

@@ -124,5 +124,7 @@
<!-- order=1 --> <!-- order=1 -->
</transition> </transition>
</state> </state>
<state id="STATE1">
</state>
</scxml> </scxml>

View File

@@ -8,15 +8,15 @@ digraph statemachine {
_start [shape=circle, label="", fillcolor=black, width=0.1]; _start [shape=circle, label="", fillcolor=black, width=0.1];
_start -> NEW; _start -> NEW;
CANCELLED [fillcolor=lightgray]; CANCELLED [fillcolor=lightgray];
DELIVERED [fillcolor=lightgray];
RETURNED [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 -> PENDING_PAYMENT [label="[λ] (order=0)", style="solid", color="blue"];
CHECK_AVAILABILITY_choice -> CANCELLED [label="(order=1)", 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"]; PENDING_PAYMENT -> PAID [label="String.PAY_ORDER", style="solid", color="black"];
PAID -> SHIPPED [label="SHIP_ORDER", style="solid", color="black"]; PAID -> SHIPPED [label="String.SHIP_ORDER", style="solid", color="black"];
SHIPPED -> DELIVERED [label="FINALIZE", style="solid", color="black"]; SHIPPED -> DELIVERED [label="String.FINALIZE", style="solid", color="black"];
PAID -> CANCELLED [label="CANCEL_ORDER", style="solid", color="black"]; PAID -> CANCELLED [label="String.CANCEL_ORDER", style="solid", color="black"];
DELIVERED -> RETURNED [label="RETURN_ORDER", style="solid", color="black"]; DELIVERED -> RETURNED [label="String.RETURN_ORDER", style="solid", color="black"];
} }

View File

@@ -1,84 +1,6 @@
{ {
"metadata" : { "metadata" : {
"triggers" : [ { "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
} ],
"entryPoints" : [ { "entryPoints" : [ {
"type" : "CUSTOM", "type" : "CUSTOM",
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle", "name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
@@ -135,314 +57,27 @@
"annotations" : [ ] "annotations" : [ ]
} ] } ]
} ], } ],
"callChains" : [ { "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"
} ]
} ],
"properties" : { "properties" : {
"default" : { } "default" : { }
} }
}, },
"name" : "click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig", "name" : "click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "NEW" ], "startStates" : [ "String.NEW" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"NEW\"", "rawName" : "\"NEW\"",
"fullIdentifier" : "NEW" "fullIdentifier" : "String.NEW"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"CHECK_AVAILABILITY\"", "rawName" : "\"CHECK_AVAILABILITY\"",
"fullIdentifier" : "CHECK_AVAILABILITY" "fullIdentifier" : "String.CHECK_AVAILABILITY"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.PLACE", "rawName" : "OrderEvents.PLACE",
"fullIdentifier" : "PLACE_ORDER" "fullIdentifier" : "String.PLACE_ORDER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -451,11 +86,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"CHECK_AVAILABILITY\"", "rawName" : "\"CHECK_AVAILABILITY\"",
"fullIdentifier" : "CHECK_AVAILABILITY" "fullIdentifier" : "String.CHECK_AVAILABILITY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PENDING_PAYMENT\"", "rawName" : "\"PENDING_PAYMENT\"",
"fullIdentifier" : "PENDING_PAYMENT" "fullIdentifier" : "String.PENDING_PAYMENT"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -472,11 +107,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"CHECK_AVAILABILITY\"", "rawName" : "\"CHECK_AVAILABILITY\"",
"fullIdentifier" : "CHECK_AVAILABILITY" "fullIdentifier" : "String.CHECK_AVAILABILITY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"CANCELLED\"", "rawName" : "\"CANCELLED\"",
"fullIdentifier" : "CANCELLED" "fullIdentifier" : "String.CANCELLED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -486,15 +121,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PENDING_PAYMENT\"", "rawName" : "\"PENDING_PAYMENT\"",
"fullIdentifier" : "PENDING_PAYMENT" "fullIdentifier" : "String.PENDING_PAYMENT"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PAID\"", "rawName" : "\"PAID\"",
"fullIdentifier" : "PAID" "fullIdentifier" : "String.PAID"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.PAY", "rawName" : "OrderEvents.PAY",
"fullIdentifier" : "PAY_ORDER" "fullIdentifier" : "String.PAY_ORDER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -503,15 +138,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PAID\"", "rawName" : "\"PAID\"",
"fullIdentifier" : "PAID" "fullIdentifier" : "String.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"SHIPPED\"", "rawName" : "\"SHIPPED\"",
"fullIdentifier" : "SHIPPED" "fullIdentifier" : "String.SHIPPED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.SHIP", "rawName" : "OrderEvents.SHIP",
"fullIdentifier" : "SHIP_ORDER" "fullIdentifier" : "String.SHIP_ORDER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -520,15 +155,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"SHIPPED\"", "rawName" : "\"SHIPPED\"",
"fullIdentifier" : "SHIPPED" "fullIdentifier" : "String.SHIPPED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"DELIVERED\"", "rawName" : "\"DELIVERED\"",
"fullIdentifier" : "DELIVERED" "fullIdentifier" : "String.DELIVERED"
} ], } ],
"event" : { "event" : {
"rawName" : "\"FINALIZE\"", "rawName" : "\"FINALIZE\"",
"fullIdentifier" : "FINALIZE" "fullIdentifier" : "String.FINALIZE"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -537,15 +172,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PAID\"", "rawName" : "\"PAID\"",
"fullIdentifier" : "PAID" "fullIdentifier" : "String.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"CANCELLED\"", "rawName" : "\"CANCELLED\"",
"fullIdentifier" : "CANCELLED" "fullIdentifier" : "String.CANCELLED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "CANCEL_ORDER" "fullIdentifier" : "String.CANCEL_ORDER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -554,19 +189,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"DELIVERED\"", "rawName" : "\"DELIVERED\"",
"fullIdentifier" : "DELIVERED" "fullIdentifier" : "String.DELIVERED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"RETURNED\"", "rawName" : "\"RETURNED\"",
"fullIdentifier" : "RETURNED" "fullIdentifier" : "String.RETURNED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.RETURN", "rawName" : "OrderEvents.RETURN",
"fullIdentifier" : "RETURN_ORDER" "fullIdentifier" : "String.RETURN_ORDER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "CANCELLED", "DELIVERED", "RETURNED" ] "endStates" : [ "String.CANCELLED", "String.RETURNED", "String.DELIVERED" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -21,21 +21,21 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> NEW [*] --> String.NEW
state CHECK_AVAILABILITY <<choice>> state String.CHECK_AVAILABILITY <<choice>>
NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <<external>> : PLACE_ORDER String.NEW -[#1E90FF,bold]-> String.CHECK_AVAILABILITY <<external>> : String.PLACE_ORDER
CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <<choice_type>> : [λ] (order=0) String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.PENDING_PAYMENT <<choice_type>> : [λ] (order=0)
CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <<choice_type>> : (order=1) String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.CANCELLED <<choice_type>> : (order=1)
PENDING_PAYMENT -[#1E90FF,bold]-> PAID <<external>> : PAY_ORDER String.PENDING_PAYMENT -[#1E90FF,bold]-> String.PAID <<external>> : String.PAY_ORDER
PAID -[#1E90FF,bold]-> SHIPPED <<external>> : SHIP_ORDER String.PAID -[#1E90FF,bold]-> String.SHIPPED <<external>> : String.SHIP_ORDER
SHIPPED -[#1E90FF,bold]-> DELIVERED <<external>> : FINALIZE String.SHIPPED -[#1E90FF,bold]-> String.DELIVERED <<external>> : String.FINALIZE
PAID -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_ORDER String.PAID -[#1E90FF,bold]-> String.CANCELLED <<external>> : String.CANCEL_ORDER
DELIVERED -[#1E90FF,bold]-> RETURNED <<external>> : RETURN_ORDER String.DELIVERED -[#1E90FF,bold]-> String.RETURNED <<external>> : String.RETURN_ORDER
CANCELLED --> [*] String.CANCELLED --> [*]
DELIVERED --> [*] String.RETURNED --> [*]
RETURNED --> [*] String.DELIVERED --> [*]
@enduml @enduml

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="NEW"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="NEW">
<state id="NEW"> <state id="NEW">
<transition target="CHECK_AVAILABILITY" event="PLACE_ORDER"/> <transition target="CHECK_AVAILABILITY" event="String.PLACE_ORDER"/>
</state> </state>
<state id="CHECK_AVAILABILITY"> <state id="CHECK_AVAILABILITY">
<transition target="PENDING_PAYMENT" cond="λ"> <transition target="PENDING_PAYMENT" cond="λ">
@@ -12,19 +12,19 @@
</transition> </transition>
</state> </state>
<state id="PENDING_PAYMENT"> <state id="PENDING_PAYMENT">
<transition target="PAID" event="PAY_ORDER"/> <transition target="PAID" event="String.PAY_ORDER"/>
</state> </state>
<state id="CANCELLED"> <state id="CANCELLED">
</state> </state>
<state id="PAID"> <state id="PAID">
<transition target="SHIPPED" event="SHIP_ORDER"/> <transition target="SHIPPED" event="String.SHIP_ORDER"/>
<transition target="CANCELLED" event="CANCEL_ORDER"/> <transition target="CANCELLED" event="String.CANCEL_ORDER"/>
</state> </state>
<state id="SHIPPED"> <state id="SHIPPED">
<transition target="DELIVERED" event="FINALIZE"/> <transition target="DELIVERED" event="String.FINALIZE"/>
</state> </state>
<state id="DELIVERED"> <state id="DELIVERED">
<transition target="RETURNED" event="RETURN_ORDER"/> <transition target="RETURNED" event="String.RETURN_ORDER"/>
</state> </state>
<state id="RETURNED"> <state id="RETURNED">
</state> </state>

View File

@@ -7,11 +7,11 @@ digraph statemachine {
_start -> INIT_STATE; _start -> INIT_STATE;
CANCELLED [fillcolor=lightgray]; CANCELLED [fillcolor=lightgray];
COMPLETED [fillcolor=lightgray]; COMPLETED [fillcolor=lightgray];
START -> PROCESSING [label="SUBMIT_EVENT", style="solid", color="black"]; START -> PROCESSING [label="String.SUBMIT_EVENT", style="solid", color="black"];
PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"];
PROCESSING -> CANCELLED [label="CANCEL_EVENT", style="solid", color="black"]; PROCESSING -> CANCELLED [label="String.CANCEL_EVENT", style="solid", color="black"];
START -> PROCESSING [label="REACTIVE_EVENT", style="solid", color="black"]; START -> PROCESSING [label="String.REACTIVE_EVENT", style="solid", color="black"];
START -> START [label="AUDIT_EVENT", style="solid", color="black"]; START -> START [label="String.AUDIT_EVENT", style="solid", color="black"];
START -> PROCESSING [label="EXTERNAL_TRIGGER", style="solid", color="black"]; START -> PROCESSING [label="String.EXTERNAL_TRIGGER", style="solid", color="black"];
} }

View File

@@ -1,6 +1,32 @@
{ {
"metadata" : { "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" : [ { "entryPoints" : [ {
"type" : "REST", "type" : "REST",
"name" : "GET /api/base/{id}", "name" : "GET /api/base/{id}",
@@ -32,7 +58,75 @@
"annotations" : [ "PathVariable" ] "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" : { "properties" : {
"default" : { "default" : {
"app.states.initial" : "INIT_STATE" "app.states.initial" : "INIT_STATE"
@@ -44,20 +138,20 @@
}, },
"name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig", "name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "INIT_STATE" ], "startStates" : [ "String.INIT_STATE" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "MyEvents.SUBMIT", "rawName" : "MyEvents.SUBMIT",
"fullIdentifier" : "SUBMIT_EVENT" "fullIdentifier" : "String.SUBMIT_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -66,15 +160,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"COMPLETED\"", "rawName" : "\"COMPLETED\"",
"fullIdentifier" : "COMPLETED" "fullIdentifier" : "String.COMPLETED"
} ], } ],
"event" : { "event" : {
"rawName" : "\"FINISH\"", "rawName" : "\"FINISH\"",
"fullIdentifier" : "FINISH" "fullIdentifier" : "String.FINISH"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -83,15 +177,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"CANCELLED\"", "rawName" : "\"CANCELLED\"",
"fullIdentifier" : "CANCELLED" "fullIdentifier" : "String.CANCELLED"
} ], } ],
"event" : { "event" : {
"rawName" : "MyEvents.CANCEL", "rawName" : "MyEvents.CANCEL",
"fullIdentifier" : "CANCEL_EVENT" "fullIdentifier" : "String.CANCEL_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -100,15 +194,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"REACTIVE_EVENT\"", "rawName" : "\"REACTIVE_EVENT\"",
"fullIdentifier" : "REACTIVE_EVENT" "fullIdentifier" : "String.REACTIVE_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -117,15 +211,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"event" : { "event" : {
"rawName" : "\"AUDIT_EVENT\"", "rawName" : "\"AUDIT_EVENT\"",
"fullIdentifier" : "AUDIT_EVENT" "fullIdentifier" : "String.AUDIT_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -134,19 +228,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"EXTERNAL_TRIGGER\"", "rawName" : "\"EXTERNAL_TRIGGER\"",
"fullIdentifier" : "EXTERNAL_TRIGGER" "fullIdentifier" : "String.EXTERNAL_TRIGGER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "CANCELLED", "COMPLETED" ] "endStates" : [ "String.CANCELLED", "String.COMPLETED" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -21,17 +21,17 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> INIT_STATE [*] --> String.INIT_STATE
START -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT_EVENT String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.SUBMIT_EVENT
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <<external>> : String.FINISH
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_EVENT String.PROCESSING -[#1E90FF,bold]-> String.CANCELLED <<external>> : String.CANCEL_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> : REACTIVE_EVENT String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.REACTIVE_EVENT
START -[#1E90FF,bold]-> START <<external>> : AUDIT_EVENT String.START -[#1E90FF,bold]-> String.START <<external>> : String.AUDIT_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> : EXTERNAL_TRIGGER String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.EXTERNAL_TRIGGER
CANCELLED --> [*] String.CANCELLED --> [*]
COMPLETED --> [*] String.COMPLETED --> [*]
@enduml @enduml

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="INIT_STATE"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="INIT_STATE">
<state id="START"> <state id="START">
<transition target="PROCESSING" event="SUBMIT_EVENT"/> <transition target="PROCESSING" event="String.SUBMIT_EVENT"/>
<transition target="PROCESSING" event="REACTIVE_EVENT"/> <transition target="PROCESSING" event="String.REACTIVE_EVENT"/>
<transition target="START" event="AUDIT_EVENT"/> <transition target="START" event="String.AUDIT_EVENT"/>
<transition target="PROCESSING" event="EXTERNAL_TRIGGER"/> <transition target="PROCESSING" event="String.EXTERNAL_TRIGGER"/>
</state> </state>
<state id="PROCESSING"> <state id="PROCESSING">
<transition target="COMPLETED" event="FINISH"/> <transition target="COMPLETED" event="String.FINISH"/>
<transition target="CANCELLED" event="CANCEL_EVENT"/> <transition target="CANCELLED" event="String.CANCEL_EVENT"/>
</state> </state>
<state id="COMPLETED"> <state id="COMPLETED">
</state> </state>

View File

@@ -7,11 +7,11 @@ digraph statemachine {
_start -> PROD_INITIAL; _start -> PROD_INITIAL;
CANCELLED [fillcolor=lightgray]; CANCELLED [fillcolor=lightgray];
COMPLETED [fillcolor=lightgray]; COMPLETED [fillcolor=lightgray];
START -> PROCESSING [label="SUBMIT_EVENT", style="solid", color="black"]; START -> PROCESSING [label="String.SUBMIT_EVENT", style="solid", color="black"];
PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"];
PROCESSING -> CANCELLED [label="CANCEL_EVENT", style="solid", color="black"]; PROCESSING -> CANCELLED [label="String.CANCEL_EVENT", style="solid", color="black"];
START -> PROCESSING [label="REACTIVE_EVENT", style="solid", color="black"]; START -> PROCESSING [label="String.REACTIVE_EVENT", style="solid", color="black"];
START -> START [label="AUDIT_EVENT", style="solid", color="black"]; START -> START [label="String.AUDIT_EVENT", style="solid", color="black"];
START -> PROCESSING [label="EXTERNAL_TRIGGER", style="solid", color="black"]; START -> PROCESSING [label="String.EXTERNAL_TRIGGER", style="solid", color="black"];
} }

View File

@@ -1,6 +1,32 @@
{ {
"metadata" : { "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" : [ { "entryPoints" : [ {
"type" : "REST", "type" : "REST",
"name" : "GET /api/base/{id}", "name" : "GET /api/base/{id}",
@@ -32,7 +58,75 @@
"annotations" : [ "PathVariable" ] "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" : { "properties" : {
"default" : { "default" : {
"app.states.initial" : "INIT_STATE" "app.states.initial" : "INIT_STATE"
@@ -44,20 +138,20 @@
}, },
"name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig", "name" : "click.kamil.examples.statemachine.extended.config.ExtendedStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "PROD_INITIAL" ], "startStates" : [ "String.PROD_INITIAL" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "MyEvents.SUBMIT", "rawName" : "MyEvents.SUBMIT",
"fullIdentifier" : "SUBMIT_EVENT" "fullIdentifier" : "String.SUBMIT_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -66,15 +160,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"COMPLETED\"", "rawName" : "\"COMPLETED\"",
"fullIdentifier" : "COMPLETED" "fullIdentifier" : "String.COMPLETED"
} ], } ],
"event" : { "event" : {
"rawName" : "\"FINISH\"", "rawName" : "\"FINISH\"",
"fullIdentifier" : "FINISH" "fullIdentifier" : "String.FINISH"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -83,15 +177,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"CANCELLED\"", "rawName" : "\"CANCELLED\"",
"fullIdentifier" : "CANCELLED" "fullIdentifier" : "String.CANCELLED"
} ], } ],
"event" : { "event" : {
"rawName" : "MyEvents.CANCEL", "rawName" : "MyEvents.CANCEL",
"fullIdentifier" : "CANCEL_EVENT" "fullIdentifier" : "String.CANCEL_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -100,15 +194,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"REACTIVE_EVENT\"", "rawName" : "\"REACTIVE_EVENT\"",
"fullIdentifier" : "REACTIVE_EVENT" "fullIdentifier" : "String.REACTIVE_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -117,15 +211,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"event" : { "event" : {
"rawName" : "\"AUDIT_EVENT\"", "rawName" : "\"AUDIT_EVENT\"",
"fullIdentifier" : "AUDIT_EVENT" "fullIdentifier" : "String.AUDIT_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -134,19 +228,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"EXTERNAL_TRIGGER\"", "rawName" : "\"EXTERNAL_TRIGGER\"",
"fullIdentifier" : "EXTERNAL_TRIGGER" "fullIdentifier" : "String.EXTERNAL_TRIGGER"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "CANCELLED", "COMPLETED" ] "endStates" : [ "String.CANCELLED", "String.COMPLETED" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -21,17 +21,17 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> PROD_INITIAL [*] --> String.PROD_INITIAL
START -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT_EVENT String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.SUBMIT_EVENT
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <<external>> : String.FINISH
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_EVENT String.PROCESSING -[#1E90FF,bold]-> String.CANCELLED <<external>> : String.CANCEL_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> : REACTIVE_EVENT String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.REACTIVE_EVENT
START -[#1E90FF,bold]-> START <<external>> : AUDIT_EVENT String.START -[#1E90FF,bold]-> String.START <<external>> : String.AUDIT_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> : EXTERNAL_TRIGGER String.START -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.EXTERNAL_TRIGGER
CANCELLED --> [*] String.CANCELLED --> [*]
COMPLETED --> [*] String.COMPLETED --> [*]
@enduml @enduml

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="PROD_INITIAL"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="PROD_INITIAL">
<state id="START"> <state id="START">
<transition target="PROCESSING" event="SUBMIT_EVENT"/> <transition target="PROCESSING" event="String.SUBMIT_EVENT"/>
<transition target="PROCESSING" event="REACTIVE_EVENT"/> <transition target="PROCESSING" event="String.REACTIVE_EVENT"/>
<transition target="START" event="AUDIT_EVENT"/> <transition target="START" event="String.AUDIT_EVENT"/>
<transition target="PROCESSING" event="EXTERNAL_TRIGGER"/> <transition target="PROCESSING" event="String.EXTERNAL_TRIGGER"/>
</state> </state>
<state id="PROCESSING"> <state id="PROCESSING">
<transition target="COMPLETED" event="FINISH"/> <transition target="COMPLETED" event="String.FINISH"/>
<transition target="CANCELLED" event="CANCEL_EVENT"/> <transition target="CANCELLED" event="String.CANCEL_EVENT"/>
</state> </state>
<state id="COMPLETED"> <state id="COMPLETED">
</state> </state>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F1StateMachineConfiguration", "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F1StateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT10", "rawName" : "Events.EVENT10",
"fullIdentifier" : "Events.EVENT10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT10"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT11", "rawName" : "Events.EVENT11",
"fullIdentifier" : "Events.EVENT11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT11"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT12", "rawName" : "Events.EVENT12",
"fullIdentifier" : "Events.EVENT12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT12"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT13", "rawName" : "Events.EVENT13",
"fullIdentifier" : "Events.EVENT13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT13"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT14", "rawName" : "Events.EVENT14",
"fullIdentifier" : "Events.EVENT14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT14"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT15", "rawName" : "Events.EVENT15",
"fullIdentifier" : "Events.EVENT15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT15"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,15 +271,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -288,15 +288,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -305,15 +305,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -322,15 +322,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -339,15 +339,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -356,15 +356,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -373,11 +373,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEX", "rawName" : "States.STATEX",
"fullIdentifier" : "States.STATEX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -394,11 +394,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEZ", "rawName" : "States.STATEZ",
"fullIdentifier" : "States.STATEZ" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -408,11 +408,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -429,11 +429,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -450,11 +450,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -464,11 +464,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -485,11 +485,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -499,11 +499,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -520,11 +520,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -534,11 +534,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -555,11 +555,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -569,11 +569,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -590,11 +590,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -604,11 +604,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -625,11 +625,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -646,11 +646,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -660,11 +660,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -681,11 +681,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -695,11 +695,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -716,11 +716,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -730,11 +730,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -751,11 +751,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -772,11 +772,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -786,11 +786,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -807,11 +807,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -821,15 +821,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTX", "rawName" : "Events.EVENTX",
"fullIdentifier" : "Events.EVENTX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTX"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -838,11 +838,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -859,11 +859,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -873,15 +873,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_3", "rawName" : "States.STATE_EXTRA_3",
"fullIdentifier" : "States.STATE_EXTRA_3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -890,15 +890,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL_2", "rawName" : "Events.EVENT_CANCEL_2",
"fullIdentifier" : "Events.EVENT_CANCEL_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -907,19 +907,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_2", "rawName" : "States.STATE_EXTRA_2",
"fullIdentifier" : "States.STATE_EXTRA_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL_2", "rawName" : "Events.EVENT_CANCEL_2",
"fullIdentifier" : "Events.EVENT_CANCEL_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.STATEZ" ] "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 208 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1
state States.STATEY <<choice>> state States.STATEY <<choice>>
state States.STATE16 <<choice>> state States.STATE16 <<choice>>
@@ -89,6 +89,6 @@ States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> : Event
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
States.STATEZ --> [*] click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*]
@enduml @enduml

View File

@@ -160,5 +160,9 @@
<state id="STATE_EXTRA_2"> <state id="STATE_EXTRA_2">
<transition target="CANCEL" event="Events.EVENT_CANCEL_2"/> <transition target="CANCEL" event="Events.EVENT_CANCEL_2"/>
</state> </state>
<state id="STATE1">
</state>
<state id="STATEZ">
</state>
</scxml> </scxml>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F2StateMachineConfiguration", "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F2StateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT10", "rawName" : "Events.EVENT10",
"fullIdentifier" : "Events.EVENT10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT10"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT11", "rawName" : "Events.EVENT11",
"fullIdentifier" : "Events.EVENT11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT11"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT12", "rawName" : "Events.EVENT12",
"fullIdentifier" : "Events.EVENT12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT12"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT13", "rawName" : "Events.EVENT13",
"fullIdentifier" : "Events.EVENT13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT13"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT14", "rawName" : "Events.EVENT14",
"fullIdentifier" : "Events.EVENT14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT14"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT15", "rawName" : "Events.EVENT15",
"fullIdentifier" : "Events.EVENT15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT15"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,15 +271,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -288,15 +288,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -305,15 +305,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -322,15 +322,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -339,15 +339,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -356,15 +356,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -373,11 +373,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEX", "rawName" : "States.STATEX",
"fullIdentifier" : "States.STATEX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -394,11 +394,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEZ", "rawName" : "States.STATEZ",
"fullIdentifier" : "States.STATEZ" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -408,11 +408,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -429,11 +429,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -450,11 +450,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -464,11 +464,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -485,11 +485,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -499,11 +499,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -520,11 +520,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -534,11 +534,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -555,11 +555,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -569,11 +569,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -590,11 +590,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -604,11 +604,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE13"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -625,11 +625,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -646,11 +646,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE15"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -660,11 +660,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -681,11 +681,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE11"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -695,11 +695,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE12"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -716,11 +716,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -730,11 +730,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -751,11 +751,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -772,11 +772,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -786,11 +786,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -807,11 +807,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -821,15 +821,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1_1", "rawName" : "States.STATE_EXTRA_1_1",
"fullIdentifier" : "States.STATE_EXTRA_1_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_1"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_1", "rawName" : "Events.EVENT_1_1",
"fullIdentifier" : "Events.EVENT_1_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -838,11 +838,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1_2", "rawName" : "States.STATE_EXTRA_1_2",
"fullIdentifier" : "States.STATE_EXTRA_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1_1", "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, "event" : null,
"guards" : [ { "guards" : [ {
@@ -859,11 +859,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1_2", "rawName" : "States.STATE_EXTRA_1_2",
"fullIdentifier" : "States.STATE_EXTRA_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1_3", "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, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -873,15 +873,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1_3", "rawName" : "States.STATE_EXTRA_1_3",
"fullIdentifier" : "States.STATE_EXTRA_1_3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_2", "rawName" : "Events.EVENT_1_2",
"fullIdentifier" : "Events.EVENT_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -890,15 +890,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1_1", "rawName" : "States.STATE_EXTRA_1_1",
"fullIdentifier" : "States.STATE_EXTRA_1_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL_2", "rawName" : "Events.EVENT_CANCEL_2",
"fullIdentifier" : "Events.EVENT_CANCEL_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -907,15 +907,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1_2", "rawName" : "States.STATE_EXTRA_1_2",
"fullIdentifier" : "States.STATE_EXTRA_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL_2", "rawName" : "Events.EVENT_CANCEL_2",
"fullIdentifier" : "Events.EVENT_CANCEL_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -924,19 +924,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL_2", "rawName" : "Events.EVENT_CANCEL_2",
"fullIdentifier" : "Events.EVENT_CANCEL_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.STATEZ" ] "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 208 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1
state States.STATEY <<choice>> state States.STATEY <<choice>>
state States.STATE16 <<choice>> state States.STATE16 <<choice>>
@@ -90,6 +90,6 @@ States.STATE_EXTRA_1_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVE
States.STATE_EXTRA_1_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_1_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2 States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
States.STATEZ --> [*] click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*]
@enduml @enduml

View File

@@ -163,5 +163,9 @@
<state id="STATE_EXTRA_1"> <state id="STATE_EXTRA_1">
<transition target="CANCEL" event="Events.EVENT_CANCEL_2"/> <transition target="CANCEL" event="Events.EVENT_CANCEL_2"/>
</state> </state>
<state id="STATE1">
</state>
<state id="STATEZ">
</state>
</scxml> </scxml>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.forkjoin.ForkJoinStateMachineConfig", "name" : "click.kamil.examples.statemachine.forkjoin.ForkJoinStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.START" ], "startStates" : [ "ForkJoinStateMachineConfig.States.START" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.START", "rawName" : "States.START",
"fullIdentifier" : "States.START" "fullIdentifier" : "ForkJoinStateMachineConfig.States.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.FORK", "rawName" : "States.FORK",
"fullIdentifier" : "States.FORK" "fullIdentifier" : "ForkJoinStateMachineConfig.States.FORK"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.TO_FORK", "rawName" : "Events.TO_FORK",
"fullIdentifier" : "Events.TO_FORK" "fullIdentifier" : "ForkJoinStateMachineConfig.Events.TO_FORK"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,14 +33,14 @@
"type" : "FORK", "type" : "FORK",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.FORK", "rawName" : "States.FORK",
"fullIdentifier" : "States.FORK" "fullIdentifier" : "ForkJoinStateMachineConfig.States.FORK"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.REGION1_STATE1", "rawName" : "States.REGION1_STATE1",
"fullIdentifier" : "States.REGION1_STATE1" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE1"
}, { }, {
"rawName" : "States.REGION2_STATE1", "rawName" : "States.REGION2_STATE1",
"fullIdentifier" : "States.REGION2_STATE1" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.REGION1_STATE1", "rawName" : "States.REGION1_STATE1",
"fullIdentifier" : "States.REGION1_STATE1" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.REGION1_STATE2", "rawName" : "States.REGION1_STATE2",
"fullIdentifier" : "States.REGION1_STATE2" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.R1_NEXT", "rawName" : "Events.R1_NEXT",
"fullIdentifier" : "Events.R1_NEXT" "fullIdentifier" : "ForkJoinStateMachineConfig.Events.R1_NEXT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.REGION2_STATE1", "rawName" : "States.REGION2_STATE1",
"fullIdentifier" : "States.REGION2_STATE1" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.REGION2_STATE2", "rawName" : "States.REGION2_STATE2",
"fullIdentifier" : "States.REGION2_STATE2" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.R2_NEXT", "rawName" : "Events.R2_NEXT",
"fullIdentifier" : "Events.R2_NEXT" "fullIdentifier" : "ForkJoinStateMachineConfig.Events.R2_NEXT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,14 +84,14 @@
"type" : "JOIN", "type" : "JOIN",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.REGION1_STATE2", "rawName" : "States.REGION1_STATE2",
"fullIdentifier" : "States.REGION1_STATE2" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION1_STATE2"
}, { }, {
"rawName" : "States.REGION2_STATE2", "rawName" : "States.REGION2_STATE2",
"fullIdentifier" : "States.REGION2_STATE2" "fullIdentifier" : "ForkJoinStateMachineConfig.States.REGION2_STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.JOIN", "rawName" : "States.JOIN",
"fullIdentifier" : "States.JOIN" "fullIdentifier" : "ForkJoinStateMachineConfig.States.JOIN"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -101,19 +101,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.JOIN", "rawName" : "States.JOIN",
"fullIdentifier" : "States.JOIN" "fullIdentifier" : "ForkJoinStateMachineConfig.States.JOIN"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.END", "rawName" : "States.END",
"fullIdentifier" : "States.END" "fullIdentifier" : "ForkJoinStateMachineConfig.States.END"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.TO_END", "rawName" : "Events.TO_END",
"fullIdentifier" : "Events.TO_END" "fullIdentifier" : "ForkJoinStateMachineConfig.Events.TO_END"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.END" ] "endStates" : [ "ForkJoinStateMachineConfig.States.END" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.START [*] --> ForkJoinStateMachineConfig.States.START
States.START -[#1E90FF,bold]-> States.FORK <<external>> : Events.TO_FORK States.START -[#1E90FF,bold]-> States.FORK <<external>> : Events.TO_FORK
@@ -33,6 +33,6 @@ States.REGION1_STATE2 -[#8A2BE2,bold]-> States.JOIN <<join>>
States.REGION2_STATE2 -[#8A2BE2,bold]-> States.JOIN <<join>> States.REGION2_STATE2 -[#8A2BE2,bold]-> States.JOIN <<join>>
States.JOIN -[#1E90FF,bold]-> States.END <<external>> : Events.TO_END States.JOIN -[#1E90FF,bold]-> States.END <<external>> : Events.TO_END
States.END --> [*] ForkJoinStateMachineConfig.States.END --> [*]
@enduml @enduml

View File

@@ -24,5 +24,9 @@
</state> </state>
<state id="END"> <state id="END">
</state> </state>
<state id="START">
</state>
<state id="END">
</state>
</scxml> </scxml>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G1StateMachineConfiguration", "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G1StateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,11 +271,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEX", "rawName" : "States.STATEX",
"fullIdentifier" : "States.STATEX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -292,11 +292,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEZ", "rawName" : "States.STATEZ",
"fullIdentifier" : "States.STATEZ" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -306,11 +306,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -327,11 +327,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -348,11 +348,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -362,11 +362,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -383,11 +383,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -397,15 +397,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_2", "rawName" : "States.STATE_EXTRA_2",
"fullIdentifier" : "States.STATE_EXTRA_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_2", "rawName" : "Events.EVENT_1_2",
"fullIdentifier" : "Events.EVENT_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -414,15 +414,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_2", "rawName" : "States.STATE_EXTRA_2",
"fullIdentifier" : "States.STATE_EXTRA_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_3", "rawName" : "States.STATE_EXTRA_3",
"fullIdentifier" : "States.STATE_EXTRA_3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_2", "rawName" : "Events.EVENT_1_2",
"fullIdentifier" : "Events.EVENT_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -431,19 +431,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_3", "rawName" : "States.STATE_EXTRA_3",
"fullIdentifier" : "States.STATE_EXTRA_3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.STATEZ" ] "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1
state States.STATEY <<choice>> state States.STATEY <<choice>>
state States.STATE9 <<choice>> state States.STATE9 <<choice>>
@@ -53,6 +53,6 @@ States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> : Events.EVENT
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> : Events.EVENT_1_2 States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> : Events.EVENT_1_2
States.STATE_EXTRA_3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL States.STATE_EXTRA_3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
States.STATEZ --> [*] click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*]
@enduml @enduml

View File

@@ -71,5 +71,9 @@
<state id="STATE_EXTRA_3"> <state id="STATE_EXTRA_3">
<transition target="CANCEL" event="Events.EVENT_CANCEL"/> <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
</state> </state>
<state id="STATE1">
</state>
<state id="STATEZ">
</state>
</scxml> </scxml>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G2StateMachineConfiguration", "name" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.G2StateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,11 +271,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEX", "rawName" : "States.STATEX",
"fullIdentifier" : "States.STATEX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEX"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -292,11 +292,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEZ", "rawName" : "States.STATEZ",
"fullIdentifier" : "States.STATEZ" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -306,11 +306,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -327,11 +327,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -348,11 +348,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -362,11 +362,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -383,11 +383,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -397,15 +397,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_2", "rawName" : "Events.EVENT_1_2",
"fullIdentifier" : "Events.EVENT_1_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -414,15 +414,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_2", "rawName" : "States.STATE_EXTRA_2",
"fullIdentifier" : "States.STATE_EXTRA_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_1_3", "rawName" : "Events.EVENT_1_3",
"fullIdentifier" : "Events.EVENT_1_3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_1_3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -431,15 +431,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -448,19 +448,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE_EXTRA_2", "rawName" : "States.STATE_EXTRA_2",
"fullIdentifier" : "States.STATE_EXTRA_2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE_EXTRA_2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.CANCEL", "rawName" : "States.CANCEL",
"fullIdentifier" : "States.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.CANCEL"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT_CANCEL", "rawName" : "Events.EVENT_CANCEL",
"fullIdentifier" : "Events.EVENT_CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.Events.EVENT_CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.STATEZ" ] "endStates" : [ "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATE1
state States.STATEY <<choice>> state States.STATEY <<choice>>
state States.STATE9 <<choice>> state States.STATE9 <<choice>>
@@ -54,6 +54,6 @@ States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> : Event
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
States.STATEZ --> [*] click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.States.STATEZ --> [*]
@enduml @enduml

View File

@@ -72,5 +72,9 @@
<state id="STATE_EXTRA_2"> <state id="STATE_EXTRA_2">
<transition target="CANCEL" event="Events.EVENT_CANCEL"/> <transition target="CANCEL" event="Events.EVENT_CANCEL"/>
</state> </state>
<state id="STATE1">
</state>
<state id="STATEZ">
</state>
</scxml> </scxml>

View File

@@ -6,6 +6,6 @@ digraph statemachine {
_start [shape=circle, label="", fillcolor=black, width=0.1]; _start [shape=circle, label="", fillcolor=black, width=0.1];
_start -> START; _start -> START;
WORKING [fillcolor=lightgray]; WORKING [fillcolor=lightgray];
START -> WORKING [label="INHERITED_SUBMIT", style="solid", color="black"]; START -> WORKING [label="String.INHERITED_SUBMIT", style="solid", color="black"];
} }

View File

@@ -1,113 +1,32 @@
{ {
"metadata" : { "metadata" : {
"triggers" : [ { "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
} ],
"entryPoints" : [ ], "entryPoints" : [ ],
"callChains" : [ { "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"
} ]
} ],
"properties" : { "properties" : {
"default" : { } "default" : { }
} }
}, },
"name" : "click.kamil.examples.statemachine.inheritance.config.InheritanceStateMachineConfig", "name" : "click.kamil.examples.statemachine.inheritance.config.InheritanceStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "START" ], "startStates" : [ "String.START" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"START\"", "rawName" : "\"START\"",
"fullIdentifier" : "START" "fullIdentifier" : "String.START"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"WORKING\"", "rawName" : "\"WORKING\"",
"fullIdentifier" : "WORKING" "fullIdentifier" : "String.WORKING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"INHERITED_SUBMIT\"", "rawName" : "\"INHERITED_SUBMIT\"",
"fullIdentifier" : "INHERITED_SUBMIT" "fullIdentifier" : "String.INHERITED_SUBMIT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "WORKING" ] "endStates" : [ "String.WORKING" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -21,11 +21,11 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> START [*] --> String.START
START -[#1E90FF,bold]-> WORKING <<external>> : INHERITED_SUBMIT String.START -[#1E90FF,bold]-> String.WORKING <<external>> : String.INHERITED_SUBMIT
WORKING --> [*] String.WORKING --> [*]
@enduml @enduml

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="START"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="START">
<state id="START"> <state id="START">
<transition target="WORKING" event="INHERITED_SUBMIT"/> <transition target="WORKING" event="String.INHERITED_SUBMIT"/>
</state> </state>
<state id="WORKING"> <state id="WORKING">
</state> </state>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration", "name" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "OrderStates.SUBMITTED" ], "startStates" : [ "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.PAY", "rawName" : "OrderEvents.PAY",
"fullIdentifier" : "OrderEvents.PAY" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.PAY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.FULFILLED", "rawName" : "OrderStates.FULFILLED",
"fullIdentifier" : "OrderStates.FULFILLED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.FULFILL", "rawName" : "OrderEvents.FULFILL",
"fullIdentifier" : "OrderEvents.FULFILL" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.FULFILL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "OrderEvents.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.CANCEL"
}, },
"guards" : [ { "guards" : [ {
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n", "expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
@@ -74,15 +74,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "OrderEvents.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -91,12 +91,12 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ ], "targetStates" : [ ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -105,15 +105,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -122,11 +122,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -143,11 +143,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID3", "rawName" : "OrderStates.PAID3",
"fullIdentifier" : "OrderStates.PAID3" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID3"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -164,11 +164,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.HAPPEN", "rawName" : "OrderStates.HAPPEN",
"fullIdentifier" : "OrderStates.HAPPEN" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.HAPPEN"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -185,11 +185,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -199,11 +199,11 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -213,11 +213,11 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID3", "rawName" : "OrderStates.PAID3",
"fullIdentifier" : "OrderStates.PAID3" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -227,12 +227,12 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderStates.PAID2"
} ], } ],
"targetStates" : [ ], "targetStates" : [ ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.enumstate.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ { "actions" : [ {
@@ -252,5 +252,5 @@
} ], } ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] "endStates" : [ "click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED", "click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> OrderStates.SUBMITTED [*] --> click.kamil.examples.statemachine.enumstate.OrderStates.SUBMITTED
state OrderStates.PAID1 <<choice>> state OrderStates.PAID1 <<choice>>
@@ -39,7 +39,7 @@ OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <<external>> : OrderEvents.ABCD / λ, action2 OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <<external>> : OrderEvents.ABCD / λ, action2
OrderStates.CANCELED --> [*] click.kamil.examples.statemachine.enumstate.OrderStates.CANCELED --> [*]
OrderStates.FULFILLED --> [*] click.kamil.examples.statemachine.enumstate.OrderStates.FULFILLED --> [*]
@enduml @enduml

View File

@@ -37,5 +37,11 @@
</state> </state>
<state id="HAPPEN"> <state id="HAPPEN">
</state> </state>
<state id="SUBMITTED">
</state>
<state id="CANCELED">
</state>
<state id="FULFILLED">
</state>
</scxml> </scxml>

View File

@@ -6,7 +6,7 @@ digraph statemachine {
_start [shape=circle, label="", fillcolor=black, width=0.1]; _start [shape=circle, label="", fillcolor=black, width=0.1];
_start -> INIT; _start -> INIT;
DONE [fillcolor=lightgray]; DONE [fillcolor=lightgray];
INIT -> BUSY [label="SUBMIT / loggingAction()", style="solid", color="black"]; INIT -> BUSY [label="String.SUBMIT / loggingAction()", style="solid", color="black"];
BUSY -> DONE [label="ORDER_EVENT", style="solid", color="black"]; BUSY -> DONE [label="String.ORDER_EVENT", style="solid", color="black"];
} }

View File

@@ -2,141 +2,27 @@
"metadata" : { "metadata" : {
"triggers" : [ ], "triggers" : [ ],
"entryPoints" : [ ], "entryPoints" : [ ],
"callChains" : [ { "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"
} ]
} ],
"properties" : { "properties" : {
"default" : { } "default" : { }
} }
}, },
"name" : "click.kamil.maven.core.MavenOrderStateMachine", "name" : "click.kamil.maven.core.MavenOrderStateMachine",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "INIT" ], "startStates" : [ "String.INIT" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"INIT\"", "rawName" : "\"INIT\"",
"fullIdentifier" : "INIT" "fullIdentifier" : "String.INIT"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"BUSY\"", "rawName" : "\"BUSY\"",
"fullIdentifier" : "BUSY" "fullIdentifier" : "String.BUSY"
} ], } ],
"event" : { "event" : {
"rawName" : "\"SUBMIT\"", "rawName" : "\"SUBMIT\"",
"fullIdentifier" : "SUBMIT" "fullIdentifier" : "String.SUBMIT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ { "actions" : [ {
@@ -152,19 +38,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"BUSY\"", "rawName" : "\"BUSY\"",
"fullIdentifier" : "BUSY" "fullIdentifier" : "String.BUSY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"DONE\"", "rawName" : "\"DONE\"",
"fullIdentifier" : "DONE" "fullIdentifier" : "String.DONE"
} ], } ],
"event" : { "event" : {
"rawName" : "\"ORDER_EVENT\"", "rawName" : "\"ORDER_EVENT\"",
"fullIdentifier" : "ORDER_EVENT" "fullIdentifier" : "String.ORDER_EVENT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "DONE" ] "endStates" : [ "String.DONE" ]
} }

View File

@@ -21,12 +21,12 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> INIT [*] --> String.INIT
INIT -[#1E90FF,bold]-> BUSY <<external>> : SUBMIT / loggingAction() String.INIT -[#1E90FF,bold]-> String.BUSY <<external>> : String.SUBMIT / loggingAction()
BUSY -[#1E90FF,bold]-> DONE <<external>> : ORDER_EVENT String.BUSY -[#1E90FF,bold]-> String.DONE <<external>> : String.ORDER_EVENT
DONE --> [*] String.DONE --> [*]
@enduml @enduml

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="INIT"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="INIT">
<state id="INIT"> <state id="INIT">
<transition target="BUSY" event="SUBMIT"/> <transition target="BUSY" event="String.SUBMIT"/>
</state> </state>
<state id="BUSY"> <state id="BUSY">
<transition target="DONE" event="ORDER_EVENT"/> <transition target="DONE" event="String.ORDER_EVENT"/>
</state> </state>
<state id="DONE"> <state id="DONE">
</state> </state>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.inheritancestate.OneStateMachineConfiguration", "name" : "click.kamil.examples.statemachine.inheritancestate.OneStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "States.STATE1" ], "startStates" : [ "click.kamil.examples.statemachine.inheritancestate.States.STATE1" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE2"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT1", "rawName" : "Events.EVENT1",
"fullIdentifier" : "Events.EVENT1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT1"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE2", "rawName" : "States.STATE2",
"fullIdentifier" : "States.STATE2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE3"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT2", "rawName" : "Events.EVENT2",
"fullIdentifier" : "Events.EVENT2" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT2"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE3", "rawName" : "States.STATE3",
"fullIdentifier" : "States.STATE3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT3", "rawName" : "Events.EVENT3",
"fullIdentifier" : "Events.EVENT3" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT3"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -67,15 +67,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT4", "rawName" : "Events.EVENT4",
"fullIdentifier" : "Events.EVENT4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT4"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -84,15 +84,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT5", "rawName" : "Events.EVENT5",
"fullIdentifier" : "Events.EVENT5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT5"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -101,15 +101,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT6", "rawName" : "Events.EVENT6",
"fullIdentifier" : "Events.EVENT6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT6"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -118,15 +118,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT7", "rawName" : "Events.EVENT7",
"fullIdentifier" : "Events.EVENT7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT7"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -135,15 +135,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT8", "rawName" : "Events.EVENT8",
"fullIdentifier" : "Events.EVENT8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT8"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -152,15 +152,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT9", "rawName" : "Events.EVENT9",
"fullIdentifier" : "Events.EVENT9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT9"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -169,15 +169,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT10", "rawName" : "Events.EVENT10",
"fullIdentifier" : "Events.EVENT10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT10"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -186,15 +186,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT11", "rawName" : "Events.EVENT11",
"fullIdentifier" : "Events.EVENT11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT11"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -203,15 +203,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT12", "rawName" : "Events.EVENT12",
"fullIdentifier" : "Events.EVENT12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT12"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -220,15 +220,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT13", "rawName" : "Events.EVENT13",
"fullIdentifier" : "Events.EVENT13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT13"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -237,15 +237,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT14", "rawName" : "Events.EVENT14",
"fullIdentifier" : "Events.EVENT14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT14"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -254,15 +254,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENT15", "rawName" : "Events.EVENT15",
"fullIdentifier" : "Events.EVENT15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENT15"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -271,15 +271,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE4", "rawName" : "States.STATE4",
"fullIdentifier" : "States.STATE4" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE4"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTY", "rawName" : "Events.EVENTY",
"fullIdentifier" : "Events.EVENTY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENTY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -288,11 +288,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEX", "rawName" : "States.STATEX",
"fullIdentifier" : "States.STATEX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEX"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -309,11 +309,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATEY", "rawName" : "States.STATEY",
"fullIdentifier" : "States.STATEY" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEY"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATEZ", "rawName" : "States.STATEZ",
"fullIdentifier" : "States.STATEZ" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATEZ"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -323,11 +323,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -344,11 +344,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -365,11 +365,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -379,11 +379,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -400,11 +400,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE17", "rawName" : "States.STATE17",
"fullIdentifier" : "States.STATE17" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE17"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -414,11 +414,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -435,11 +435,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE18", "rawName" : "States.STATE18",
"fullIdentifier" : "States.STATE18" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE18"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -449,11 +449,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -470,11 +470,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE19", "rawName" : "States.STATE19",
"fullIdentifier" : "States.STATE19" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE19"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -484,11 +484,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -505,11 +505,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE20", "rawName" : "States.STATE20",
"fullIdentifier" : "States.STATE20" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE20"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE1", "rawName" : "States.STATE1",
"fullIdentifier" : "States.STATE1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -519,11 +519,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE13", "rawName" : "States.STATE13",
"fullIdentifier" : "States.STATE13" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE13"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -540,11 +540,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -561,11 +561,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE15", "rawName" : "States.STATE15",
"fullIdentifier" : "States.STATE15" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE15"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -575,11 +575,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -596,11 +596,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE11", "rawName" : "States.STATE11",
"fullIdentifier" : "States.STATE11" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE11"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -610,11 +610,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE12", "rawName" : "States.STATE12",
"fullIdentifier" : "States.STATE12" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE12"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -631,11 +631,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE14", "rawName" : "States.STATE14",
"fullIdentifier" : "States.STATE14" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE14"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE16", "rawName" : "States.STATE16",
"fullIdentifier" : "States.STATE16" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE16"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -645,11 +645,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -666,11 +666,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE7", "rawName" : "States.STATE7",
"fullIdentifier" : "States.STATE7" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE7"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -687,11 +687,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE6", "rawName" : "States.STATE6",
"fullIdentifier" : "States.STATE6" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE6"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -701,11 +701,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE9", "rawName" : "States.STATE9",
"fullIdentifier" : "States.STATE9" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE9"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -722,11 +722,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE8", "rawName" : "States.STATE8",
"fullIdentifier" : "States.STATE8" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE8"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE10", "rawName" : "States.STATE10",
"fullIdentifier" : "States.STATE10" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE10"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -736,19 +736,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "States.STATE5", "rawName" : "States.STATE5",
"fullIdentifier" : "States.STATE5" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE5"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "States.STATE_EXTRA_1", "rawName" : "States.STATE_EXTRA_1",
"fullIdentifier" : "States.STATE_EXTRA_1" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.States.STATE_EXTRA_1"
} ], } ],
"event" : { "event" : {
"rawName" : "Events.EVENTX", "rawName" : "Events.EVENTX",
"fullIdentifier" : "Events.EVENTX" "fullIdentifier" : "click.kamil.examples.statemachine.inheritancestate.Events.EVENTX"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "States.STATEZ" ] "endStates" : [ "click.kamil.examples.statemachine.inheritancestate.States.STATEZ" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 176 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> States.STATE1 [*] --> click.kamil.examples.statemachine.inheritancestate.States.STATE1
state States.STATEY <<choice>> state States.STATEY <<choice>>
state States.STATE16 <<choice>> state States.STATE16 <<choice>>
@@ -78,6 +78,6 @@ States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals(
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1) States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX
States.STATEZ --> [*] click.kamil.examples.statemachine.inheritancestate.States.STATEZ --> [*]
@enduml @enduml

View File

@@ -140,5 +140,9 @@
</state> </state>
<state id="STATE_EXTRA_1"> <state id="STATE_EXTRA_1">
</state> </state>
<state id="STATE1">
</state>
<state id="STATEZ">
</state>
</scxml> </scxml>

View File

@@ -6,7 +6,7 @@ digraph statemachine {
_start [shape=circle, label="", fillcolor=black, width=0.1]; _start [shape=circle, label="", fillcolor=black, width=0.1];
_start -> NEW; _start -> NEW;
COMPLETED [fillcolor=lightgray]; COMPLETED [fillcolor=lightgray];
NEW -> PROCESSING [label="SUBMIT / processAction()", style="solid", color="black"]; NEW -> PROCESSING [label="String.SUBMIT / processAction()", style="solid", color="black"];
PROCESSING -> COMPLETED [label="FINISH", style="solid", color="black"]; PROCESSING -> COMPLETED [label="String.FINISH", style="solid", color="black"];
} }

View File

@@ -1,19 +1,6 @@
{ {
"metadata" : { "metadata" : {
"triggers" : [ { "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
} ],
"entryPoints" : [ { "entryPoints" : [ {
"type" : "REST", "type" : "REST",
"name" : "POST /orders/submit", "name" : "POST /orders/submit",
@@ -45,103 +32,27 @@
"annotations" : [ "RequestBody" ] "annotations" : [ "RequestBody" ]
} ] } ]
} ], } ],
"callChains" : [ { "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"
} ]
} ],
"properties" : { "properties" : {
"default" : { } "default" : { }
} }
}, },
"name" : "click.kamil.multi.core.OrderStateMachineConfig", "name" : "click.kamil.multi.core.OrderStateMachineConfig",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "NEW" ], "startStates" : [ "String.NEW" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"NEW\"", "rawName" : "\"NEW\"",
"fullIdentifier" : "NEW" "fullIdentifier" : "String.NEW"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"event" : { "event" : {
"rawName" : "\"SUBMIT\"", "rawName" : "\"SUBMIT\"",
"fullIdentifier" : "SUBMIT" "fullIdentifier" : "String.SUBMIT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ { "actions" : [ {
@@ -157,19 +68,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "\"PROCESSING\"", "rawName" : "\"PROCESSING\"",
"fullIdentifier" : "PROCESSING" "fullIdentifier" : "String.PROCESSING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "\"COMPLETED\"", "rawName" : "\"COMPLETED\"",
"fullIdentifier" : "COMPLETED" "fullIdentifier" : "String.COMPLETED"
} ], } ],
"event" : { "event" : {
"rawName" : "\"FINISH\"", "rawName" : "\"FINISH\"",
"fullIdentifier" : "FINISH" "fullIdentifier" : "String.FINISH"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "COMPLETED" ] "endStates" : [ "String.COMPLETED" ]
} }

View File

@@ -21,12 +21,12 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> NEW [*] --> String.NEW
NEW -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT / processAction() String.NEW -[#1E90FF,bold]-> String.PROCESSING <<external>> : String.SUBMIT / processAction()
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH String.PROCESSING -[#1E90FF,bold]-> String.COMPLETED <<external>> : String.FINISH
COMPLETED --> [*] String.COMPLETED --> [*]
@enduml @enduml

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="NEW"> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="NEW">
<state id="NEW"> <state id="NEW">
<transition target="PROCESSING" event="SUBMIT"/> <transition target="PROCESSING" event="String.SUBMIT"/>
</state> </state>
<state id="PROCESSING"> <state id="PROCESSING">
<transition target="COMPLETED" event="FINISH"/> <transition target="COMPLETED" event="String.FINISH"/>
</state> </state>
<state id="COMPLETED"> <state id="COMPLETED">
</state> </state>

View File

@@ -1,7 +1,7 @@
{ {
"metadata" : { "metadata" : {
"triggers" : [ { "triggers" : [ {
"event" : "OrderEvent.PAY", "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher", "className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder", "methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -14,7 +14,7 @@
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, { }, {
"event" : "OrderEvent.SHIP", "event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher", "className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder", "methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -26,71 +26,6 @@
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "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", "event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher", "className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -98,145 +33,14 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null, "sourceModule" : null,
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : "ORDER", "sourceState" : "click.kamil.enterprise.machines.order.OrderState.ORDER",
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : null, "polymorphicEvents" : null,
"external" : false, "external" : false,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)", "constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false "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" : [ { "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", "type" : "REST",
"name" : "POST /api/machine/{machineType}/transition/{event}", "name" : "POST /api/machine/{machineType}/transition/{event}",
"className" : "click.kamil.enterprise.web.StateMachineController", "className" : "click.kamil.enterprise.web.StateMachineController",
@@ -279,7 +83,7 @@
}, },
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ], "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ],
"triggerPoint" : { "triggerPoint" : {
"event" : "OrderEvent.PAY", "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher", "className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder", "methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -287,16 +91,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 30, "lineNumber" : 30,
"polymorphicEvents" : [ "OrderEvent.PAY" ], "polymorphicEvents" : [ "click.kamil.enterprise.machines.order.OrderEvent.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderState.NEW", "sourceState" : "click.kamil.enterprise.machines.order.OrderState.NEW",
"targetState" : "OrderState.PENDING", "targetState" : "click.kamil.enterprise.machines.order.OrderState.PENDING",
"event" : "OrderEvent.PAY" "event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -317,7 +121,7 @@
}, },
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ], "methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ],
"triggerPoint" : { "triggerPoint" : {
"event" : "OrderEvent.SHIP", "event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher", "className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder", "methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -325,187 +129,17 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 37, "lineNumber" : 37,
"polymorphicEvents" : [ "OrderEvent.SHIP" ], "polymorphicEvents" : [ "click.kamil.enterprise.machines.order.OrderEvent.SHIP" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderState.PENDING", "sourceState" : "click.kamil.enterprise.machines.order.OrderState.PENDING",
"targetState" : "OrderState.SHIPPED", "targetState" : "click.kamil.enterprise.machines.order.OrderState.SHIPPED",
"event" : "OrderEvent.SHIP" "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" : { "entryPoint" : {
"type" : "REST", "type" : "REST",
@@ -539,7 +173,7 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java", "sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null, "sourceModule" : null,
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : "ORDER", "sourceState" : "click.kamil.enterprise.machines.order.OrderState.ORDER",
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ], "polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true, "external" : true,
@@ -548,90 +182,6 @@
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : 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" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"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" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
} ], } ],
"properties" : { "properties" : {
"default" : { } "default" : { }
@@ -639,20 +189,20 @@
}, },
"name" : "click.kamil.enterprise.machines.order.OrderStateMachineConfiguration", "name" : "click.kamil.enterprise.machines.order.OrderStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "OrderState.NEW" ], "startStates" : [ "click.kamil.enterprise.machines.order.OrderState.NEW" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderState.NEW", "rawName" : "OrderState.NEW",
"fullIdentifier" : "OrderState.NEW" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.NEW"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderState.PENDING", "rawName" : "OrderState.PENDING",
"fullIdentifier" : "OrderState.PENDING" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.PENDING"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvent.PAY", "rawName" : "OrderEvent.PAY",
"fullIdentifier" : "OrderEvent.PAY" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderEvent.PAY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ { "actions" : [ {
@@ -668,19 +218,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderState.PENDING", "rawName" : "OrderState.PENDING",
"fullIdentifier" : "OrderState.PENDING" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.PENDING"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderState.SHIPPED", "rawName" : "OrderState.SHIPPED",
"fullIdentifier" : "OrderState.SHIPPED" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderState.SHIPPED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvent.SHIP", "rawName" : "OrderEvent.SHIP",
"fullIdentifier" : "OrderEvent.SHIP" "fullIdentifier" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "OrderState.SHIPPED" ] "endStates" : [ "click.kamil.enterprise.machines.order.OrderState.SHIPPED" ]
} }

View File

@@ -21,12 +21,12 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> OrderState.NEW [*] --> click.kamil.enterprise.machines.order.OrderState.NEW
OrderState.NEW -[#1E90FF,bold]-> OrderState.PENDING <<external>> : OrderEvent.PAY / λ OrderState.NEW -[#1E90FF,bold]-> OrderState.PENDING <<external>> : OrderEvent.PAY / λ
OrderState.PENDING -[#1E90FF,bold]-> OrderState.SHIPPED <<external>> : OrderEvent.SHIP OrderState.PENDING -[#1E90FF,bold]-> OrderState.SHIPPED <<external>> : OrderEvent.SHIP
OrderState.SHIPPED --> [*] click.kamil.enterprise.machines.order.OrderState.SHIPPED --> [*]
@enduml @enduml

View File

@@ -8,5 +8,9 @@
</state> </state>
<state id="SHIPPED"> <state id="SHIPPED">
</state> </state>
<state id="NEW">
</state>
<state id="SHIPPED">
</state>
</scxml> </scxml>

View File

@@ -200,16 +200,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -234,16 +234,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.FULFILL" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.PAID", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"targetState" : "OrderStates.FULFILLED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED",
"event" : "OrderEvents.FULFILL" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -268,16 +268,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.CANCEL" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.CANCELED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED",
"event" : "OrderEvents.CANCEL" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -302,16 +302,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 17, "lineNumber" : 17,
"polymorphicEvents" : [ "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -336,16 +336,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -370,16 +370,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -408,20 +408,20 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY", "OrderEvents.CANCEL" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY", "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
}, { }, {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.CANCELED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED",
"event" : "OrderEvents.CANCEL" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -446,16 +446,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -480,16 +480,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.FULFILL" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.PAID", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"targetState" : "OrderStates.FULFILLED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED",
"event" : "OrderEvents.FULFILL" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -514,16 +514,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 13, "lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.CANCEL" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.CANCELED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED",
"event" : "OrderEvents.CANCEL" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -548,16 +548,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 21, "lineNumber" : 21,
"polymorphicEvents" : [ "OrderEvents.ABCD" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.PAID", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"targetState" : "OrderStates.CANCELED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED",
"event" : "OrderEvents.ABCD" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD"
} ] } ]
}, { }, {
"entryPoint" : { "entryPoint" : {
@@ -582,20 +582,20 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 21, "lineNumber" : 21,
"polymorphicEvents" : [ "OrderEvents.ABCD", "OrderEvents.PAY" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD", "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "OrderStates.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED",
"targetState" : "OrderStates.PAID", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"event" : "OrderEvents.PAY" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
}, { }, {
"sourceState" : "OrderStates.PAID", "sourceState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID",
"targetState" : "OrderStates.CANCELED", "targetState" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED",
"event" : "OrderEvents.ABCD" "event" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD"
} ] } ]
} ], } ],
"properties" : { "properties" : {
@@ -606,20 +606,20 @@
}, },
"name" : "click.kamil.examples.statemachine.polymorphic.PolymorphicStateMachineConfiguration", "name" : "click.kamil.examples.statemachine.polymorphic.PolymorphicStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "OrderStates.SUBMITTED" ], "startStates" : [ "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.PAY", "rawName" : "OrderEvents.PAY",
"fullIdentifier" : "OrderEvents.PAY" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.PAY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -628,15 +628,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.FULFILLED", "rawName" : "OrderStates.FULFILLED",
"fullIdentifier" : "OrderStates.FULFILLED" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.FULFILL", "rawName" : "OrderEvents.FULFILL",
"fullIdentifier" : "OrderEvents.FULFILL" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.FULFILL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -645,15 +645,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "OrderEvents.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -662,19 +662,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.polymorphic.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] "endStates" : [ "click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED", "click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED" ]
} }

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> OrderStates.SUBMITTED [*] --> click.kamil.examples.statemachine.polymorphic.OrderStates.SUBMITTED
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> : OrderEvents.PAY OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> : OrderEvents.PAY
@@ -29,7 +29,7 @@ OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> : OrderEve
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.ABCD OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.ABCD
OrderStates.CANCELED --> [*] click.kamil.examples.statemachine.polymorphic.OrderStates.CANCELED --> [*]
OrderStates.FULFILLED --> [*] click.kamil.examples.statemachine.polymorphic.OrderStates.FULFILLED --> [*]
@enduml @enduml

View File

@@ -12,5 +12,11 @@
</state> </state>
<state id="CANCELED"> <state id="CANCELED">
</state> </state>
<state id="SUBMITTED">
</state>
<state id="CANCELED">
</state>
<state id="FULFILLED">
</state>
</scxml> </scxml>

View File

@@ -11,20 +11,20 @@
}, },
"name" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration", "name" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "OrderStates.SUBMITTED" ], "startStates" : [ "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.PAY", "rawName" : "OrderEvents.PAY",
"fullIdentifier" : "OrderEvents.PAY" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.PAY"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -33,15 +33,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.FULFILLED", "rawName" : "OrderStates.FULFILLED",
"fullIdentifier" : "OrderStates.FULFILLED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.FULFILLED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.FULFILL", "rawName" : "OrderEvents.FULFILL",
"fullIdentifier" : "OrderEvents.FULFILL" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.FULFILL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -50,15 +50,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "OrderEvents.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.CANCEL"
}, },
"guards" : [ { "guards" : [ {
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n", "expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
@@ -74,15 +74,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED"
} ], } ],
"event" : { "event" : {
"rawName" : "OrderEvents.CANCEL", "rawName" : "OrderEvents.CANCEL",
"fullIdentifier" : "OrderEvents.CANCEL" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.CANCEL"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -91,12 +91,12 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ ], "targetStates" : [ ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -105,11 +105,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -126,11 +126,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.SUBMITTED", "rawName" : "OrderStates.SUBMITTED",
"fullIdentifier" : "OrderStates.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID3", "rawName" : "OrderStates.PAID3",
"fullIdentifier" : "OrderStates.PAID3" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -140,11 +140,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID1"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -161,11 +161,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -182,11 +182,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.HAPPEN", "rawName" : "OrderStates.HAPPEN",
"fullIdentifier" : "OrderStates.HAPPEN" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.HAPPEN"
} ], } ],
"event" : null, "event" : null,
"guards" : [ { "guards" : [ {
@@ -203,11 +203,11 @@
"type" : "CHOICE", "type" : "CHOICE",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID", "rawName" : "OrderStates.PAID",
"fullIdentifier" : "OrderStates.PAID" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.PAID3", "rawName" : "OrderStates.PAID3",
"fullIdentifier" : "OrderStates.PAID3" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -217,11 +217,11 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID2", "rawName" : "OrderStates.PAID2",
"fullIdentifier" : "OrderStates.PAID2" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID2"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -231,11 +231,11 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID3", "rawName" : "OrderStates.PAID3",
"fullIdentifier" : "OrderStates.PAID3" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID3"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "OrderStates.CANCELED", "rawName" : "OrderStates.CANCELED",
"fullIdentifier" : "OrderStates.CANCELED" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.CANCELED"
} ], } ],
"event" : null, "event" : null,
"guards" : [ ], "guards" : [ ],
@@ -245,12 +245,12 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "OrderStates.PAID1", "rawName" : "OrderStates.PAID1",
"fullIdentifier" : "OrderStates.PAID1" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderStates.PAID1"
} ], } ],
"targetStates" : [ ], "targetStates" : [ ],
"event" : { "event" : {
"rawName" : "OrderEvents.ABCD", "rawName" : "OrderEvents.ABCD",
"fullIdentifier" : "OrderEvents.ABCD" "fullIdentifier" : "click.kamil.examples.statemachine.simple.OrderEvents.ABCD"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ { "actions" : [ {
@@ -270,5 +270,5 @@
} ], } ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "OrderStates.CANCELED", "OrderStates.FULFILLED" ] "endStates" : [ "click.kamil.examples.statemachine.simple.OrderStates.CANCELED", "click.kamil.examples.statemachine.simple.OrderStates.FULFILLED" ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -21,7 +21,7 @@ skinparam ArrowThickness 1
skinparam dpi 110 skinparam dpi 110
skinparam svgLinkTarget _self skinparam svgLinkTarget _self
[*] --> OrderStates.SUBMITTED [*] --> click.kamil.examples.statemachine.simple.OrderStates.SUBMITTED
state OrderStates.SUBMITTED <<choice>> state OrderStates.SUBMITTED <<choice>>
state OrderStates.PAID <<choice>> state OrderStates.PAID <<choice>>
@@ -41,7 +41,7 @@ OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> : OrderEvents.ABCD / λ, action2 OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> : OrderEvents.ABCD / λ, action2
OrderStates.CANCELED --> [*] click.kamil.examples.statemachine.simple.OrderStates.CANCELED --> [*]
OrderStates.FULFILLED --> [*] click.kamil.examples.statemachine.simple.OrderStates.FULFILLED --> [*]
@enduml @enduml

View File

@@ -42,5 +42,11 @@
</state> </state>
<state id="HAPPEN"> <state id="HAPPEN">
</state> </state>
<state id="SUBMITTED">
</state>
<state id="CANCELED">
</state>
<state id="FULFILLED">
</state>
</scxml> </scxml>

View File

@@ -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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.SUBMIT", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -53,16 +53,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.SUBMIT" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.DRAFT", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT",
"targetState" : "DocumentState.SUBMITTED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"event" : "DocumentTransitionEvent.SUBMIT" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT"
} ] } ]
}, { }, {
"entryPoint" : { "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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.APPROVE", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -87,16 +87,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.APPROVE" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"targetState" : "DocumentState.APPROVED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED",
"event" : "DocumentTransitionEvent.APPROVE" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE"
} ] } ]
}, { }, {
"entryPoint" : { "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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.REJECT", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -121,16 +121,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.REJECT" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" ],
"external" : false, "external" : false,
"constraint" : null, "constraint" : null,
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"targetState" : "DocumentState.REJECTED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED",
"event" : "DocumentTransitionEvent.REJECT" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT"
} ] } ]
}, { }, {
"entryPoint" : { "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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.SUBMIT", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -159,16 +159,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.SUBMIT" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT" ],
"external" : false, "external" : false,
"constraint" : "command == DOCUMENT_SUBMIT", "constraint" : "command == DOCUMENT_SUBMIT",
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.DRAFT", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT",
"targetState" : "DocumentState.SUBMITTED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"event" : "DocumentTransitionEvent.SUBMIT" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT"
} ] } ]
}, { }, {
"entryPoint" : { "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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.APPROVE", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -197,16 +197,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.APPROVE" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE" ],
"external" : false, "external" : false,
"constraint" : "command == DOCUMENT_APPROVE", "constraint" : "command == DOCUMENT_APPROVE",
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"targetState" : "DocumentState.APPROVED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED",
"event" : "DocumentTransitionEvent.APPROVE" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE"
} ] } ]
}, { }, {
"entryPoint" : { "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" ], "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" : { "triggerPoint" : {
"event" : "DocumentTransitionEvent.REJECT", "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT",
"className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher", "className" : "click.kamil.examples.statemachine.layered.dispatch.CentralEventDispatcher",
"methodName" : "sendDocumentEvent", "methodName" : "sendDocumentEvent",
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java", "sourceFile" : "src/main/java/click/kamil/examples/statemachine/layered/dispatch/CentralEventDispatcher.java",
@@ -235,16 +235,16 @@
"stateMachineId" : null, "stateMachineId" : null,
"sourceState" : null, "sourceState" : null,
"lineNumber" : 81, "lineNumber" : 81,
"polymorphicEvents" : [ "DocumentTransitionEvent.REJECT" ], "polymorphicEvents" : [ "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT" ],
"external" : false, "external" : false,
"constraint" : "command == DOCUMENT_REJECT", "constraint" : "command == DOCUMENT_REJECT",
"ambiguous" : false "ambiguous" : false
}, },
"contextMachineId" : null, "contextMachineId" : null,
"matchedTransitions" : [ { "matchedTransitions" : [ {
"sourceState" : "DocumentState.SUBMITTED", "sourceState" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED",
"targetState" : "DocumentState.REJECTED", "targetState" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED",
"event" : "DocumentTransitionEvent.REJECT" "event" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT"
} ] } ]
} ], } ],
"properties" : { "properties" : {
@@ -253,20 +253,20 @@
}, },
"name" : "click.kamil.examples.statemachine.layered.document.config.StandardDocumentStateMachineConfiguration", "name" : "click.kamil.examples.statemachine.layered.document.config.StandardDocumentStateMachineConfiguration",
"renderChoicesAsDiamonds" : true, "renderChoicesAsDiamonds" : true,
"startStates" : [ "DocumentState.DRAFT" ], "startStates" : [ "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT" ],
"transitions" : [ { "transitions" : [ {
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "DocumentState.DRAFT", "rawName" : "DocumentState.DRAFT",
"fullIdentifier" : "DocumentState.DRAFT" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.DRAFT"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "DocumentState.SUBMITTED", "rawName" : "DocumentState.SUBMITTED",
"fullIdentifier" : "DocumentState.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED"
} ], } ],
"event" : { "event" : {
"rawName" : "DocumentTransitionEvent.SUBMIT", "rawName" : "DocumentTransitionEvent.SUBMIT",
"fullIdentifier" : "DocumentTransitionEvent.SUBMIT" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.SUBMIT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -275,15 +275,15 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "DocumentState.SUBMITTED", "rawName" : "DocumentState.SUBMITTED",
"fullIdentifier" : "DocumentState.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "DocumentState.APPROVED", "rawName" : "DocumentState.APPROVED",
"fullIdentifier" : "DocumentState.APPROVED" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED"
} ], } ],
"event" : { "event" : {
"rawName" : "DocumentTransitionEvent.APPROVE", "rawName" : "DocumentTransitionEvent.APPROVE",
"fullIdentifier" : "DocumentTransitionEvent.APPROVE" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.APPROVE"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
@@ -292,19 +292,19 @@
"type" : "EXTERNAL", "type" : "EXTERNAL",
"sourceStates" : [ { "sourceStates" : [ {
"rawName" : "DocumentState.SUBMITTED", "rawName" : "DocumentState.SUBMITTED",
"fullIdentifier" : "DocumentState.SUBMITTED" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.SUBMITTED"
} ], } ],
"targetStates" : [ { "targetStates" : [ {
"rawName" : "DocumentState.REJECTED", "rawName" : "DocumentState.REJECTED",
"fullIdentifier" : "DocumentState.REJECTED" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED"
} ], } ],
"event" : { "event" : {
"rawName" : "DocumentTransitionEvent.REJECT", "rawName" : "DocumentTransitionEvent.REJECT",
"fullIdentifier" : "DocumentTransitionEvent.REJECT" "fullIdentifier" : "click.kamil.examples.statemachine.layered.document.DocumentTransitionEvent.REJECT"
}, },
"guards" : [ ], "guards" : [ ],
"actions" : [ ], "actions" : [ ],
"order" : null "order" : null
} ], } ],
"endStates" : [ "DocumentState.REJECTED", "DocumentState.APPROVED" ] "endStates" : [ "click.kamil.examples.statemachine.layered.document.DocumentState.REJECTED", "click.kamil.examples.statemachine.layered.document.DocumentState.APPROVED" ]
} }

Some files were not shown because too many files have changed in this diff Show More