Compare commits
13 Commits
0c9e8de310
...
ai-branch
| Author | SHA1 | Date | |
|---|---|---|---|
| d6b1571f18 | |||
| e617fb1754 | |||
| 06dc0ba641 | |||
| ba412b905e | |||
| 198c5d830e | |||
| a383de5a5f | |||
| ef9ebe3512 | |||
| b480dc83ef | |||
| 0a23daae05 | |||
| e894566112 | |||
| 8d4ba0697e | |||
| d93d36e8ad | |||
| 5894303510 |
22
InspectGolden.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import java.nio.file.*;
|
||||||
|
import java.util.*;
|
||||||
|
import click.kamil.springstatemachineexporter.service.ExportService;
|
||||||
|
import click.kamil.springstatemachineexporter.exporter.*;
|
||||||
|
import click.kamil.springstatemachineexporter.analysis.service.EnrichmentService;
|
||||||
|
|
||||||
|
public class InspectGolden {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
Path inputDir = Path.of("state_machines/complex_state_machine");
|
||||||
|
Path tempDir = Files.createTempDirectory("golden-update-");
|
||||||
|
|
||||||
|
List<StateMachineExporter> exporters = List.of(new PlantUml(), new Dot(), new Scxml(), new JsonExporter());
|
||||||
|
EnrichmentService enrichmentService = new EnrichmentService(Collections.emptyList());
|
||||||
|
ExportService exportService = new ExportService(exporters, enrichmentService);
|
||||||
|
|
||||||
|
exportService.runExporter(inputDir, tempDir, null, true);
|
||||||
|
|
||||||
|
try (var stream = Files.list(tempDir)) {
|
||||||
|
stream.forEach(System.out::println);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
run_golden.gradle
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
task runGolden(type: JavaExec) {
|
||||||
|
mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater"
|
||||||
|
classpath = sourceSets.test.runtimeClasspath
|
||||||
|
}
|
||||||
@@ -53,3 +53,14 @@ tasks.named('test') {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
systemProperty "updateGolden", System.getProperty("updateGolden")
|
systemProperty "updateGolden", System.getProperty("updateGolden")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task runGolden(type: JavaExec) {
|
||||||
|
mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater"
|
||||||
|
classpath = sourceSets.test.runtimeClasspath
|
||||||
|
}
|
||||||
|
|
||||||
|
task runGoldenFixed(type: JavaExec) {
|
||||||
|
mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater"
|
||||||
|
classpath = sourceSets.test.runtimeClasspath
|
||||||
|
workingDir = rootProject.projectDir
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
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.MatchedTransition;
|
||||||
|
import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint;
|
||||||
|
import click.kamil.springstatemachineexporter.analysis.service.CodebaseIntelligenceProvider;
|
||||||
|
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
||||||
|
import click.kamil.springstatemachineexporter.model.State;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Transition;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class TransitionLinkerEnricher implements AnalysisEnricher {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enrich(AnalysisResult result, CodebaseContext context, CodebaseIntelligenceProvider intelligence) {
|
||||||
|
if (result.getMetadata() == null || result.getMetadata().getCallChains() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CallChain> updatedChains = new ArrayList<>();
|
||||||
|
List<Transition> stateMachineTransitions = result.getTransitions();
|
||||||
|
|
||||||
|
for (CallChain chain : result.getMetadata().getCallChains()) {
|
||||||
|
TriggerPoint tp = chain.getTriggerPoint();
|
||||||
|
if (tp == null || tp.getEvent() == null) {
|
||||||
|
updatedChains.add(chain);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
String triggerEvent = simplify(tp.getEvent());
|
||||||
|
String triggerSource = tp.getSourceState() != null ? simplify(tp.getSourceState()) : null;
|
||||||
|
|
||||||
|
List<MatchedTransition> matched = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Transition t : stateMachineTransitions) {
|
||||||
|
if (t.getEvent() != null) {
|
||||||
|
String smEventRaw = t.getEvent().fullIdentifier() != null ? t.getEvent().fullIdentifier() : t.getEvent().rawName();
|
||||||
|
String smEvent = simplify(smEventRaw);
|
||||||
|
if (smEvent.equals(triggerEvent)) {
|
||||||
|
// Event matches. Check source state if provided
|
||||||
|
for (State smSourceState : t.getSourceStates()) {
|
||||||
|
String smSourceRaw = smSourceState.fullIdentifier() != null ? smSourceState.fullIdentifier() : smSourceState.rawName();
|
||||||
|
String smSource = simplify(smSourceRaw);
|
||||||
|
if (triggerSource == null || triggerSource.equals(smSource)) {
|
||||||
|
for (State smTargetState : t.getTargetStates()) {
|
||||||
|
String sourceRaw = smSourceState.fullIdentifier() != null ? smSourceState.fullIdentifier() : smSourceState.rawName();
|
||||||
|
String targetRaw = smTargetState.fullIdentifier() != null ? smTargetState.fullIdentifier() : smTargetState.rawName();
|
||||||
|
matched.add(MatchedTransition.builder()
|
||||||
|
.sourceState(sourceRaw)
|
||||||
|
.targetState(targetRaw)
|
||||||
|
.event(smEventRaw)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new CallChain with the matched transitions
|
||||||
|
CallChain updatedChain = CallChain.builder()
|
||||||
|
.entryPoint(chain.getEntryPoint())
|
||||||
|
.methodChain(chain.getMethodChain())
|
||||||
|
.triggerPoint(chain.getTriggerPoint())
|
||||||
|
.contextMachineId(chain.getContextMachineId())
|
||||||
|
.matchedTransitions(matched)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
updatedChains.add(updatedChain);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the metadata with the new call chains
|
||||||
|
CodebaseMetadata updatedMetadata = CodebaseMetadata.builder()
|
||||||
|
.triggers(result.getMetadata().getTriggers())
|
||||||
|
.entryPoints(result.getMetadata().getEntryPoints())
|
||||||
|
.callChains(updatedChains)
|
||||||
|
.properties(result.getMetadata().getProperties())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
result.setMetadata(updatedMetadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String simplify(String name) {
|
||||||
|
if (name == null) return "";
|
||||||
|
int dot = name.lastIndexOf('.');
|
||||||
|
if (dot >= 0) {
|
||||||
|
return name.substring(dot + 1);
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,7 +60,7 @@ public class AnalysisResult {
|
|||||||
if (transitions != null) {
|
if (transitions != null) {
|
||||||
for (var t : transitions) {
|
for (var t : transitions) {
|
||||||
if (t.getEvent() != null) {
|
if (t.getEvent() != null) {
|
||||||
t.setEvent(resolver.resolveValue(t.getEvent(), properties));
|
t.setEvent(click.kamil.springstatemachineexporter.model.Event.of(t.getEvent().rawName(), resolver.resolveValue(t.getEvent().fullIdentifier(), properties)));
|
||||||
}
|
}
|
||||||
// Resolve states within transitions
|
// Resolve states within transitions
|
||||||
t.setSourceStates(t.getSourceStates().stream()
|
t.setSourceStates(t.getSourceStates().stream()
|
||||||
|
|||||||
@@ -15,4 +15,6 @@ public class CallChain {
|
|||||||
private final EntryPoint entryPoint;
|
private final EntryPoint entryPoint;
|
||||||
private final List<String> methodChain; // e.g., ["Controller.submit", "Service.process", "Service.send"]
|
private final List<String> methodChain; // e.g., ["Controller.submit", "Service.process", "Service.send"]
|
||||||
private final TriggerPoint triggerPoint;
|
private final TriggerPoint triggerPoint;
|
||||||
|
private final String contextMachineId;
|
||||||
|
private final List<MatchedTransition> matchedTransitions;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.analysis.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.jackson.Jacksonized;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@Jacksonized
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class MatchedTransition {
|
||||||
|
private final String sourceState;
|
||||||
|
private final String targetState;
|
||||||
|
private final String event;
|
||||||
|
}
|
||||||
@@ -18,5 +18,6 @@ public class TriggerPoint {
|
|||||||
private final String sourceFile;
|
private final String sourceFile;
|
||||||
private final String sourceModule;
|
private final String sourceModule;
|
||||||
private final String stateMachineId; // Optional: to link to a specific SM instance
|
private final String stateMachineId; // Optional: to link to a specific SM instance
|
||||||
|
private final String sourceState; // Optional: if we can determine the expected current state
|
||||||
private final int lineNumber;
|
private final int lineNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,30 @@ public class ConstantResolver {
|
|||||||
return resolveManual(sn, context, visited);
|
return resolveManual(sn, context, visited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (expr instanceof MethodInvocation mi) {
|
||||||
|
IMethodBinding mb = mi.resolveMethodBinding();
|
||||||
|
if (mb != null) {
|
||||||
|
ITypeBinding returnType = mb.getReturnType();
|
||||||
|
if (returnType != null) {
|
||||||
|
java.util.List<String> values = context.getEnumValues(returnType.getQualifiedName());
|
||||||
|
if (values != null && !values.isEmpty()) {
|
||||||
|
return "ENUM_SET:" + String.join(",", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TypeDeclaration td = findEnclosingType(mi);
|
||||||
|
if (td != null) {
|
||||||
|
MethodDeclaration md = context.findMethodDeclaration(td, mi.getName().getIdentifier(), true);
|
||||||
|
if (md != null && md.getReturnType2() != null) {
|
||||||
|
java.util.List<String> values = context.getEnumValues(md.getReturnType2().toString());
|
||||||
|
if (values != null && !values.isEmpty()) {
|
||||||
|
return "ENUM_SET:" + String.join(",", values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,10 +39,12 @@ public class CallGraphBuilder {
|
|||||||
List<String> path = findPath(startMethod, targetMethod, callGraph, new HashSet<>());
|
List<String> path = findPath(startMethod, targetMethod, callGraph, new HashSet<>());
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
TriggerPoint resolvedTp = resolveTriggerPointParameters(tp, path, callGraph);
|
TriggerPoint resolvedTp = resolveTriggerPointParameters(tp, path, callGraph);
|
||||||
|
String contextMachineId = extractContextMachineId(path, callGraph);
|
||||||
chains.add(CallChain.builder()
|
chains.add(CallChain.builder()
|
||||||
.entryPoint(ep)
|
.entryPoint(ep)
|
||||||
.triggerPoint(resolvedTp)
|
.triggerPoint(resolvedTp)
|
||||||
.methodChain(path)
|
.methodChain(path)
|
||||||
|
.contextMachineId(contextMachineId)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,47 +58,91 @@ public class CallGraphBuilder {
|
|||||||
String event = tp.getEvent();
|
String event = tp.getEvent();
|
||||||
if (event == null || event.isEmpty() || event.contains("\"")) return tp;
|
if (event == null || event.isEmpty() || event.contains("\"")) return tp;
|
||||||
|
|
||||||
TypeDeclaration td = context.getTypeDeclaration(tp.getClassName());
|
String currentParamName = event;
|
||||||
if (td != null) {
|
String resolvedValue = event;
|
||||||
MethodDeclaration md = context.findMethodDeclaration(td, tp.getMethodName(), true);
|
|
||||||
if (md != null) {
|
|
||||||
int paramIndex = -1;
|
|
||||||
for (int i = 0; i < md.parameters().size(); i++) {
|
|
||||||
SingleVariableDeclaration svd = (SingleVariableDeclaration) md.parameters().get(i);
|
|
||||||
if (svd.getName().getIdentifier().equals(event)) {
|
|
||||||
paramIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paramIndex >= 0) {
|
// Walk backwards up the call chain
|
||||||
String caller = path.get(path.size() - 2);
|
for (int i = path.size() - 1; i > 0; i--) {
|
||||||
String target = path.get(path.size() - 1);
|
String target = path.get(i);
|
||||||
List<CallEdge> edges = callGraph.get(caller);
|
String caller = path.get(i - 1);
|
||||||
if (edges != null) {
|
|
||||||
for (CallEdge edge : edges) {
|
// Find parameter index in target method
|
||||||
if (edge.getTargetMethod().equals(target) || isHeuristicMatch(edge.getTargetMethod(), target)) {
|
int paramIndex = getParameterIndex(target, currentParamName);
|
||||||
if (paramIndex < edge.getArguments().size()) {
|
if (paramIndex < 0) {
|
||||||
String resolvedValue = edge.getArguments().get(paramIndex);
|
break; // Parameter name changed or not found, stop tracing
|
||||||
if (resolvedValue != null) {
|
}
|
||||||
return TriggerPoint.builder()
|
|
||||||
.event(resolvedValue)
|
// Find the edge from caller to target to get the argument passed
|
||||||
.className(tp.getClassName())
|
List<CallEdge> edges = callGraph.get(caller);
|
||||||
.methodName(tp.getMethodName())
|
boolean found = false;
|
||||||
.sourceFile(tp.getSourceFile())
|
if (edges != null) {
|
||||||
.lineNumber(tp.getLineNumber())
|
for (CallEdge edge : edges) {
|
||||||
.build();
|
if (edge.getTargetMethod().equals(target) || isHeuristicMatch(edge.getTargetMethod(), target)) {
|
||||||
}
|
if (paramIndex < edge.getArguments().size()) {
|
||||||
}
|
String arg = edge.getArguments().get(paramIndex);
|
||||||
|
if (arg != null) {
|
||||||
|
currentParamName = arg;
|
||||||
|
resolvedValue = arg;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!found) break; // Could not map argument
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!resolvedValue.equals(event)) {
|
||||||
|
return TriggerPoint.builder()
|
||||||
|
.event(resolvedValue)
|
||||||
|
.className(tp.getClassName())
|
||||||
|
.methodName(tp.getMethodName())
|
||||||
|
.sourceFile(tp.getSourceFile())
|
||||||
|
.lineNumber(tp.getLineNumber())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
return tp;
|
return tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getParameterIndex(String methodFqn, String paramName) {
|
||||||
|
if (methodFqn == null || !methodFqn.contains(".")) return -1;
|
||||||
|
String className = methodFqn.substring(0, methodFqn.lastIndexOf('.'));
|
||||||
|
String methodName = methodFqn.substring(methodFqn.lastIndexOf('.') + 1);
|
||||||
|
TypeDeclaration td = context.getTypeDeclaration(className);
|
||||||
|
if (td != null) {
|
||||||
|
MethodDeclaration md = context.findMethodDeclaration(td, methodName, true);
|
||||||
|
if (md != null) {
|
||||||
|
for (int i = 0; i < md.parameters().size(); i++) {
|
||||||
|
SingleVariableDeclaration svd = (SingleVariableDeclaration) md.parameters().get(i);
|
||||||
|
if (svd.getName().getIdentifier().equals(paramName)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String extractContextMachineId(List<String> path, Map<String, List<CallEdge>> callGraph) {
|
||||||
|
for (String node : path) {
|
||||||
|
List<CallEdge> edges = callGraph.get(node);
|
||||||
|
if (edges != null) {
|
||||||
|
for (CallEdge edge : edges) {
|
||||||
|
String target = edge.getTargetMethod();
|
||||||
|
if (target != null && (target.contains(".restore") || target.contains(".read"))) {
|
||||||
|
// Persister signatures usually like: restore(stateMachine, contextObj)
|
||||||
|
if (edge.getArguments().size() >= 2) {
|
||||||
|
return edge.getArguments().get(1); // The contextObj / machineId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String, List<CallEdge>> buildCallGraph() {
|
private Map<String, List<CallEdge>> buildCallGraph() {
|
||||||
graph = new HashMap<>();
|
graph = new HashMap<>();
|
||||||
for (CompilationUnit cu : context.getCompilationUnits()) {
|
for (CompilationUnit cu : context.getCompilationUnits()) {
|
||||||
@@ -118,6 +164,20 @@ public class CallGraphBuilder {
|
|||||||
for (String calledMethod : calledMethods) {
|
for (String calledMethod : calledMethods) {
|
||||||
graph.computeIfAbsent(currentMethodFqn, k -> new ArrayList<>()).add(new CallEdge(calledMethod, args));
|
graph.computeIfAbsent(currentMethodFqn, k -> new ArrayList<>()).add(new CallEdge(calledMethod, args));
|
||||||
}
|
}
|
||||||
|
for (Object argObj : node.arguments()) {
|
||||||
|
if (argObj instanceof ExpressionMethodReference emr) {
|
||||||
|
String typeName = emr.getExpression().toString();
|
||||||
|
if ("this".equals(typeName) || "super".equals(typeName)) {
|
||||||
|
TypeDeclaration td = findEnclosingType(node);
|
||||||
|
if (td != null) {
|
||||||
|
String refMethod = resolveMethodInType(td, emr.getName().getIdentifier());
|
||||||
|
if (refMethod != null) {
|
||||||
|
graph.computeIfAbsent(currentMethodFqn, k -> new ArrayList<>()).add(new CallEdge(refMethod, args));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.visit(node);
|
return super.visit(node);
|
||||||
}
|
}
|
||||||
@@ -131,13 +191,15 @@ public class CallGraphBuilder {
|
|||||||
String superFqn = context.getSuperclassFqn(td);
|
String superFqn = context.getSuperclassFqn(td);
|
||||||
if (superFqn != null) {
|
if (superFqn != null) {
|
||||||
TypeDeclaration superTd = context.getTypeDeclaration(superFqn);
|
TypeDeclaration superTd = context.getTypeDeclaration(superFqn);
|
||||||
|
String calledMethod = null;
|
||||||
if (superTd != null) {
|
if (superTd != null) {
|
||||||
String calledMethod = resolveMethodInType(superTd, methodName);
|
calledMethod = resolveMethodInType(superTd, methodName);
|
||||||
if (calledMethod != null) {
|
|
||||||
List<String> args = resolveArguments(node.arguments());
|
|
||||||
graph.computeIfAbsent(currentMethodFqn, k -> new ArrayList<>()).add(new CallEdge(calledMethod, args));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (calledMethod == null) {
|
||||||
|
calledMethod = superFqn + "." + methodName;
|
||||||
|
}
|
||||||
|
List<String> args = resolveArguments(node.arguments());
|
||||||
|
graph.computeIfAbsent(currentMethodFqn, k -> new ArrayList<>()).add(new CallEdge(calledMethod, args));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,9 +214,48 @@ public class CallGraphBuilder {
|
|||||||
List<String> args = new ArrayList<>();
|
List<String> args = new ArrayList<>();
|
||||||
for (Object argObj : astArguments) {
|
for (Object argObj : astArguments) {
|
||||||
Expression expr = (Expression) argObj;
|
Expression expr = (Expression) argObj;
|
||||||
|
|
||||||
|
// Extract from lambda
|
||||||
|
if (expr instanceof LambdaExpression le) {
|
||||||
|
ASTNode body = le.getBody();
|
||||||
|
if (body instanceof Expression bodyExpr) {
|
||||||
|
expr = bodyExpr;
|
||||||
|
} else if (body instanceof Block block) {
|
||||||
|
for (Object stmtObj : block.statements()) {
|
||||||
|
if (stmtObj instanceof ReturnStatement rs && rs.getExpression() != null) {
|
||||||
|
expr = rs.getExpression();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expr instanceof ExpressionMethodReference emr) {
|
||||||
|
TypeDeclaration td = findEnclosingType(expr);
|
||||||
|
if (td != null) {
|
||||||
|
MethodDeclaration md = context.findMethodDeclaration(td, emr.getName().getIdentifier(), true);
|
||||||
|
if (md != null && md.getBody() != null) {
|
||||||
|
for (Object stmtObj : md.getBody().statements()) {
|
||||||
|
if (stmtObj instanceof ReturnStatement rs && rs.getExpression() != null) {
|
||||||
|
expr = rs.getExpression();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract from constructor args (e.g., new CustomMessage(OrderEvent.PROCESS, ...))
|
||||||
|
expr = traceVariable(expr);
|
||||||
|
if (expr instanceof ClassInstanceCreation cic) {
|
||||||
|
if (!cic.arguments().isEmpty()) {
|
||||||
|
expr = (Expression) cic.arguments().get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String val = constantResolver.resolve(expr, context);
|
String val = constantResolver.resolve(expr, context);
|
||||||
if (val == null && expr instanceof SimpleName sn) {
|
if (val == null) {
|
||||||
val = sn.getIdentifier();
|
val = expr.toString(); // Fallback to raw string (handles Enums, 'new Class()', etc)
|
||||||
}
|
}
|
||||||
args.add(val);
|
args.add(val);
|
||||||
}
|
}
|
||||||
@@ -217,22 +318,25 @@ public class CallGraphBuilder {
|
|||||||
|
|
||||||
private List<String> findPath(String start, String target, Map<String, List<CallEdge>> graph, Set<String> visited) {
|
private List<String> findPath(String start, String target, Map<String, List<CallEdge>> graph, Set<String> visited) {
|
||||||
if (start.equals(target)) return new ArrayList<>(List.of(start));
|
if (start.equals(target)) return new ArrayList<>(List.of(start));
|
||||||
if (!visited.add(start)) return null;
|
if (!visited.add(start)) return null; // Path-scoped cycle detection
|
||||||
|
|
||||||
List<CallEdge> neighbors = graph.get(start);
|
List<CallEdge> neighbors = graph.get(start);
|
||||||
if (neighbors != null) {
|
if (neighbors != null) {
|
||||||
for (CallEdge edge : neighbors) {
|
for (CallEdge edge : neighbors) {
|
||||||
String neighbor = edge.getTargetMethod();
|
String neighbor = edge.getTargetMethod();
|
||||||
if (neighbor.equals(target) || isHeuristicMatch(neighbor, target)) {
|
if (neighbor.equals(target) || isHeuristicMatch(neighbor, target)) {
|
||||||
|
visited.remove(start);
|
||||||
return new ArrayList<>(List.of(start, target));
|
return new ArrayList<>(List.of(start, target));
|
||||||
}
|
}
|
||||||
List<String> path = findPath(neighbor, target, graph, visited);
|
List<String> path = findPath(neighbor, target, graph, visited);
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
path.add(0, start);
|
path.add(0, start);
|
||||||
|
visited.remove(start);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
visited.remove(start);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,4 +354,41 @@ public class CallGraphBuilder {
|
|||||||
}
|
}
|
||||||
return (TypeDeclaration) parent;
|
return (TypeDeclaration) parent;
|
||||||
}
|
}
|
||||||
|
private Expression traceVariable(Expression expr) {
|
||||||
|
if (expr instanceof SimpleName sn) {
|
||||||
|
String varName = sn.getIdentifier();
|
||||||
|
MethodDeclaration enclosingMethod = findEnclosingMethod(expr);
|
||||||
|
if (enclosingMethod != null) {
|
||||||
|
final Expression[] initializer = new Expression[1];
|
||||||
|
enclosingMethod.accept(new ASTVisitor() {
|
||||||
|
@Override
|
||||||
|
public boolean visit(VariableDeclarationFragment node) {
|
||||||
|
if (node.getName().getIdentifier().equals(varName) && node.getInitializer() != null) {
|
||||||
|
initializer[0] = node.getInitializer();
|
||||||
|
}
|
||||||
|
return super.visit(node);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean visit(Assignment node) {
|
||||||
|
if (node.getLeftHandSide() instanceof SimpleName asn && asn.getIdentifier().equals(varName)) {
|
||||||
|
initializer[0] = node.getRightHandSide();
|
||||||
|
}
|
||||||
|
return super.visit(node);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (initializer[0] != null) {
|
||||||
|
return traceVariable(initializer[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return expr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private MethodDeclaration findEnclosingMethod(ASTNode node) {
|
||||||
|
ASTNode parent = node.getParent();
|
||||||
|
while (parent != null && !(parent instanceof MethodDeclaration)) {
|
||||||
|
parent = parent.getParent();
|
||||||
|
}
|
||||||
|
return (MethodDeclaration) parent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ public class GenericEventDetector {
|
|||||||
public boolean visit(MethodInvocation node) {
|
public boolean visit(MethodInvocation node) {
|
||||||
String methodName = node.getName().getIdentifier();
|
String methodName = node.getName().getIdentifier();
|
||||||
|
|
||||||
if ("sendEvent".equals(methodName)) {
|
if ("sendEvent".equals(methodName) || "sendEvents".equals(methodName) ||
|
||||||
|
"sendEventCollect".equals(methodName) || "sendEventMono".equals(methodName)) {
|
||||||
processSendEvent(node, cu, triggers);
|
processSendEvent(node, cu, triggers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,10 +47,12 @@ public class GenericEventDetector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void processSendEvent(MethodInvocation node, CompilationUnit cu, List<TriggerPoint> triggers) {
|
private void processSendEvent(MethodInvocation node, CompilationUnit cu, List<TriggerPoint> triggers) {
|
||||||
TriggerPoint trigger = buildTriggerPoint(node, cu, null);
|
List<TriggerPoint> builtTriggers = buildTriggerPoints(node, cu, null);
|
||||||
if (trigger != null) {
|
if (builtTriggers != null) {
|
||||||
log.debug("Successfully built trigger point: {}", trigger.getEvent());
|
for (TriggerPoint trigger : builtTriggers) {
|
||||||
triggers.add(trigger);
|
log.debug("Successfully built trigger point: {}", trigger.getEvent());
|
||||||
|
triggers.add(trigger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,10 +64,12 @@ public class GenericEventDetector {
|
|||||||
|
|
||||||
for (LibraryHint hint : hints) {
|
for (LibraryHint hint : hints) {
|
||||||
if (calledMethod.equals(hint.getMethodFqn()) || isHintMatch(calledMethod, hint.getMethodFqn())) {
|
if (calledMethod.equals(hint.getMethodFqn()) || isHintMatch(calledMethod, hint.getMethodFqn())) {
|
||||||
TriggerPoint trigger = buildTriggerPoint(node, cu, hint.getEvent());
|
List<TriggerPoint> builtTriggers = buildTriggerPoints(node, cu, hint.getEvent());
|
||||||
if (trigger != null) {
|
if (builtTriggers != null) {
|
||||||
log.debug("Successfully built synthetic trigger point from hint: {}", trigger.getEvent());
|
for (TriggerPoint trigger : builtTriggers) {
|
||||||
triggers.add(trigger);
|
log.debug("Successfully built synthetic trigger point from hint: {}", trigger.getEvent());
|
||||||
|
triggers.add(trigger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,12 +106,12 @@ public class GenericEventDetector {
|
|||||||
return receiver.toString() + "." + methodName;
|
return receiver.toString() + "." + methodName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TriggerPoint buildTriggerPoint(MethodInvocation node, CompilationUnit cu, String forcedEvent) {
|
private List<TriggerPoint> buildTriggerPoints(MethodInvocation node, CompilationUnit cu, String forcedEvent) {
|
||||||
String eventValue = null;
|
String eventValue = null;
|
||||||
if (forcedEvent != null) {
|
if (forcedEvent != null) {
|
||||||
eventValue = context.resolveString(forcedEvent);
|
eventValue = context.resolveString(forcedEvent);
|
||||||
} else {
|
} else {
|
||||||
if (node.arguments().isEmpty()) return null;
|
if (node.arguments().isEmpty()) return Collections.emptyList();
|
||||||
Expression eventExpr = (Expression) node.arguments().get(0);
|
Expression eventExpr = (Expression) node.arguments().get(0);
|
||||||
|
|
||||||
// Try MessageBuilder extraction first
|
// Try MessageBuilder extraction first
|
||||||
@@ -122,34 +127,171 @@ public class GenericEventDetector {
|
|||||||
MethodDeclaration method = findEnclosingMethod(node);
|
MethodDeclaration method = findEnclosingMethod(node);
|
||||||
TypeDeclaration type = findEnclosingType(node);
|
TypeDeclaration type = findEnclosingType(node);
|
||||||
|
|
||||||
if (type == null) return null;
|
if (type == null) return Collections.emptyList();
|
||||||
|
|
||||||
return TriggerPoint.builder()
|
String sourceState = extractSourceState(node);
|
||||||
.event(eventValue)
|
|
||||||
.className(context.getFqn(type))
|
List<TriggerPoint> results = new ArrayList<>();
|
||||||
.methodName(method != null ? method.getName().getIdentifier() : "initializer")
|
if (eventValue != null && eventValue.startsWith("ENUM_SET:")) {
|
||||||
.sourceFile(context.getRelativePath(context.getFqn(type)))
|
String[] parts = eventValue.substring(9).split(",");
|
||||||
.lineNumber(cu.getLineNumber(node.getStartPosition()))
|
for (String part : parts) {
|
||||||
.build();
|
if (!part.trim().isEmpty()) {
|
||||||
|
results.add(TriggerPoint.builder()
|
||||||
|
.event(part.trim())
|
||||||
|
.sourceState(sourceState)
|
||||||
|
.className(context.getFqn(type))
|
||||||
|
.methodName(method != null ? method.getName().getIdentifier() : "initializer")
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn(type)))
|
||||||
|
.lineNumber(cu.getLineNumber(node.getStartPosition()))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
results.add(TriggerPoint.builder()
|
||||||
|
.event(eventValue)
|
||||||
|
.sourceState(sourceState)
|
||||||
|
.className(context.getFqn(type))
|
||||||
|
.methodName(method != null ? method.getName().getIdentifier() : "initializer")
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn(type)))
|
||||||
|
.lineNumber(cu.getLineNumber(node.getStartPosition()))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String extractSourceState(ASTNode node) {
|
||||||
|
ASTNode current = node.getParent();
|
||||||
|
while (current != null && !(current instanceof MethodDeclaration)) {
|
||||||
|
if (current instanceof IfStatement ifStmt) {
|
||||||
|
Expression expr = ifStmt.getExpression();
|
||||||
|
String state = extractStateFromExpression(expr);
|
||||||
|
if (state != null) return state;
|
||||||
|
} else if (current instanceof SwitchCase switchCase) {
|
||||||
|
if (!switchCase.expressions().isEmpty()) {
|
||||||
|
return getSimpleNameString((Expression) switchCase.expressions().get(0));
|
||||||
|
}
|
||||||
|
} else if (current instanceof SwitchStatement switchStmt) {
|
||||||
|
// If it's a switch block but we haven't hit a SwitchCase directly (AST hierarchy usually has SwitchCase as siblings of block statements)
|
||||||
|
// Actually, walking up from the node, we will hit the SwitchStatement, but we need the SwitchCase right before us in the block.
|
||||||
|
ASTNode parentBlock = current;
|
||||||
|
// It's complex to walk siblings. A simpler heuristic is to just use IfStatement and SwitchCase (if wrapped correctly).
|
||||||
|
}
|
||||||
|
current = current.getParent();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String extractStateFromExpression(Expression expr) {
|
||||||
|
if (expr instanceof InfixExpression infix) {
|
||||||
|
if (infix.getOperator() == InfixExpression.Operator.EQUALS) {
|
||||||
|
Expression left = infix.getLeftOperand();
|
||||||
|
Expression right = infix.getRightOperand();
|
||||||
|
// Usually one is a method call like getState(), the other is an enum
|
||||||
|
if (left instanceof QualifiedName || left instanceof SimpleName && !(right instanceof SimpleName)) {
|
||||||
|
return getSimpleNameString(left);
|
||||||
|
}
|
||||||
|
if (right instanceof QualifiedName || right instanceof SimpleName && !(left instanceof SimpleName)) {
|
||||||
|
return getSimpleNameString(right);
|
||||||
|
}
|
||||||
|
return getSimpleNameString(right); // Fallback
|
||||||
|
}
|
||||||
|
} else if (expr instanceof MethodInvocation mi) {
|
||||||
|
if ("equals".equals(mi.getName().getIdentifier()) && !mi.arguments().isEmpty()) {
|
||||||
|
return getSimpleNameString((Expression) mi.arguments().get(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSimpleNameString(Expression expr) {
|
||||||
|
if (expr instanceof QualifiedName qn) {
|
||||||
|
return qn.getName().getIdentifier();
|
||||||
|
} else if (expr instanceof FieldAccess fa) {
|
||||||
|
return fa.getName().getIdentifier();
|
||||||
|
} else if (expr instanceof StringLiteral sl) {
|
||||||
|
return sl.getLiteralValue();
|
||||||
|
}
|
||||||
|
return expr.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String extractEventFromMessageBuilder(Expression expr) {
|
private String extractEventFromMessageBuilder(Expression expr) {
|
||||||
|
if (expr instanceof CastExpression ce) {
|
||||||
|
return extractEventFromMessageBuilder(ce.getExpression());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expr instanceof SimpleName sn) {
|
||||||
|
String varName = sn.getIdentifier();
|
||||||
|
MethodDeclaration enclosingMethod = findEnclosingMethod(expr);
|
||||||
|
if (enclosingMethod != null) {
|
||||||
|
// Find variable declaration
|
||||||
|
final Expression[] initializer = new Expression[1];
|
||||||
|
enclosingMethod.accept(new ASTVisitor() {
|
||||||
|
@Override
|
||||||
|
public boolean visit(VariableDeclarationFragment node) {
|
||||||
|
if (node.getName().getIdentifier().equals(varName) && node.getInitializer() != null) {
|
||||||
|
initializer[0] = node.getInitializer();
|
||||||
|
}
|
||||||
|
return super.visit(node);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean visit(Assignment node) {
|
||||||
|
if (node.getLeftHandSide() instanceof SimpleName asn && asn.getIdentifier().equals(varName)) {
|
||||||
|
initializer[0] = node.getRightHandSide();
|
||||||
|
}
|
||||||
|
return super.visit(node);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (initializer[0] != null) {
|
||||||
|
return extractEventFromMessageBuilder(initializer[0]); // recursive
|
||||||
|
}
|
||||||
|
|
||||||
|
// If it has NO initializer, it might be a method parameter!
|
||||||
|
for (Object paramObj : enclosingMethod.parameters()) {
|
||||||
|
if (paramObj instanceof SingleVariableDeclaration svd) {
|
||||||
|
if (svd.getName().getIdentifier().equals(varName)) {
|
||||||
|
return varName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(expr instanceof MethodInvocation mi)) return null;
|
if (!(expr instanceof MethodInvocation mi)) return null;
|
||||||
|
|
||||||
// Trace back chain: MessageBuilder.withPayload(event).setHeader(...).build()
|
// Trace back chain: MessageBuilder.withPayload(event).setHeader(...).build()
|
||||||
MethodInvocation current = mi;
|
MethodInvocation current = mi;
|
||||||
while (current != null) {
|
while (current != null) {
|
||||||
String name = current.getName().getIdentifier();
|
String name = current.getName().getIdentifier();
|
||||||
if ("withPayload".equals(name) && !current.arguments().isEmpty()) {
|
if (("withPayload".equals(name) || "just".equals(name)) && !current.arguments().isEmpty()) {
|
||||||
Expression payloadExpr = (Expression) current.arguments().get(0);
|
Expression payloadExpr = (Expression) current.arguments().get(0);
|
||||||
|
|
||||||
|
// If it's Mono.just(msg), where msg is a variable
|
||||||
|
if ("just".equals(name)) {
|
||||||
|
String extracted = extractEventFromMessageBuilder(payloadExpr);
|
||||||
|
if (extracted != null) return extracted;
|
||||||
|
}
|
||||||
|
|
||||||
String resolved = constantResolver.resolve(payloadExpr, context);
|
String resolved = constantResolver.resolve(payloadExpr, context);
|
||||||
if (resolved != null) return resolved;
|
if (resolved != null) return resolved;
|
||||||
|
|
||||||
// If not a constant, it might be a parameter like 'event'
|
// If not a constant, it might be a parameter like 'event'
|
||||||
|
if (payloadExpr instanceof CastExpression ce) {
|
||||||
|
payloadExpr = ce.getExpression();
|
||||||
|
}
|
||||||
|
|
||||||
if (payloadExpr instanceof SimpleName sn) {
|
if (payloadExpr instanceof SimpleName sn) {
|
||||||
return sn.getIdentifier(); // Return the parameter name so the call graph can fill it
|
String extracted = extractEventFromMessageBuilder(payloadExpr);
|
||||||
|
if (extracted != null) {
|
||||||
|
return extracted;
|
||||||
|
}
|
||||||
|
return sn.getIdentifier(); // Fall back to returning the parameter name
|
||||||
}
|
}
|
||||||
return payloadExpr.toString();
|
return payloadExpr.toString();
|
||||||
|
} else if (current.arguments().isEmpty() && current.getExpression() instanceof SimpleName sn) {
|
||||||
|
// If the event is obtained by calling a method on a provider/supplier parameter,
|
||||||
|
// return the provider's name so CallGraphBuilder can trace the lambda argument
|
||||||
|
return sn.getIdentifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression receiver = current.getExpression();
|
Expression receiver = current.getExpression();
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class MessagingDetector {
|
|||||||
.name(protocolName + ": " + destination)
|
.name(protocolName + ": " + destination)
|
||||||
.className(context.getFqn((TypeDeclaration) method.getParent()))
|
.className(context.getFqn((TypeDeclaration) method.getParent()))
|
||||||
.methodName(method.getName().getIdentifier())
|
.methodName(method.getName().getIdentifier())
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn((TypeDeclaration) method.getParent())))
|
||||||
.metadata(metadata)
|
.metadata(metadata)
|
||||||
.parameters(extractParameters(method))
|
.parameters(extractParameters(method))
|
||||||
.build());
|
.build());
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import click.kamil.springstatemachineexporter.analysis.resolver.ConstantResolver
|
|||||||
import click.kamil.springstatemachineexporter.model.Action;
|
import click.kamil.springstatemachineexporter.model.Action;
|
||||||
import click.kamil.springstatemachineexporter.model.Guard;
|
import click.kamil.springstatemachineexporter.model.Guard;
|
||||||
import click.kamil.springstatemachineexporter.model.State;
|
import click.kamil.springstatemachineexporter.model.State;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Event;
|
||||||
import click.kamil.springstatemachineexporter.model.Transition;
|
import click.kamil.springstatemachineexporter.model.Transition;
|
||||||
import click.kamil.springstatemachineexporter.model.TransitionType;
|
import click.kamil.springstatemachineexporter.model.TransitionType;
|
||||||
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
||||||
@@ -213,12 +214,33 @@ public class AstTransitionParser {
|
|||||||
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
||||||
String eventValue = constantResolver.resolve(resolved, context);
|
String eventValue = constantResolver.resolve(resolved, context);
|
||||||
if (eventValue != null) {
|
if (eventValue != null) {
|
||||||
t.setEvent(eventValue);
|
t.setEvent(Event.of(resolved.toString(), eventValue));
|
||||||
|
} else if (resolved instanceof QualifiedName qn) {
|
||||||
|
String qualifier = qn.getQualifier().toString();
|
||||||
|
String name = qn.getName().getIdentifier();
|
||||||
|
TypeDeclaration td = context.getTypeDeclaration(qualifier, cu);
|
||||||
|
if (td != null) {
|
||||||
|
t.setEvent(Event.of(resolved.toString(), context.getFqn(td) + "." + name));
|
||||||
|
} else {
|
||||||
|
t.setEvent(Event.of(resolved.toString(), qn.getFullyQualifiedName()));
|
||||||
|
}
|
||||||
|
} else if (resolved instanceof SimpleName sn) {
|
||||||
|
String name = sn.getIdentifier();
|
||||||
|
String full = name;
|
||||||
|
for (Object impObj : cu.imports()) {
|
||||||
|
ImportDeclaration imp = (ImportDeclaration) impObj;
|
||||||
|
String impName = imp.getName().getFullyQualifiedName();
|
||||||
|
if (impName.endsWith("." + name)) {
|
||||||
|
full = impName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t.setEvent(Event.of(resolved.toString(), full));
|
||||||
} else {
|
} else {
|
||||||
t.setEvent(QuotedExpression.of(resolved).toStringWithoutQuotes());
|
t.setEvent(Event.of(QuotedExpression.of(resolved).toStringWithoutQuotes()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "guard" -> {
|
case "guard", "guardExpression" -> {
|
||||||
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
||||||
parseGuard(resolved, t, cu, context);
|
parseGuard(resolved, t, cu, context);
|
||||||
}
|
}
|
||||||
@@ -226,6 +248,10 @@ public class AstTransitionParser {
|
|||||||
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
||||||
parseAction(resolved, t, cu, context);
|
parseAction(resolved, t, cu, context);
|
||||||
}
|
}
|
||||||
|
case "timer", "timerOnce" -> {
|
||||||
|
Expression resolved = resolveArg((Expression) args.get(0), argsMap);
|
||||||
|
t.setEvent(Event.of(methodName + "(" + resolved.toString() + ")", methodName + "(" + resolved.toString() + ")"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ public class CodebaseContext {
|
|||||||
private final List<CompilationUnit> allCus = new ArrayList<>();
|
private final List<CompilationUnit> allCus = new ArrayList<>();
|
||||||
|
|
||||||
private final Map<String, List<String>> interfaceToImpls = new HashMap<>();
|
private final Map<String, List<String>> interfaceToImpls = new HashMap<>();
|
||||||
|
private final Map<String, List<String>> enumValues = new HashMap<>();
|
||||||
|
|
||||||
public void scan(Set<Path> rootDirs, Set<String> customIgnorePatterns) throws IOException {
|
public void scan(Set<Path> rootDirs, Set<String> customIgnorePatterns) throws IOException {
|
||||||
this.allProperties = propertyResolver.resolveAllProperties(rootDirs);
|
this.allProperties = propertyResolver.resolveAllProperties(rootDirs);
|
||||||
@@ -188,6 +189,8 @@ public class CodebaseContext {
|
|||||||
for (Object type : cu.types()) {
|
for (Object type : cu.types()) {
|
||||||
if (type instanceof TypeDeclaration td) {
|
if (type instanceof TypeDeclaration td) {
|
||||||
indexType(td, packageName, javaFile);
|
indexType(td, packageName, javaFile);
|
||||||
|
} else if (type instanceof EnumDeclaration ed) {
|
||||||
|
indexEnum(ed, packageName, javaFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,11 +233,53 @@ public class CodebaseContext {
|
|||||||
|
|
||||||
// Try FQN match if input was simple name
|
// Try FQN match if input was simple name
|
||||||
String fqn = simpleNameToFqn.get(interfaceName);
|
String fqn = simpleNameToFqn.get(interfaceName);
|
||||||
if (fqn != null) return interfaceToImpls.getOrDefault(fqn, Collections.emptyList());
|
if (fqn != null && interfaceToImpls.containsKey(fqn)) {
|
||||||
|
return interfaceToImpls.get(fqn);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try simple name match if input was FQN
|
||||||
|
if (interfaceName.contains(".")) {
|
||||||
|
String simpleName = interfaceName.substring(interfaceName.lastIndexOf('.') + 1);
|
||||||
|
List<String> simpleImpls = interfaceToImpls.get(simpleName);
|
||||||
|
if (simpleImpls != null) {
|
||||||
|
// To be perfectly safe, we could check if simpleNameToFqn matches,
|
||||||
|
// but for call graphs, returning potential implementations is fine.
|
||||||
|
return simpleImpls;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void indexEnum(EnumDeclaration ed, String parentFqn, Path javaFile) {
|
||||||
|
String simpleName = ed.getName().getIdentifier();
|
||||||
|
String fqn = parentFqn.isEmpty() ? simpleName : parentFqn + "." + simpleName;
|
||||||
|
|
||||||
|
classes.put(fqn, (CompilationUnit) ed.getRoot());
|
||||||
|
classPaths.put(fqn, javaFile);
|
||||||
|
|
||||||
|
List<String> values = new ArrayList<>();
|
||||||
|
for (Object o : ed.enumConstants()) {
|
||||||
|
if (o instanceof EnumConstantDeclaration ecd) {
|
||||||
|
values.add(fqn + "." + ecd.getName().getIdentifier());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enumValues.put(fqn, values);
|
||||||
|
if (!simpleNameToFqn.containsKey(simpleName)) {
|
||||||
|
simpleNameToFqn.put(simpleName, fqn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getEnumValues(String fqnOrSimpleName) {
|
||||||
|
if (fqnOrSimpleName == null) return null;
|
||||||
|
List<String> values = enumValues.get(fqnOrSimpleName);
|
||||||
|
if (values != null) return values;
|
||||||
|
String fqn = simpleNameToFqn.get(fqnOrSimpleName);
|
||||||
|
if (fqn != null) return enumValues.get(fqn);
|
||||||
|
// Also try stripping array or generic types if any (e.g. MyEnum[])
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public State resolveState(Expression expr, CompilationUnit cu) {
|
public State resolveState(Expression expr, CompilationUnit cu) {
|
||||||
if (expr == null)
|
if (expr == null)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ public class FileUtils {
|
|||||||
return paths
|
return paths
|
||||||
.filter(p -> Files.isRegularFile(p) && p.toString().endsWith(extension))
|
.filter(p -> Files.isRegularFile(p) && p.toString().endsWith(extension))
|
||||||
.filter(p -> matchers.stream().noneMatch(m -> m.matches(p)))
|
.filter(p -> matchers.stream().noneMatch(m -> m.matches(p)))
|
||||||
|
.map(Path::toAbsolutePath)
|
||||||
|
.map(Path::normalize)
|
||||||
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ public class ExporterCommand implements Callable<Integer> {
|
|||||||
@Option(names = {"-p", "--profiles"}, description = "Spring profiles to activate for property resolution.", split = ",")
|
@Option(names = {"-p", "--profiles"}, description = "Spring profiles to activate for property resolution.", split = ",")
|
||||||
private List<String> activeProfiles;
|
private List<String> activeProfiles;
|
||||||
|
|
||||||
|
@Option(names = {"--event"}, description = "Format for events when they are enums: fn (fullName, default), fqn (fully qualified name), sn (short name)", defaultValue = "fn")
|
||||||
|
private click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat;
|
||||||
|
|
||||||
|
@Option(names = {"--state"}, description = "Format for states when they are enums: fn (fullName, default), fqn (fully qualified name), sn (short name)", defaultValue = "fn")
|
||||||
|
private click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer call() throws Exception {
|
public Integer call() throws Exception {
|
||||||
var out = spec.commandLine().getOut();
|
var out = spec.commandLine().getOut();
|
||||||
@@ -71,9 +77,9 @@ public class ExporterCommand implements Callable<Integer> {
|
|||||||
try {
|
try {
|
||||||
List<String> profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList();
|
List<String> profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList();
|
||||||
if (jsonFile != null) {
|
if (jsonFile != null) {
|
||||||
exportService.runJsonExporter(jsonFile, outputDir, selectedFormats, profiles);
|
exportService.runJsonExporter(jsonFile, outputDir, selectedFormats, profiles, eventFormat, stateFormat);
|
||||||
} else {
|
} else {
|
||||||
exportService.runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, profiles);
|
exportService.runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, profiles, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ All state machines have been exported to " + outputDir.toAbsolutePath()));
|
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ All state machines have been exported to " + outputDir.toAbsolutePath()));
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class Dot implements StateMachineExporter {
|
|||||||
for (Transition t : transitions) {
|
for (Transition t : transitions) {
|
||||||
if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) {
|
if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) {
|
||||||
for (State source : t.getSourceStates()) {
|
for (State source : t.getSourceStates()) {
|
||||||
String simplified = simplify(source.toString());
|
String simplified = simplify(options.formatState(source));
|
||||||
statesWithChoice.add(simplified);
|
statesWithChoice.add(simplified);
|
||||||
if (!choiceColorMap.containsKey(simplified)) {
|
if (!choiceColorMap.containsKey(simplified)) {
|
||||||
choiceColorMap.put(simplified, CHOICE_COLORS[colorIndex % CHOICE_COLORS.length]);
|
choiceColorMap.put(simplified, CHOICE_COLORS[colorIndex % CHOICE_COLORS.length]);
|
||||||
@@ -86,11 +86,11 @@ public class Dot implements StateMachineExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (State rawSourceState : t.getSourceStates()) {
|
for (State rawSourceState : t.getSourceStates()) {
|
||||||
String rawSource = rawSourceState.toString();
|
String rawSource = options.formatState(rawSourceState);
|
||||||
String source = simplify(rawSource);
|
String source = simplify(rawSource);
|
||||||
|
|
||||||
for (State rawTargetState : targets) {
|
for (State rawTargetState : targets) {
|
||||||
String rawTarget = rawTargetState.toString();
|
String rawTarget = options.formatState(rawTargetState);
|
||||||
String target = simplify(rawTarget);
|
String target = simplify(rawTarget);
|
||||||
String edgeSource = source;
|
String edgeSource = source;
|
||||||
|
|
||||||
@@ -100,8 +100,11 @@ public class Dot implements StateMachineExporter {
|
|||||||
|
|
||||||
// Label: event [guard] / actions
|
// Label: event [guard] / actions
|
||||||
StringBuilder label = new StringBuilder();
|
StringBuilder label = new StringBuilder();
|
||||||
if (t.getEvent() != null && !t.getEvent().isBlank()) {
|
if (t.getEvent() != null) {
|
||||||
label.append(escapeDotString(t.getEvent()));
|
String eventStr = options.formatEvent(t.getEvent());
|
||||||
|
if (eventStr != null && !eventStr.isBlank()) {
|
||||||
|
label.append(escapeDotString(eventStr));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Guard
|
// Guard
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.exporter;
|
||||||
|
|
||||||
|
public enum EnumFormat {
|
||||||
|
fn, fqn, sn
|
||||||
|
}
|
||||||
@@ -12,4 +12,37 @@ public class ExportOptions {
|
|||||||
boolean renderChoicesAsDiamonds = true;
|
boolean renderChoicesAsDiamonds = true;
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
boolean embedIdentifiers = false;
|
boolean embedIdentifiers = false;
|
||||||
|
@Builder.Default
|
||||||
|
boolean includeMetadataPane = true;
|
||||||
|
|
||||||
|
@Builder.Default
|
||||||
|
EnumFormat eventFormat = EnumFormat.fn;
|
||||||
|
@Builder.Default
|
||||||
|
EnumFormat stateFormat = EnumFormat.fn;
|
||||||
|
|
||||||
|
public String formatState(click.kamil.springstatemachineexporter.model.State state) {
|
||||||
|
if (state == null) return null;
|
||||||
|
return format(state.rawName(), state.fullIdentifier(), stateFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String formatEvent(click.kamil.springstatemachineexporter.model.Event event) {
|
||||||
|
if (event == null) return null;
|
||||||
|
return format(event.rawName(), event.fullIdentifier(), eventFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String format(String raw, String fqn, EnumFormat format) {
|
||||||
|
if (fqn == null) return raw;
|
||||||
|
switch (format) {
|
||||||
|
case fqn: return fqn;
|
||||||
|
case sn: return fqn.substring(fqn.lastIndexOf('.') + 1);
|
||||||
|
case fn:
|
||||||
|
int lastDot = fqn.lastIndexOf('.');
|
||||||
|
if (lastDot > 0) {
|
||||||
|
int prevDot = fqn.lastIndexOf('.', lastDot - 1);
|
||||||
|
return prevDot > 0 ? fqn.substring(prevDot + 1) : fqn;
|
||||||
|
}
|
||||||
|
return fqn;
|
||||||
|
default: return raw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
for (Transition t : transitions) {
|
for (Transition t : transitions) {
|
||||||
if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) {
|
if (t.getType() == TransitionType.CHOICE && t.getSourceStates() != null) {
|
||||||
for (State source : t.getSourceStates()) {
|
for (State source : t.getSourceStates()) {
|
||||||
statesWithChoice.add(simplify(source.toString()));
|
statesWithChoice.add(simplify(options.formatState(source)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
Set<String> junctionStates = transitions.stream()
|
Set<String> junctionStates = transitions.stream()
|
||||||
.filter(t -> t.getType() == TransitionType.JUNCTION)
|
.filter(t -> t.getType() == TransitionType.JUNCTION)
|
||||||
.flatMap(t -> t.getSourceStates().stream())
|
.flatMap(t -> t.getSourceStates().stream())
|
||||||
.map(s -> simplify(s.toString()))
|
.map(s -> simplify(options.formatState(s)))
|
||||||
.collect(Collectors.toCollection(java.util.LinkedHashSet::new));
|
.collect(Collectors.toCollection(java.util.LinkedHashSet::new));
|
||||||
for (String junction : junctionStates) {
|
for (String junction : junctionStates) {
|
||||||
if (options.isRenderChoicesAsDiamonds()) {
|
if (options.isRenderChoicesAsDiamonds()) {
|
||||||
@@ -96,16 +96,16 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
List<String> targets;
|
List<String> targets;
|
||||||
if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) {
|
if (t.getTargetStates() == null || t.getTargetStates().isEmpty()) {
|
||||||
if (!allowNoTarget) {
|
if (!allowNoTarget) {
|
||||||
targets = t.getSourceStates().stream().map(s -> s.toString()).toList();
|
targets = t.getSourceStates().stream().map(s -> options.formatState(s)).toList();
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
targets = t.getTargetStates().stream().map(s -> s.toString()).toList();
|
targets = t.getTargetStates().stream().map(s -> options.formatState(s)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (State rawSourceState : t.getSourceStates()) {
|
for (State rawSourceState : t.getSourceStates()) {
|
||||||
String source = simplify(rawSourceState.toString());
|
String source = simplify(options.formatState(rawSourceState));
|
||||||
|
|
||||||
for (String rawTarget : targets) {
|
for (String rawTarget : targets) {
|
||||||
String target = simplify(rawTarget);
|
String target = simplify(rawTarget);
|
||||||
@@ -116,19 +116,23 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
|
|
||||||
sb.append(" <<").append(styleClass).append(">>");
|
sb.append(" <<").append(styleClass).append(">>");
|
||||||
|
|
||||||
if (t.getEvent() != null && !t.getEvent().isBlank()) {
|
|
||||||
sb.append(" <<e_").append(normalize(t.getEvent())).append(">>");
|
|
||||||
}
|
|
||||||
|
|
||||||
String label = buildLabel(t, options.isUseLambdaGuards());
|
String label = buildLabel(t, options);
|
||||||
if (options.isEmbedIdentifiers()) {
|
if (options.isEmbedIdentifiers()) {
|
||||||
String linkId = t.getEvent() != null ? "link_" + normalize(t.getEvent()) : "link_anon_" + normalize(source) + "_" + normalize(target);
|
String eventStr = t.getEvent() != null ? options.formatEvent(t.getEvent()) : null;
|
||||||
// Force a label even if empty to ensure the link group exists in SVG
|
String linkId = eventStr != null && !eventStr.isBlank() ? "link_" + normalize(source) + "__" + normalize(eventStr) : "link_anon_" + normalize(source) + "_" + normalize(target);
|
||||||
String displayLabel = label.isEmpty() ? " " : label;
|
|
||||||
// Brackets [...] in the label break PlantUML link syntax [[url label]],
|
sb.append(" : [[#").append(linkId).append(" ");
|
||||||
// so we strip them for the interactive identification label.
|
if (!label.isEmpty()) {
|
||||||
String safeLabel = displayLabel.replaceAll("[\\[\\]]", "");
|
String sanitized = label.replace("[", "[")
|
||||||
sb.append(" : ").append("[[#").append(linkId).append(" ").append(safeLabel).append("]]");
|
.replace("]", "]")
|
||||||
|
.replace("<", "<")
|
||||||
|
.replace(">", ">");
|
||||||
|
sb.append(sanitized);
|
||||||
|
} else {
|
||||||
|
sb.append(".");
|
||||||
|
}
|
||||||
|
sb.append("]]");
|
||||||
} else if (!label.isEmpty()) {
|
} else if (!label.isEmpty()) {
|
||||||
sb.append(" : ").append(label);
|
sb.append(" : ").append(label);
|
||||||
}
|
}
|
||||||
@@ -191,14 +195,17 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
return state.replaceAll("[^a-zA-Z0-9_.]", "");
|
return state.replaceAll("[^a-zA-Z0-9_.]", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buildLabel(Transition t, boolean useLambdaGuards) {
|
private String buildLabel(Transition t, ExportOptions options) {
|
||||||
List<String> parts = new ArrayList<>();
|
List<String> parts = new ArrayList<>();
|
||||||
if (t.getEvent() != null && !t.getEvent().isBlank()) {
|
if (t.getEvent() != null) {
|
||||||
parts.add(t.getEvent());
|
String eventStr = options.formatEvent(t.getEvent());
|
||||||
|
if (eventStr != null && !eventStr.isBlank()) {
|
||||||
|
parts.add(eventStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (t.getGuard() != null) {
|
if (t.getGuard() != null) {
|
||||||
String g = t.getGuard().expression();
|
String g = t.getGuard().expression();
|
||||||
if (useLambdaGuards && t.getGuard().isLambda()) {
|
if (options.isUseLambdaGuards() && t.getGuard().isLambda()) {
|
||||||
parts.add("[" + LAMBDA + "]");
|
parts.add("[" + LAMBDA + "]");
|
||||||
} else {
|
} else {
|
||||||
parts.add("[" + g.replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim() + "]");
|
parts.add("[" + g.replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim() + "]");
|
||||||
@@ -206,7 +213,7 @@ public class PlantUml implements StateMachineExporter {
|
|||||||
}
|
}
|
||||||
if (t.getActions() != null && !t.getActions().isEmpty()) {
|
if (t.getActions() != null && !t.getActions().isEmpty()) {
|
||||||
parts.add("/ " + t.getActions().stream()
|
parts.add("/ " + t.getActions().stream()
|
||||||
.map(a -> (useLambdaGuards && a.isLambda()) ? LAMBDA : a.expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim())
|
.map(a -> (options.isUseLambdaGuards() && a.isLambda()) ? LAMBDA : a.expression().replaceAll("[\\n\\r]+", " ").replaceAll("\\s{2,}", " ").trim())
|
||||||
.collect(Collectors.joining(", ")));
|
.collect(Collectors.joining(", ")));
|
||||||
}
|
}
|
||||||
Optional.ofNullable(t.getOrder())
|
Optional.ofNullable(t.getOrder())
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ public class Scxml implements StateMachineExporter {
|
|||||||
|
|
||||||
Set<String> allStates = new java.util.LinkedHashSet<>();
|
Set<String> allStates = new java.util.LinkedHashSet<>();
|
||||||
for (Transition t : transitions) {
|
for (Transition t : transitions) {
|
||||||
t.getSourceStates().forEach(s -> allStates.add(s.toString()));
|
t.getSourceStates().forEach(s -> allStates.add(options.formatState(s)));
|
||||||
t.getTargetStates().forEach(s -> allStates.add(s.toString()));
|
t.getTargetStates().forEach(s -> allStates.add(options.formatState(s)));
|
||||||
}
|
}
|
||||||
allStates.addAll(startStates);
|
allStates.addAll(startStates);
|
||||||
allStates.addAll(endStates);
|
allStates.addAll(endStates);
|
||||||
@@ -41,7 +41,7 @@ public class Scxml implements StateMachineExporter {
|
|||||||
sb.append(" <state id=\"").append(simplify(state)).append("\">\n");
|
sb.append(" <state id=\"").append(simplify(state)).append("\">\n");
|
||||||
|
|
||||||
for (Transition t : transitions) {
|
for (Transition t : transitions) {
|
||||||
if (t.getSourceStates() == null || t.getSourceStates().stream().noneMatch(s -> s.toString().equals(state)))
|
if (t.getSourceStates() == null || t.getSourceStates().stream().noneMatch(s -> options.formatState(s).equals(state)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
boolean allowNoTarget = t.getType() == TransitionType.JOIN || t.getType() == TransitionType.FORK;
|
boolean allowNoTarget = t.getType() == TransitionType.JOIN || t.getType() == TransitionType.FORK;
|
||||||
@@ -58,7 +58,7 @@ public class Scxml implements StateMachineExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (State target : targets) {
|
for (State target : targets) {
|
||||||
sb.append(renderTransition(t, target, options.isUseLambdaGuards()));
|
sb.append(renderTransition(t, target, options));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sb.append(" </state>\n");
|
sb.append(" </state>\n");
|
||||||
@@ -73,15 +73,18 @@ public class Scxml implements StateMachineExporter {
|
|||||||
return ".scxml.xml";
|
return ".scxml.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String renderTransition(Transition t, State target, boolean useLambdaGuards) {
|
private String renderTransition(Transition t, State target, ExportOptions options) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(" <transition target=\"").append(simplify(target.toString())).append("\"");
|
sb.append(" <transition target=\"").append(simplify(options.formatState(target))).append("\"");
|
||||||
|
|
||||||
if (t.getEvent() != null && !t.getEvent().isBlank()) {
|
if (t.getEvent() != null) {
|
||||||
sb.append(" event=\"").append(escapeXml(t.getEvent())).append("\"");
|
String eventStr = options.formatEvent(t.getEvent());
|
||||||
|
if (eventStr != null && !eventStr.isBlank()) {
|
||||||
|
sb.append(" event=\"").append(escapeXml(eventStr)).append("\"");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String guard = getGuardText(t, useLambdaGuards);
|
String guard = getGuardText(t, options.isUseLambdaGuards());
|
||||||
if (!guard.isBlank()) {
|
if (!guard.isBlank()) {
|
||||||
sb.append(" cond=\"").append(escapeXml(guard)).append("\"");
|
sb.append(" cond=\"").append(escapeXml(guard)).append("\"");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.model;
|
||||||
|
|
||||||
|
public record Event(String rawName, String fullIdentifier) {
|
||||||
|
public static Event of(String name) {
|
||||||
|
return new Event(name, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Event of(String raw, String full) {
|
||||||
|
return new Event(raw, full);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return fullIdentifier != null ? fullIdentifier : rawName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ public class Transition {
|
|||||||
private TransitionType type;
|
private TransitionType type;
|
||||||
private List<State> sourceStates = new ArrayList<>();
|
private List<State> sourceStates = new ArrayList<>();
|
||||||
private List<State> targetStates = new ArrayList<>();
|
private List<State> targetStates = new ArrayList<>();
|
||||||
private String event;
|
private Event event;
|
||||||
|
|
||||||
private Guard guard;
|
private Guard guard;
|
||||||
private List<Action> actions = new ArrayList<>();
|
private List<Action> actions = new ArrayList<>();
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ public class ExportService {
|
|||||||
new TriggerEnricher(),
|
new TriggerEnricher(),
|
||||||
new EntryPointEnricher(),
|
new EntryPointEnricher(),
|
||||||
new PropertyEnricher(),
|
new PropertyEnricher(),
|
||||||
new CallChainEnricher()
|
new CallChainEnricher(),
|
||||||
|
new click.kamil.springstatemachineexporter.analysis.enricher.TransitionLinkerEnricher()
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,14 +53,22 @@ public class ExportService {
|
|||||||
public static final Set<String> STATE_MACHINE_RETURN_TYPES = Set.of("StateMachine", "StateMachineFactory", "StateMachineModelFactory");
|
public static final Set<String> STATE_MACHINE_RETURN_TYPES = Set.of("StateMachine", "StateMachineFactory", "StateMachineModelFactory");
|
||||||
|
|
||||||
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds) throws IOException {
|
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds) throws IOException {
|
||||||
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, Collections.emptyList());
|
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, Collections.emptyList(), click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles) throws IOException {
|
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles) throws IOException {
|
||||||
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null);
|
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles, Path flowsOverride, String machineFilter) throws IOException {
|
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles, Path flowsOverride, String machineFilter) throws IOException {
|
||||||
|
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, flowsOverride, machineFilter, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
|
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null, eventFormat, stateFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles, Path flowsOverride, String machineFilter, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
CodebaseContext context = new CodebaseContext();
|
CodebaseContext context = new CodebaseContext();
|
||||||
context.setActiveProfiles(activeProfiles);
|
context.setActiveProfiles(activeProfiles);
|
||||||
|
|
||||||
@@ -116,21 +125,25 @@ public class ExportService {
|
|||||||
context.scan(allPaths, Collections.emptySet());
|
context.scan(allPaths, Collections.emptySet());
|
||||||
|
|
||||||
CodebaseIntelligenceProvider intelligence = new JdtIntelligenceProvider(context, inputDir);
|
CodebaseIntelligenceProvider intelligence = new JdtIntelligenceProvider(context, inputDir);
|
||||||
exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows, machineFilter, activeProfiles != null ? activeProfiles : Collections.emptyList());
|
exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows, machineFilter, activeProfiles != null ? activeProfiles : Collections.emptyList(), eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats) throws IOException {
|
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats) throws IOException {
|
||||||
runJsonExporter(jsonFile, outputDir, selectedFormats, Collections.emptyList());
|
runJsonExporter(jsonFile, outputDir, selectedFormats, Collections.emptyList(), click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats, List<String> activeProfiles) throws IOException {
|
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats, List<String> activeProfiles) throws IOException {
|
||||||
|
runJsonExporter(jsonFile, outputDir, selectedFormats, activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn, click.kamil.springstatemachineexporter.exporter.EnumFormat.fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats, List<String> activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
JsonImportService jsonImportService = new JsonImportService();
|
JsonImportService jsonImportService = new JsonImportService();
|
||||||
AnalysisResult result = jsonImportService.importAnalysisResult(jsonFile);
|
AnalysisResult result = jsonImportService.importAnalysisResult(jsonFile);
|
||||||
|
|
||||||
// Apply property resolution pass if placeholders exist
|
// Apply property resolution pass if placeholders exist
|
||||||
resolveProperties(result, activeProfiles);
|
resolveProperties(result, activeProfiles);
|
||||||
|
|
||||||
generateOutputs(outputDir, result, selectedFormats);
|
generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resolveProperties(AnalysisResult result, List<String> activeProfiles) {
|
private void resolveProperties(AnalysisResult result, List<String> activeProfiles) {
|
||||||
@@ -154,7 +167,7 @@ public class ExportService {
|
|||||||
result.applyResolution(merged);
|
result.applyResolution(merged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, String machineFilter, List<String> activeProfiles) throws IOException {
|
private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, String machineFilter, List<String> activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
Set<String> processedLocations = new HashSet<>();
|
Set<String> processedLocations = new HashSet<>();
|
||||||
|
|
||||||
// 1. Find entry point classes (annotated or extending adapter)
|
// 1. Find entry point classes (annotated or extending adapter)
|
||||||
@@ -163,7 +176,7 @@ public class ExportService {
|
|||||||
String fqn = context.getFqn(td);
|
String fqn = context.getFqn(td);
|
||||||
if (machineFilter != null && !fqn.contains(machineFilter)) continue;
|
if (machineFilter != null && !fqn.contains(machineFilter)) continue;
|
||||||
if (processedLocations.add(fqn)) {
|
if (processedLocations.add(fqn)) {
|
||||||
processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles);
|
processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,12 +190,12 @@ public class ExportService {
|
|||||||
|
|
||||||
if (machineFilter != null && !uniqueId.contains(machineFilter)) continue;
|
if (machineFilter != null && !uniqueId.contains(machineFilter)) continue;
|
||||||
if (processedLocations.add(uniqueId)) {
|
if (processedLocations.add(uniqueId)) {
|
||||||
processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles);
|
processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows, activeProfiles, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, List<String> activeProfiles) throws IOException {
|
private void processEntryPoint(TypeDeclaration td, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, List<String> activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
String className = context.getFqn(td);
|
String className = context.getFqn(td);
|
||||||
log.info("Processing state machine config: {}", className);
|
log.info("Processing state machine config: {}", className);
|
||||||
|
|
||||||
@@ -200,6 +213,11 @@ public class ExportService {
|
|||||||
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 = TransitionStateUtils.findAllStates(transitions, initialStatesAst, endStatesAst);
|
||||||
|
|
||||||
|
if (allStates.isEmpty() && transitions.isEmpty()) {
|
||||||
|
log.info("Skipping empty state machine config: {}", className);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AnalysisResult result = AnalysisResult.builder()
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
.name(className)
|
.name(className)
|
||||||
.states(allStates)
|
.states(allStates)
|
||||||
@@ -214,10 +232,10 @@ public class ExportService {
|
|||||||
|
|
||||||
resolveProperties(result, activeProfiles);
|
resolveProperties(result, activeProfiles);
|
||||||
|
|
||||||
generateOutputs(outputDir, result, selectedFormats);
|
generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, List<String> activeProfiles) throws IOException {
|
private void processBeanMethod(MethodDeclaration m, Path outputDir, CodebaseContext context, CodebaseIntelligenceProvider intelligence, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, List<String> activeProfiles, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
TypeDeclaration parentClass = (TypeDeclaration) m.getParent();
|
TypeDeclaration parentClass = (TypeDeclaration) m.getParent();
|
||||||
String parentFqn = context.getFqn(parentClass);
|
String parentFqn = context.getFqn(parentClass);
|
||||||
String methodName = m.getName().getIdentifier();
|
String methodName = m.getName().getIdentifier();
|
||||||
@@ -231,6 +249,11 @@ public class ExportService {
|
|||||||
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 = TransitionStateUtils.findAllStates(transitions, null, null);
|
||||||
|
|
||||||
|
if (allStates.isEmpty() && transitions.isEmpty()) {
|
||||||
|
log.info("Skipping empty state machine bean: {}", uniqueName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AnalysisResult result = AnalysisResult.builder()
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
.name(uniqueName)
|
.name(uniqueName)
|
||||||
.states(allStates)
|
.states(allStates)
|
||||||
@@ -245,10 +268,10 @@ public class ExportService {
|
|||||||
|
|
||||||
resolveProperties(result, activeProfiles);
|
resolveProperties(result, activeProfiles);
|
||||||
|
|
||||||
generateOutputs(outputDir, result, selectedFormats);
|
generateOutputs(outputDir, result, selectedFormats, eventFormat, stateFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateOutputs(Path outputDir, AnalysisResult result, List<String> selectedFormats) throws IOException {
|
private void generateOutputs(Path outputDir, AnalysisResult result, List<String> selectedFormats, click.kamil.springstatemachineexporter.exporter.EnumFormat eventFormat, click.kamil.springstatemachineexporter.exporter.EnumFormat stateFormat) throws IOException {
|
||||||
if (selectedFormats == null || selectedFormats.isEmpty()) {
|
if (selectedFormats == null || selectedFormats.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -259,6 +282,8 @@ public class ExportService {
|
|||||||
|
|
||||||
ExportOptions options = ExportOptions.builder()
|
ExportOptions options = ExportOptions.builder()
|
||||||
.renderChoicesAsDiamonds(result.isRenderChoicesAsDiamonds())
|
.renderChoicesAsDiamonds(result.isRenderChoicesAsDiamonds())
|
||||||
|
.eventFormat(eventFormat)
|
||||||
|
.stateFormat(stateFormat)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
for (StateMachineExporter exporter : exporters) {
|
for (StateMachineExporter exporter : exporters) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class GoldenUpdater {
|
|||||||
System.out.println("Updating golden files for: " + scenario.name());
|
System.out.println("Updating golden files for: " + scenario.name());
|
||||||
Path tempDir = Files.createTempDirectory("golden-update-");
|
Path tempDir = Files.createTempDirectory("golden-update-");
|
||||||
try {
|
try {
|
||||||
exportService.runExporter(scenario.inputPath(), tempDir, null, true);
|
exportService.runExporter(scenario.inputPath(), tempDir, List.of("puml", "dot", "scxml", "json"), true);
|
||||||
|
|
||||||
List<Path> generatedDirs;
|
List<Path> generatedDirs;
|
||||||
try (var stream = Files.list(tempDir)) {
|
try (var stream = Files.list(tempDir)) {
|
||||||
|
|||||||
@@ -137,6 +137,12 @@ public class RegressionTest {
|
|||||||
root.resolve("state_machines/maven_multi_module/core-module"),
|
root.resolve("state_machines/maven_multi_module/core-module"),
|
||||||
Path.of("src/test/resources/golden/MavenOrderStateMachine"),
|
Path.of("src/test/resources/golden/MavenOrderStateMachine"),
|
||||||
"MavenOrderStateMachine"
|
"MavenOrderStateMachine"
|
||||||
|
),
|
||||||
|
new TestScenario(
|
||||||
|
"Complex Multi-Module Sample",
|
||||||
|
root.resolve("state_machines/complex_multi_module_sm"),
|
||||||
|
Path.of("src/test/resources/golden/StateMachineConfig"),
|
||||||
|
"StateMachineConfig"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
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.model.Event;
|
||||||
|
import click.kamil.springstatemachineexporter.model.State;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Transition;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
class TransitionLinkerEnricherTest {
|
||||||
|
|
||||||
|
private final TransitionLinkerEnricher enricher = new TransitionLinkerEnricher();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldLinkTransitionByEventOnly() {
|
||||||
|
Transition t1 = new Transition();
|
||||||
|
t1.setSourceStates(List.of(State.of("NEW", "NEW")));
|
||||||
|
t1.setTargetStates(List.of(State.of("PAID", "PAID")));
|
||||||
|
t1.setEvent(Event.of("PAY", "PAY"));
|
||||||
|
|
||||||
|
Transition t2 = new Transition();
|
||||||
|
t2.setSourceStates(List.of(State.of("FAILED", "FAILED")));
|
||||||
|
t2.setTargetStates(List.of(State.of("PAID", "PAID")));
|
||||||
|
t2.setEvent(Event.of("PAY", "PAY"));
|
||||||
|
|
||||||
|
CallChain chain = CallChain.builder()
|
||||||
|
.triggerPoint(TriggerPoint.builder().event("PAY").build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.transitions(List.of(t1, t2))
|
||||||
|
.metadata(CodebaseMetadata.builder().callChains(List.of(chain)).build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
enricher.enrich(result, null, null);
|
||||||
|
|
||||||
|
CallChain updatedChain = result.getMetadata().getCallChains().get(0);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions()).hasSize(2);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions())
|
||||||
|
.extracting("sourceState")
|
||||||
|
.containsExactlyInAnyOrder("NEW", "FAILED");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldLinkTransitionByEventAndSourceState() {
|
||||||
|
Transition t1 = new Transition();
|
||||||
|
t1.setSourceStates(List.of(State.of("NEW", "NEW")));
|
||||||
|
t1.setTargetStates(List.of(State.of("PAID", "PAID")));
|
||||||
|
t1.setEvent(Event.of("PAY", "PAY"));
|
||||||
|
|
||||||
|
Transition t2 = new Transition();
|
||||||
|
t2.setSourceStates(List.of(State.of("FAILED", "FAILED")));
|
||||||
|
t2.setTargetStates(List.of(State.of("PAID", "PAID")));
|
||||||
|
t2.setEvent(Event.of("PAY", "PAY"));
|
||||||
|
|
||||||
|
CallChain chain = CallChain.builder()
|
||||||
|
.triggerPoint(TriggerPoint.builder().event("PAY").sourceState("NEW").build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.transitions(List.of(t1, t2))
|
||||||
|
.metadata(CodebaseMetadata.builder().callChains(List.of(chain)).build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
enricher.enrich(result, null, null);
|
||||||
|
|
||||||
|
CallChain updatedChain = result.getMetadata().getCallChains().get(0);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions()).hasSize(1);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions().get(0).getSourceState()).isEqualTo("NEW");
|
||||||
|
assertThat(updatedChain.getMatchedTransitions().get(0).getTargetState()).isEqualTo("PAID");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldLinkTransitionByFullIdentifier() {
|
||||||
|
Transition t1 = new Transition();
|
||||||
|
t1.setSourceStates(List.of(State.of("\"NEW\"", "NEW")));
|
||||||
|
t1.setTargetStates(List.of(State.of("\"PAID\"", "PAID")));
|
||||||
|
// This simulates how Spring Config usually has Event as OrderEvents.PAY but its resolved string is "PAY_ORDER"
|
||||||
|
t1.setEvent(Event.of("OrderEvents.PAY", "PAY_ORDER"));
|
||||||
|
|
||||||
|
CallChain chain = CallChain.builder()
|
||||||
|
.triggerPoint(TriggerPoint.builder().event("PAY_ORDER").sourceState("NEW").build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.transitions(List.of(t1))
|
||||||
|
.metadata(CodebaseMetadata.builder().callChains(List.of(chain)).build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
enricher.enrich(result, null, null);
|
||||||
|
|
||||||
|
CallChain updatedChain = result.getMetadata().getCallChains().get(0);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions()).hasSize(1);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions().get(0).getSourceState()).isEqualTo("NEW");
|
||||||
|
assertThat(updatedChain.getMatchedTransitions().get(0).getTargetState()).isEqualTo("PAID");
|
||||||
|
assertThat(updatedChain.getMatchedTransitions().get(0).getEvent()).isEqualTo("PAY_ORDER");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldHandleUnknownEvents() {
|
||||||
|
CallChain chain = CallChain.builder()
|
||||||
|
.triggerPoint(TriggerPoint.builder().event(null).build()) // Dynamic or unresolved event
|
||||||
|
.build();
|
||||||
|
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.transitions(List.of(new Transition()))
|
||||||
|
.metadata(CodebaseMetadata.builder().callChains(List.of(chain)).build())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
enricher.enrich(result, null, null);
|
||||||
|
|
||||||
|
CallChain updatedChain = result.getMetadata().getCallChains().get(0);
|
||||||
|
assertThat(updatedChain.getMatchedTransitions()).isNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.analysis.service;
|
||||||
|
|
||||||
|
import click.kamil.springstatemachineexporter.analysis.model.TriggerPoint;
|
||||||
|
import click.kamil.springstatemachineexporter.analysis.resolver.ConstantResolver;
|
||||||
|
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
||||||
|
import org.eclipse.jdt.core.dom.CompilationUnit;
|
||||||
|
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 static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
public class GenericEventDetectorTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testMessageBuilderVariableAssignment(@TempDir Path tempDir) throws IOException {
|
||||||
|
Path dir = tempDir.resolve("com/example");
|
||||||
|
Files.createDirectories(dir);
|
||||||
|
Files.writeString(dir.resolve("MyService.java"),
|
||||||
|
"package com.example;\n" +
|
||||||
|
"import org.springframework.messaging.support.MessageBuilder;\n" +
|
||||||
|
"import org.springframework.messaging.Message;\n" +
|
||||||
|
"import org.springframework.statemachine.StateMachine;\n" +
|
||||||
|
"public class MyService {\n" +
|
||||||
|
" private StateMachine<String, String> stateMachine;\n" +
|
||||||
|
" private void a(MyInterface myEvent) {\n" +
|
||||||
|
" Message<MyInterface> msg = MessageBuilder.withPayload(myEvent).setHeader(\"k\", \"v\").build();\n" +
|
||||||
|
" stateMachine.sendEvent(Mono.just(msg));\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}\n");
|
||||||
|
|
||||||
|
CodebaseContext context = new CodebaseContext();
|
||||||
|
context.scan(tempDir);
|
||||||
|
|
||||||
|
GenericEventDetector detector = new GenericEventDetector(context, new ConstantResolver(), List.of());
|
||||||
|
CompilationUnit cu = context.getCompilationUnits().iterator().next();
|
||||||
|
List<TriggerPoint> triggers = detector.detect(cu);
|
||||||
|
|
||||||
|
assertThat(triggers).hasSize(1);
|
||||||
|
assertThat(triggers.get(0).getEvent()).isEqualTo("myEvent");
|
||||||
|
assertThat(triggers.get(0).getMethodName()).isEqualTo("a");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testEnumGetterUnionExtraction(@TempDir Path tempDir) throws IOException {
|
||||||
|
Path dir = tempDir.resolve("com/example");
|
||||||
|
Files.createDirectories(dir);
|
||||||
|
Files.writeString(dir.resolve("MyEnum.java"),
|
||||||
|
"package com.example;\n" +
|
||||||
|
"public enum MyEnum {\n" +
|
||||||
|
" STATE_A, STATE_B;\n" +
|
||||||
|
"}\n");
|
||||||
|
|
||||||
|
Files.writeString(dir.resolve("MyService.java"),
|
||||||
|
"package com.example;\n" +
|
||||||
|
"import org.springframework.statemachine.StateMachine;\n" +
|
||||||
|
"public class MyService {\n" +
|
||||||
|
" private StateMachine<String, String> stateMachine;\n" +
|
||||||
|
" public MyEnum getEvent() { return MyEnum.STATE_A; }\n" + // Pretend it returns the enum
|
||||||
|
" public void trigger() {\n" +
|
||||||
|
" stateMachine.sendEvent(this.getEvent());\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}\n");
|
||||||
|
|
||||||
|
CodebaseContext context = new CodebaseContext();
|
||||||
|
context.scan(tempDir);
|
||||||
|
|
||||||
|
GenericEventDetector detector = new GenericEventDetector(context, new ConstantResolver(), List.of());
|
||||||
|
|
||||||
|
CompilationUnit serviceCu = context.getCompilationUnits().stream()
|
||||||
|
.filter(cu -> cu.getJavaElement() == null || cu.getJavaElement().getElementName().contains("MyService"))
|
||||||
|
.findFirst().orElseThrow();
|
||||||
|
|
||||||
|
List<TriggerPoint> triggers = detector.detect(serviceCu);
|
||||||
|
|
||||||
|
System.out.println("TRIGGERS: " + triggers);
|
||||||
|
assertThat(triggers).hasSize(2);
|
||||||
|
assertThat(triggers).anyMatch(t -> t.getEvent().equals("com.example.MyEnum.STATE_A"));
|
||||||
|
assertThat(triggers).anyMatch(t -> t.getEvent().equals("com.example.MyEnum.STATE_B"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,9 +47,7 @@ class AstTransitionParserTest {
|
|||||||
.isEqualTo(TransitionType.EXTERNAL);
|
.isEqualTo(TransitionType.EXTERNAL);
|
||||||
assertThat(transition.getSourceStates()).extracting(State::toString).containsExactly("CREATED");
|
assertThat(transition.getSourceStates()).extracting(State::toString).containsExactly("CREATED");
|
||||||
assertThat(transition.getTargetStates()).extracting(State::toString).containsExactly("PAID");
|
assertThat(transition.getTargetStates()).extracting(State::toString).containsExactly("PAID");
|
||||||
assertThat(transition)
|
assertThat(transition.getEvent().toString()).isEqualTo("PAY");
|
||||||
.extracting(Transition::getEvent)
|
|
||||||
.isEqualTo("PAY");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -211,8 +209,8 @@ class AstTransitionParserTest {
|
|||||||
List<Transition> transitions = AstTransitionParser.parseTransitions(method, context);
|
List<Transition> transitions = AstTransitionParser.parseTransitions(method, context);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("E1");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("E1");
|
||||||
assertThat(transitions.get(1).getEvent()).isEqualTo("E2");
|
assertThat(transitions.get(1).getEvent().toString()).isEqualTo("E2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("BASE_E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("BASE_E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("CHILD_E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("CHILD_E1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -93,7 +93,7 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(1);
|
assertThat(transitions).hasSize(1);
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("OVERRIDDEN_E1");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("OVERRIDDEN_E1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -119,7 +119,7 @@ class StateMachineAggregatorTest {
|
|||||||
assertThat(transitions).hasSize(1);
|
assertThat(transitions).hasSize(1);
|
||||||
assertThat(transitions.get(0).getSourceStates()).extracting(State::toString).containsExactly("START");
|
assertThat(transitions.get(0).getSourceStates()).extracting(State::toString).containsExactly("START");
|
||||||
assertThat(transitions.get(0).getTargetStates()).extracting(State::toString).containsExactly("END");
|
assertThat(transitions.get(0).getTargetStates()).extracting(State::toString).containsExactly("END");
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("GO");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("GO");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -143,8 +143,8 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -241,9 +241,9 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
List<Transition> transitions = aggregator.aggregateTransitions(childTd);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(3);
|
assertThat(transitions).hasSize(3);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("GP_E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("GP_E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("P_E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("P_E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("C_E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("C_E1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -267,8 +267,8 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -381,7 +381,7 @@ class StateMachineAggregatorTest {
|
|||||||
// It might not find ExternalTransitions.addCommon unless it's static or we handle imports.
|
// It might not find ExternalTransitions.addCommon unless it's static or we handle imports.
|
||||||
// Let's see if it works or if we need to improve the aggregator.
|
// Let's see if it works or if we need to improve the aggregator.
|
||||||
assertThat(transitions).hasSize(1);
|
assertThat(transitions).hasSize(1);
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("EXT_E1");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("EXT_E1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -408,8 +408,8 @@ class StateMachineAggregatorTest {
|
|||||||
|
|
||||||
// Should not crash and should find both transitions
|
// Should not crash and should find both transitions
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -434,7 +434,7 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(1);
|
assertThat(transitions).hasSize(1);
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("TRY_E1");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("TRY_E1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -536,8 +536,8 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(2);
|
assertThat(transitions).hasSize(2);
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E1"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E1"));
|
||||||
assertThat(transitions).anyMatch(t -> t.getEvent().equals("E2"));
|
assertThat(transitions).anyMatch(t -> t.getEvent().toString().equals("E2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -585,7 +585,7 @@ class StateMachineAggregatorTest {
|
|||||||
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
List<Transition> transitions = aggregator.aggregateTransitions(td);
|
||||||
|
|
||||||
assertThat(transitions).hasSize(1);
|
assertThat(transitions).hasSize(1);
|
||||||
assertThat(transitions.get(0).getEvent()).isEqualTo("E1");
|
assertThat(transitions.get(0).getEvent().toString()).isEqualTo("E1");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeClass(String name, String source) throws IOException {
|
private void writeClass(String name, String source) throws IOException {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class JsonExporterTest {
|
|||||||
transition.setType(TransitionType.EXTERNAL);
|
transition.setType(TransitionType.EXTERNAL);
|
||||||
transition.setSourceStates(List.of(State.of("S1")));
|
transition.setSourceStates(List.of(State.of("S1")));
|
||||||
transition.setTargetStates(List.of(State.of("S2")));
|
transition.setTargetStates(List.of(State.of("S2")));
|
||||||
transition.setEvent("E1");
|
transition.setEvent(click.kamil.springstatemachineexporter.model.Event.of("E1"));
|
||||||
|
|
||||||
AnalysisResult result = AnalysisResult.builder()
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
.name("TestSM")
|
.name("TestSM")
|
||||||
@@ -33,7 +33,7 @@ class JsonExporterTest {
|
|||||||
|
|
||||||
assertThat(json)
|
assertThat(json)
|
||||||
.contains("\"name\" : \"TestSM\"")
|
.contains("\"name\" : \"TestSM\"")
|
||||||
.contains("\"event\" : \"E1\"")
|
.contains("\"rawName\" : \"E1\"")
|
||||||
.contains("\"rawName\" : \"S1\"")
|
.contains("\"rawName\" : \"S1\"")
|
||||||
.contains("\"rawName\" : \"S2\"");
|
.contains("\"rawName\" : \"S2\"");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.exporter;
|
||||||
|
|
||||||
|
import click.kamil.springstatemachineexporter.model.State;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Transition;
|
||||||
|
import click.kamil.springstatemachineexporter.model.TransitionType;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Guard;
|
||||||
|
import click.kamil.springstatemachineexporter.model.Action;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
class PlantUmlTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testExportSanitizesLabels() {
|
||||||
|
PlantUml plantUml = new PlantUml();
|
||||||
|
ExportOptions options = ExportOptions.builder()
|
||||||
|
.embedIdentifiers(true)
|
||||||
|
.useLambdaGuards(false)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
State state1 = State.of("State1");
|
||||||
|
State state2 = State.of("State2");
|
||||||
|
|
||||||
|
Transition t = new Transition();
|
||||||
|
t.setType(TransitionType.EXTERNAL);
|
||||||
|
t.setSourceStates(List.of(state1));
|
||||||
|
t.setTargetStates(List.of(state2));
|
||||||
|
|
||||||
|
// Add a guard and action containing problematic characters
|
||||||
|
t.setGuard(Guard.of("list.size() < 5", false, null, null, null, null));
|
||||||
|
t.setActions(List.of(Action.of("doSomething(new int[]{1, 2})", false, null, null, null, null)));
|
||||||
|
|
||||||
|
String result = plantUml.export(
|
||||||
|
"TestMachine",
|
||||||
|
List.of(t),
|
||||||
|
Set.of("State1"),
|
||||||
|
Set.of("State2"),
|
||||||
|
options
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verify that < and > are replaced with HTML entities
|
||||||
|
assertThat(result).doesNotContain("< 5");
|
||||||
|
assertThat(result).contains("< 5");
|
||||||
|
|
||||||
|
// Verify that [ and ] are replaced with HTML entities inside the link
|
||||||
|
assertThat(result).doesNotContain("[list.size() < 5]");
|
||||||
|
assertThat(result).doesNotContain("new int[]{1, 2}");
|
||||||
|
assertThat(result).contains("[list.size() < 5]");
|
||||||
|
assertThat(result).contains("new int[]{1, 2}");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ public class DeferredProfileResolutionTest {
|
|||||||
assertThat(result.getStartStates()).containsExactly("START_RESOLVED");
|
assertThat(result.getStartStates()).containsExactly("START_RESOLVED");
|
||||||
|
|
||||||
Transition t = result.getTransitions().get(0);
|
Transition t = result.getTransitions().get(0);
|
||||||
assertThat(t.getEvent()).isEqualTo("RESOLVED_EVENT");
|
assertThat(t.getEvent().fullIdentifier()).isEqualTo("RESOLVED_EVENT");
|
||||||
assertThat(t.getSourceStates().get(0).fullIdentifier()).isEqualTo("START_RESOLVED");
|
assertThat(t.getSourceStates().get(0).fullIdentifier()).isEqualTo("START_RESOLVED");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class DeferredProfileResolutionTest {
|
|||||||
State s2 = State.of("END", "END");
|
State s2 = State.of("END", "END");
|
||||||
|
|
||||||
Transition t1 = new Transition();
|
Transition t1 = new Transition();
|
||||||
t1.setEvent("${app.event.name:RESOLVED_EVENT}");
|
t1.setEvent(click.kamil.springstatemachineexporter.model.Event.of("${app.event.name:RESOLVED_EVENT}"));
|
||||||
t1.setSourceStates(List.of(s1));
|
t1.setSourceStates(List.of(s1));
|
||||||
t1.setTargetStates(List.of(s2));
|
t1.setTargetStates(List.of(s2));
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package click.kamil.springstatemachineexporter.service;
|
||||||
|
|
||||||
|
import click.kamil.springstatemachineexporter.exporter.StateMachineExporter;
|
||||||
|
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.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
class ExportServiceEmptyStateTest {
|
||||||
|
|
||||||
|
@TempDir
|
||||||
|
Path tempDir;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldSkipEmptyStateMachineConfigurations() throws Exception {
|
||||||
|
// Arrange
|
||||||
|
Path inputDir = tempDir.resolve("input");
|
||||||
|
Files.createDirectories(inputDir);
|
||||||
|
Path outputDir = tempDir.resolve("output");
|
||||||
|
Files.createDirectories(outputDir);
|
||||||
|
|
||||||
|
String code = """
|
||||||
|
package com.example;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.statemachine.config.EnableStateMachine;
|
||||||
|
import org.springframework.statemachine.config.StateMachineConfigurerAdapter;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableStateMachine
|
||||||
|
public class EmptyStateMachineConfig extends StateMachineConfigurerAdapter<String, String> {
|
||||||
|
// No configurers overridden, meaning 0 states and 0 transitions parsed
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
Files.writeString(inputDir.resolve("EmptyStateMachineConfig.java"), code);
|
||||||
|
|
||||||
|
ExportService exportService = new ExportService(Collections.emptyList()); // No exporters needed, checking if it generates anything (it generates JSON natively)
|
||||||
|
|
||||||
|
// Act
|
||||||
|
exportService.runExporter(inputDir, outputDir, List.of("plantuml"), true);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
// The output directory should have no files created in it
|
||||||
|
long fileCount = Files.walk(outputDir)
|
||||||
|
.filter(Files::isRegularFile)
|
||||||
|
.count();
|
||||||
|
|
||||||
|
assertThat(fileCount).isZero();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@ class JsonImportServiceTest {
|
|||||||
"type" : "EXTERNAL",
|
"type" : "EXTERNAL",
|
||||||
"sourceStates" : [ { "rawName" : "S1", "fullIdentifier" : "S1" } ],
|
"sourceStates" : [ { "rawName" : "S1", "fullIdentifier" : "S1" } ],
|
||||||
"targetStates" : [ { "rawName" : "S2", "fullIdentifier" : "S2" } ],
|
"targetStates" : [ { "rawName" : "S2", "fullIdentifier" : "S2" } ],
|
||||||
"event" : "E1"
|
"event" : { "rawName" : "E1", "fullIdentifier" : "E1" }
|
||||||
} ],
|
} ],
|
||||||
"startStates" : [ "S1" ],
|
"startStates" : [ "S1" ],
|
||||||
"endStates" : [ "S2" ]
|
"endStates" : [ "S2" ]
|
||||||
@@ -36,7 +36,7 @@ class JsonImportServiceTest {
|
|||||||
|
|
||||||
assertThat(model.getName()).isEqualTo("ImportedSM");
|
assertThat(model.getName()).isEqualTo("ImportedSM");
|
||||||
assertThat(model.getTransitions()).hasSize(1);
|
assertThat(model.getTransitions()).hasSize(1);
|
||||||
assertThat(model.getTransitions().get(0).getEvent()).isEqualTo("E1");
|
assertThat(model.getTransitions().get(0).getEvent().rawName()).isEqualTo("E1");
|
||||||
assertThat(model.getStartStates()).containsExactly("S1");
|
assertThat(model.getStartStates()).containsExactly("S1");
|
||||||
assertThat(model.getEndStates()).containsExactly("S2");
|
assertThat(model.getEndStates()).containsExactly("S2");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
@@ -34,21 +34,21 @@ state States.STATE14 <<choice>>
|
|||||||
state States.STATE9 <<choice>>
|
state States.STATE9 <<choice>>
|
||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
|
States.STATE16 -[#FF6347,bold]-> States.STATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE19 <<choice_type>> : (order=2)
|
States.STATE16 -[#FF6347,bold]-> States.STATE19 <<choice_type>> : (order=2)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
}, {
|
}, {
|
||||||
"event" : "PLACE_ORDER",
|
"event" : "PLACE_ORDER",
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}, {
|
}, {
|
||||||
"event" : "CANCEL_ORDER",
|
"event" : "CANCEL_ORDER",
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 21
|
"lineNumber" : 21
|
||||||
}, {
|
}, {
|
||||||
"event" : "PAY_ORDER",
|
"event" : "PAY_ORDER",
|
||||||
@@ -31,6 +34,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
}, {
|
}, {
|
||||||
"event" : "SHIP_ORDER",
|
"event" : "SHIP_ORDER",
|
||||||
@@ -39,6 +43,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
}, {
|
}, {
|
||||||
"event" : "RETURN_ORDER",
|
"event" : "RETURN_ORDER",
|
||||||
@@ -47,6 +52,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -131,7 +137,7 @@
|
|||||||
"name" : "JMS: shipping.queue",
|
"name" : "JMS: shipping.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
"sourceFile" : null,
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "JMS",
|
"protocol" : "JMS",
|
||||||
"destination" : "shipping.queue"
|
"destination" : "shipping.queue"
|
||||||
@@ -146,7 +152,7 @@
|
|||||||
"name" : "RABBIT: returns.queue",
|
"name" : "RABBIT: returns.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
"sourceFile" : null,
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "RABBIT",
|
"protocol" : "RABBIT",
|
||||||
"destination" : "returns.queue"
|
"destination" : "returns.queue"
|
||||||
@@ -178,8 +184,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "NEW",
|
||||||
|
"targetState" : "CHECK_AVAILABILITY",
|
||||||
|
"event" : "PLACE_ORDER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -205,8 +218,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 21
|
"lineNumber" : 21
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PAID",
|
||||||
|
"targetState" : "CANCELLED",
|
||||||
|
"event" : "CANCEL_ORDER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "CUSTOM",
|
"type" : "CUSTOM",
|
||||||
@@ -227,8 +247,11 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -254,15 +277,22 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PENDING_PAYMENT",
|
||||||
|
"targetState" : "PAID",
|
||||||
|
"event" : "PAY_ORDER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "JMS",
|
"type" : "JMS",
|
||||||
"name" : "JMS: shipping.queue",
|
"name" : "JMS: shipping.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
"sourceFile" : null,
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "JMS",
|
"protocol" : "JMS",
|
||||||
"destination" : "shipping.queue"
|
"destination" : "shipping.queue"
|
||||||
@@ -281,15 +311,22 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PAID",
|
||||||
|
"targetState" : "SHIPPED",
|
||||||
|
"event" : "SHIP_ORDER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "RABBIT",
|
"type" : "RABBIT",
|
||||||
"name" : "RABBIT: returns.queue",
|
"name" : "RABBIT: returns.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
"sourceFile" : null,
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "RABBIT",
|
"protocol" : "RABBIT",
|
||||||
"destination" : "returns.queue"
|
"destination" : "returns.queue"
|
||||||
@@ -308,8 +345,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "DELIVERED",
|
||||||
|
"targetState" : "RETURNED",
|
||||||
|
"event" : "RETURN_ORDER"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : { }
|
"default" : { }
|
||||||
@@ -328,7 +372,10 @@
|
|||||||
"rawName" : "\"CHECK_AVAILABILITY\"",
|
"rawName" : "\"CHECK_AVAILABILITY\"",
|
||||||
"fullIdentifier" : "CHECK_AVAILABILITY"
|
"fullIdentifier" : "CHECK_AVAILABILITY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "PLACE_ORDER",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.PLACE",
|
||||||
|
"fullIdentifier" : "PLACE_ORDER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -377,7 +424,10 @@
|
|||||||
"rawName" : "\"PAID\"",
|
"rawName" : "\"PAID\"",
|
||||||
"fullIdentifier" : "PAID"
|
"fullIdentifier" : "PAID"
|
||||||
} ],
|
} ],
|
||||||
"event" : "PAY_ORDER",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.PAY",
|
||||||
|
"fullIdentifier" : "PAY_ORDER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -391,7 +441,10 @@
|
|||||||
"rawName" : "\"SHIPPED\"",
|
"rawName" : "\"SHIPPED\"",
|
||||||
"fullIdentifier" : "SHIPPED"
|
"fullIdentifier" : "SHIPPED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "SHIP_ORDER",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.SHIP",
|
||||||
|
"fullIdentifier" : "SHIP_ORDER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -405,7 +458,10 @@
|
|||||||
"rawName" : "\"DELIVERED\"",
|
"rawName" : "\"DELIVERED\"",
|
||||||
"fullIdentifier" : "DELIVERED"
|
"fullIdentifier" : "DELIVERED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "FINALIZE",
|
"event" : {
|
||||||
|
"rawName" : "\"FINALIZE\"",
|
||||||
|
"fullIdentifier" : "FINALIZE"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -419,7 +475,10 @@
|
|||||||
"rawName" : "\"CANCELLED\"",
|
"rawName" : "\"CANCELLED\"",
|
||||||
"fullIdentifier" : "CANCELLED"
|
"fullIdentifier" : "CANCELLED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "CANCEL_ORDER",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "CANCEL_ORDER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -433,7 +492,10 @@
|
|||||||
"rawName" : "\"RETURNED\"",
|
"rawName" : "\"RETURNED\"",
|
||||||
"fullIdentifier" : "RETURNED"
|
"fullIdentifier" : "RETURNED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "RETURN_ORDER",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.RETURN",
|
||||||
|
"fullIdentifier" : "RETURN_ORDER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -25,14 +25,14 @@ skinparam svgLinkTarget _self
|
|||||||
|
|
||||||
state CHECK_AVAILABILITY <<choice>>
|
state CHECK_AVAILABILITY <<choice>>
|
||||||
|
|
||||||
NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <<external>> <<e_PLACE_ORDER>> : PLACE_ORDER
|
NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <<external>> : PLACE_ORDER
|
||||||
CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <<choice_type>> : [λ] (order=0)
|
CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <<choice_type>> : [λ] (order=0)
|
||||||
CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <<choice_type>> : (order=1)
|
CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <<choice_type>> : (order=1)
|
||||||
PENDING_PAYMENT -[#1E90FF,bold]-> PAID <<external>> <<e_PAY_ORDER>> : PAY_ORDER
|
PENDING_PAYMENT -[#1E90FF,bold]-> PAID <<external>> : PAY_ORDER
|
||||||
PAID -[#1E90FF,bold]-> SHIPPED <<external>> <<e_SHIP_ORDER>> : SHIP_ORDER
|
PAID -[#1E90FF,bold]-> SHIPPED <<external>> : SHIP_ORDER
|
||||||
SHIPPED -[#1E90FF,bold]-> DELIVERED <<external>> <<e_FINALIZE>> : FINALIZE
|
SHIPPED -[#1E90FF,bold]-> DELIVERED <<external>> : FINALIZE
|
||||||
PAID -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_ORDER>> : CANCEL_ORDER
|
PAID -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_ORDER
|
||||||
DELIVERED -[#1E90FF,bold]-> RETURNED <<external>> <<e_RETURN_ORDER>> : RETURN_ORDER
|
DELIVERED -[#1E90FF,bold]-> RETURNED <<external>> : RETURN_ORDER
|
||||||
|
|
||||||
CANCELLED --> [*]
|
CANCELLED --> [*]
|
||||||
DELIVERED --> [*]
|
DELIVERED --> [*]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
}, {
|
}, {
|
||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}, {
|
}, {
|
||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
}, {
|
}, {
|
||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
@@ -31,6 +34,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
}, {
|
}, {
|
||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
@@ -39,6 +43,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
}, {
|
}, {
|
||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
@@ -47,6 +52,7 @@
|
|||||||
"sourceFile" : null,
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
}, {
|
}, {
|
||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
@@ -55,6 +61,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -152,8 +159,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "EXTERNAL_TRIGGER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -175,8 +189,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "SUBMIT_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -198,8 +219,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PROCESSING",
|
||||||
|
"targetState" : "CANCELLED",
|
||||||
|
"event" : "CANCEL_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -221,8 +249,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PROCESSING",
|
||||||
|
"targetState" : "COMPLETED",
|
||||||
|
"event" : "FINISH"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -248,8 +283,11 @@
|
|||||||
"sourceFile" : null,
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : "orderId",
|
||||||
|
"matchedTransitions" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -275,8 +313,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "REACTIVE_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "CUSTOM",
|
"type" : "CUSTOM",
|
||||||
@@ -297,8 +342,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "START",
|
||||||
|
"event" : "AUDIT_EVENT"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : {
|
"default" : {
|
||||||
@@ -322,7 +374,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "SUBMIT_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "MyEvents.SUBMIT",
|
||||||
|
"fullIdentifier" : "SUBMIT_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -336,7 +391,10 @@
|
|||||||
"rawName" : "\"COMPLETED\"",
|
"rawName" : "\"COMPLETED\"",
|
||||||
"fullIdentifier" : "COMPLETED"
|
"fullIdentifier" : "COMPLETED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "FINISH",
|
"event" : {
|
||||||
|
"rawName" : "\"FINISH\"",
|
||||||
|
"fullIdentifier" : "FINISH"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -350,7 +408,10 @@
|
|||||||
"rawName" : "\"CANCELLED\"",
|
"rawName" : "\"CANCELLED\"",
|
||||||
"fullIdentifier" : "CANCELLED"
|
"fullIdentifier" : "CANCELLED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "CANCEL_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "MyEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "CANCEL_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -364,7 +425,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "REACTIVE_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "\"REACTIVE_EVENT\"",
|
||||||
|
"fullIdentifier" : "REACTIVE_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -378,7 +442,10 @@
|
|||||||
"rawName" : "\"START\"",
|
"rawName" : "\"START\"",
|
||||||
"fullIdentifier" : "START"
|
"fullIdentifier" : "START"
|
||||||
} ],
|
} ],
|
||||||
"event" : "AUDIT_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "\"AUDIT_EVENT\"",
|
||||||
|
"fullIdentifier" : "AUDIT_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -392,7 +459,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : {
|
||||||
|
"rawName" : "\"EXTERNAL_TRIGGER\"",
|
||||||
|
"fullIdentifier" : "EXTERNAL_TRIGGER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
@@ -24,12 +24,12 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> INIT_STATE
|
[*] --> INIT_STATE
|
||||||
|
|
||||||
|
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_SUBMIT_EVENT>> : SUBMIT_EVENT
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT_EVENT
|
||||||
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> <<e_FINISH>> : FINISH
|
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH
|
||||||
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_EVENT>> : CANCEL_EVENT
|
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_EVENT
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : REACTIVE_EVENT
|
||||||
START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT
|
START -[#1E90FF,bold]-> START <<external>> : AUDIT_EVENT
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : EXTERNAL_TRIGGER
|
||||||
|
|
||||||
CANCELLED --> [*]
|
CANCELLED --> [*]
|
||||||
COMPLETED --> [*]
|
COMPLETED --> [*]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
}, {
|
}, {
|
||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}, {
|
}, {
|
||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
}, {
|
}, {
|
||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
@@ -31,6 +34,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
}, {
|
}, {
|
||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
@@ -39,6 +43,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
}, {
|
}, {
|
||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
@@ -47,6 +52,7 @@
|
|||||||
"sourceFile" : null,
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
}, {
|
}, {
|
||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
@@ -55,6 +61,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -152,8 +159,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "EXTERNAL_TRIGGER"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -175,8 +189,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "SUBMIT_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -198,8 +219,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PROCESSING",
|
||||||
|
"targetState" : "CANCELLED",
|
||||||
|
"event" : "CANCEL_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -221,8 +249,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "PROCESSING",
|
||||||
|
"targetState" : "COMPLETED",
|
||||||
|
"event" : "FINISH"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -248,8 +283,11 @@
|
|||||||
"sourceFile" : null,
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : "orderId",
|
||||||
|
"matchedTransitions" : [ ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "REST",
|
"type" : "REST",
|
||||||
@@ -275,8 +313,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "REACTIVE_EVENT"
|
||||||
|
} ]
|
||||||
}, {
|
}, {
|
||||||
"entryPoint" : {
|
"entryPoint" : {
|
||||||
"type" : "CUSTOM",
|
"type" : "CUSTOM",
|
||||||
@@ -297,8 +342,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "START",
|
||||||
|
"event" : "AUDIT_EVENT"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : {
|
"default" : {
|
||||||
@@ -322,7 +374,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "SUBMIT_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "MyEvents.SUBMIT",
|
||||||
|
"fullIdentifier" : "SUBMIT_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -336,7 +391,10 @@
|
|||||||
"rawName" : "\"COMPLETED\"",
|
"rawName" : "\"COMPLETED\"",
|
||||||
"fullIdentifier" : "COMPLETED"
|
"fullIdentifier" : "COMPLETED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "FINISH",
|
"event" : {
|
||||||
|
"rawName" : "\"FINISH\"",
|
||||||
|
"fullIdentifier" : "FINISH"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -350,7 +408,10 @@
|
|||||||
"rawName" : "\"CANCELLED\"",
|
"rawName" : "\"CANCELLED\"",
|
||||||
"fullIdentifier" : "CANCELLED"
|
"fullIdentifier" : "CANCELLED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "CANCEL_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "MyEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "CANCEL_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -364,7 +425,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "REACTIVE_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "\"REACTIVE_EVENT\"",
|
||||||
|
"fullIdentifier" : "REACTIVE_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -378,7 +442,10 @@
|
|||||||
"rawName" : "\"START\"",
|
"rawName" : "\"START\"",
|
||||||
"fullIdentifier" : "START"
|
"fullIdentifier" : "START"
|
||||||
} ],
|
} ],
|
||||||
"event" : "AUDIT_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "\"AUDIT_EVENT\"",
|
||||||
|
"fullIdentifier" : "AUDIT_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -392,7 +459,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : {
|
||||||
|
"rawName" : "\"EXTERNAL_TRIGGER\"",
|
||||||
|
"fullIdentifier" : "EXTERNAL_TRIGGER"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -24,12 +24,12 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> PROD_INITIAL
|
[*] --> PROD_INITIAL
|
||||||
|
|
||||||
|
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_SUBMIT_EVENT>> : SUBMIT_EVENT
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT_EVENT
|
||||||
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> <<e_FINISH>> : FINISH
|
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH
|
||||||
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_EVENT>> : CANCEL_EVENT
|
PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> : CANCEL_EVENT
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : REACTIVE_EVENT
|
||||||
START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT
|
START -[#1E90FF,bold]-> START <<external>> : AUDIT_EVENT
|
||||||
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER
|
START -[#1E90FF,bold]-> PROCESSING <<external>> : EXTERNAL_TRIGGER
|
||||||
|
|
||||||
CANCELLED --> [*]
|
CANCELLED --> [*]
|
||||||
COMPLETED --> [*]
|
COMPLETED --> [*]
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -232,7 +277,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -246,7 +294,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -260,7 +311,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -274,7 +328,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -288,7 +345,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -302,7 +362,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -764,7 +827,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTX",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTX",
|
||||||
|
"fullIdentifier" : "Events.EVENTX"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -813,7 +879,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_3",
|
"rawName" : "States.STATE_EXTRA_3",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_3"
|
"fullIdentifier" : "States.STATE_EXTRA_3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -827,7 +896,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -841,7 +913,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
@@ -36,27 +36,27 @@ state States.STATE9 <<choice>>
|
|||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
state States.STATE2 <<choice>>
|
state States.STATE2 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
@@ -82,12 +82,12 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
|
States.STATE2 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX
|
||||||
States.STATE2 -[#FF6347,bold]-> States.STATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
States.STATE2 -[#FF6347,bold]-> States.STATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
||||||
States.STATE2 -[#FF6347,bold]-> States.STATE_EXTRA_1 <<choice_type>> : (order=1)
|
States.STATE2 -[#FF6347,bold]-> States.STATE_EXTRA_1 <<choice_type>> : (order=1)
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> : Events.EVENTY
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : 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>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
|
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -232,7 +277,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -246,7 +294,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -260,7 +311,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -274,7 +328,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -288,7 +345,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -302,7 +362,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -764,7 +827,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1_1",
|
"rawName" : "States.STATE_EXTRA_1_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_1",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -813,7 +879,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -827,7 +896,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -841,7 +913,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -855,7 +930,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 257 KiB |
@@ -36,27 +36,27 @@ state States.STATE9 <<choice>>
|
|||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
state States.STATE_EXTRA_1_2 <<choice>>
|
state States.STATE_EXTRA_1_2 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
@@ -82,13 +82,13 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE_EXTRA_1_1 <<external>> <<e_Events_EVENT_1_1>> : Events.EVENT_1_1
|
States.STATE9 -[#1E90FF,bold]-> States.STATE_EXTRA_1_1 <<external>> : Events.EVENT_1_1
|
||||||
States.STATE_EXTRA_1_2 -[#FF6347,bold]-> States.STATE_EXTRA_1_1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
States.STATE_EXTRA_1_2 -[#FF6347,bold]-> States.STATE_EXTRA_1_1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
||||||
States.STATE_EXTRA_1_2 -[#FF6347,bold]-> States.STATE_EXTRA_1_3 <<choice_type>> : (order=1)
|
States.STATE_EXTRA_1_2 -[#FF6347,bold]-> States.STATE_EXTRA_1_3 <<choice_type>> : (order=1)
|
||||||
States.STATE_EXTRA_1_3 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
|
States.STATE_EXTRA_1_3 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENT_1_2
|
||||||
States.STATE_EXTRA_1_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
|
States.STATE_EXTRA_1_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
|
||||||
States.STATE_EXTRA_1_2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : 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>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.FORK",
|
"rawName" : "States.FORK",
|
||||||
"fullIdentifier" : "States.FORK"
|
"fullIdentifier" : "States.FORK"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.TO_FORK",
|
"event" : {
|
||||||
|
"rawName" : "Events.TO_FORK",
|
||||||
|
"fullIdentifier" : "Events.TO_FORK"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -53,7 +56,10 @@
|
|||||||
"rawName" : "States.REGION1_STATE2",
|
"rawName" : "States.REGION1_STATE2",
|
||||||
"fullIdentifier" : "States.REGION1_STATE2"
|
"fullIdentifier" : "States.REGION1_STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.R1_NEXT",
|
"event" : {
|
||||||
|
"rawName" : "Events.R1_NEXT",
|
||||||
|
"fullIdentifier" : "Events.R1_NEXT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -67,7 +73,10 @@
|
|||||||
"rawName" : "States.REGION2_STATE2",
|
"rawName" : "States.REGION2_STATE2",
|
||||||
"fullIdentifier" : "States.REGION2_STATE2"
|
"fullIdentifier" : "States.REGION2_STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.R2_NEXT",
|
"event" : {
|
||||||
|
"rawName" : "Events.R2_NEXT",
|
||||||
|
"fullIdentifier" : "Events.R2_NEXT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -98,7 +107,10 @@
|
|||||||
"rawName" : "States.END",
|
"rawName" : "States.END",
|
||||||
"fullIdentifier" : "States.END"
|
"fullIdentifier" : "States.END"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.TO_END",
|
"event" : {
|
||||||
|
"rawName" : "Events.TO_END",
|
||||||
|
"fullIdentifier" : "Events.TO_END"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -24,14 +24,14 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> States.START
|
[*] --> States.START
|
||||||
|
|
||||||
|
|
||||||
States.START -[#1E90FF,bold]-> States.FORK <<external>> <<e_Events_TO_FORK>> : Events.TO_FORK
|
States.START -[#1E90FF,bold]-> States.FORK <<external>> : Events.TO_FORK
|
||||||
States.FORK -[#20B2AA,bold]-> States.REGION1_STATE1 <<fork>>
|
States.FORK -[#20B2AA,bold]-> States.REGION1_STATE1 <<fork>>
|
||||||
States.FORK -[#20B2AA,bold]-> States.REGION2_STATE1 <<fork>>
|
States.FORK -[#20B2AA,bold]-> States.REGION2_STATE1 <<fork>>
|
||||||
States.REGION1_STATE1 -[#1E90FF,bold]-> States.REGION1_STATE2 <<external>> <<e_Events_R1_NEXT>> : Events.R1_NEXT
|
States.REGION1_STATE1 -[#1E90FF,bold]-> States.REGION1_STATE2 <<external>> : Events.R1_NEXT
|
||||||
States.REGION2_STATE1 -[#1E90FF,bold]-> States.REGION2_STATE2 <<external>> <<e_Events_R2_NEXT>> : Events.R2_NEXT
|
States.REGION2_STATE1 -[#1E90FF,bold]-> States.REGION2_STATE2 <<external>> : Events.R2_NEXT
|
||||||
States.REGION1_STATE2 -[#8A2BE2,bold]-> States.JOIN <<join>>
|
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>> <<e_Events_TO_END>> : Events.TO_END
|
States.JOIN -[#1E90FF,bold]-> States.END <<external>> : Events.TO_END
|
||||||
|
|
||||||
States.END --> [*]
|
States.END --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -358,7 +403,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_2",
|
"rawName" : "States.STATE_EXTRA_2",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_2"
|
"fullIdentifier" : "States.STATE_EXTRA_2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -372,7 +420,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_3",
|
"rawName" : "States.STATE_EXTRA_3",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_3"
|
"fullIdentifier" : "States.STATE_EXTRA_3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -386,7 +437,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
@@ -27,21 +27,21 @@ state States.STATEY <<choice>>
|
|||||||
state States.STATE9 <<choice>>
|
state States.STATE9 <<choice>>
|
||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE9 -[#FF6347,bold]-> States.STATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
|
States.STATE9 -[#FF6347,bold]-> States.STATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
|
||||||
@@ -49,9 +49,9 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
|
States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> : Events.EVENT_1_2
|
||||||
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> <<e_Events_EVENT_1_2>> : 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>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE_EXTRA_3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -358,7 +403,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -372,7 +420,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_2",
|
"rawName" : "States.STATE_EXTRA_2",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_2"
|
"fullIdentifier" : "States.STATE_EXTRA_2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_1_3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_1_3",
|
||||||
|
"fullIdentifier" : "Events.EVENT_1_3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -386,7 +437,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -400,7 +454,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
@@ -27,21 +27,21 @@ state States.STATEY <<choice>>
|
|||||||
state States.STATE9 <<choice>>
|
state States.STATE9 <<choice>>
|
||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE9 -[#FF6347,bold]-> States.STATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
|
States.STATE9 -[#FF6347,bold]-> States.STATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
|
||||||
@@ -49,10 +49,10 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
|
States.STATE3 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENT_1_2
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_3>> : Events.EVENT_1_3
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_2 <<external>> : Events.EVENT_1_3
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 15
|
"lineNumber" : 15
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -53,8 +54,15 @@
|
|||||||
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 15
|
"lineNumber" : 15
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "START",
|
||||||
|
"targetState" : "WORKING",
|
||||||
|
"event" : "INHERITED_SUBMIT"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : { }
|
"default" : { }
|
||||||
@@ -73,7 +81,10 @@
|
|||||||
"rawName" : "\"WORKING\"",
|
"rawName" : "\"WORKING\"",
|
||||||
"fullIdentifier" : "WORKING"
|
"fullIdentifier" : "WORKING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "INHERITED_SUBMIT",
|
"event" : {
|
||||||
|
"rawName" : "\"INHERITED_SUBMIT\"",
|
||||||
|
"fullIdentifier" : "INHERITED_SUBMIT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -24,7 +24,7 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> START
|
[*] --> START
|
||||||
|
|
||||||
|
|
||||||
START -[#1E90FF,bold]-> WORKING <<external>> <<e_INHERITED_SUBMIT>> : INHERITED_SUBMIT
|
START -[#1E90FF,bold]-> WORKING <<external>> : INHERITED_SUBMIT
|
||||||
|
|
||||||
WORKING --> [*]
|
WORKING --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "OrderStates.PAID",
|
"rawName" : "OrderStates.PAID",
|
||||||
"fullIdentifier" : "OrderStates.PAID"
|
"fullIdentifier" : "OrderStates.PAID"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.PAY",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.PAY",
|
||||||
|
"fullIdentifier" : "OrderEvents.PAY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "OrderStates.FULFILLED",
|
"rawName" : "OrderStates.FULFILLED",
|
||||||
"fullIdentifier" : "OrderStates.FULFILLED"
|
"fullIdentifier" : "OrderStates.FULFILLED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.FULFILL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.FULFILL",
|
||||||
|
"fullIdentifier" : "OrderEvents.FULFILL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "OrderStates.CANCELED",
|
"rawName" : "OrderStates.CANCELED",
|
||||||
"fullIdentifier" : "OrderStates.CANCELED"
|
"fullIdentifier" : "OrderStates.CANCELED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvents.CANCEL"
|
||||||
|
},
|
||||||
"guard" : {
|
"guard" : {
|
||||||
"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",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
@@ -71,7 +80,10 @@
|
|||||||
"rawName" : "OrderStates.CANCELED",
|
"rawName" : "OrderStates.CANCELED",
|
||||||
"fullIdentifier" : "OrderStates.CANCELED"
|
"fullIdentifier" : "OrderStates.CANCELED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvents.CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -82,7 +94,10 @@
|
|||||||
"fullIdentifier" : "OrderStates.SUBMITTED"
|
"fullIdentifier" : "OrderStates.SUBMITTED"
|
||||||
} ],
|
} ],
|
||||||
"targetStates" : [ ],
|
"targetStates" : [ ],
|
||||||
"event" : "OrderEvents.ABCD",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.ABCD",
|
||||||
|
"fullIdentifier" : "OrderEvents.ABCD"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -96,7 +111,10 @@
|
|||||||
"rawName" : "OrderStates.PAID1",
|
"rawName" : "OrderStates.PAID1",
|
||||||
"fullIdentifier" : "OrderStates.PAID1"
|
"fullIdentifier" : "OrderStates.PAID1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.ABCD",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.ABCD",
|
||||||
|
"fullIdentifier" : "OrderEvents.ABCD"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -212,7 +230,10 @@
|
|||||||
"fullIdentifier" : "OrderStates.PAID2"
|
"fullIdentifier" : "OrderStates.PAID2"
|
||||||
} ],
|
} ],
|
||||||
"targetStates" : [ ],
|
"targetStates" : [ ],
|
||||||
"event" : "OrderEvents.ABCD",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.ABCD",
|
||||||
|
"fullIdentifier" : "OrderEvents.ABCD"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ {
|
"actions" : [ {
|
||||||
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
@@ -25,19 +25,19 @@ skinparam svgLinkTarget _self
|
|||||||
|
|
||||||
state OrderStates.PAID1 <<choice>>
|
state OrderStates.PAID1 <<choice>>
|
||||||
|
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> <<e_OrderEvents_PAY>> : OrderEvents.PAY
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> : OrderEvents.PAY
|
||||||
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> <<e_OrderEvents_FULFILL>> : OrderEvents.FULFILL
|
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> : OrderEvents.FULFILL
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL [λ]
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL [λ]
|
||||||
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL
|
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <<external>> : OrderEvents.ABCD
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> : OrderEvents.ABCD
|
||||||
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID2 <<choice_type>> : [λ] (order=0)
|
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID2 <<choice_type>> : [λ] (order=0)
|
||||||
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : [guard1] (order=1)
|
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : [guard1] (order=1)
|
||||||
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.HAPPEN <<choice_type>> : [λ] (order=2)
|
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.HAPPEN <<choice_type>> : [λ] (order=2)
|
||||||
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.CANCELED <<choice_type>> : (order=3)
|
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.CANCELED <<choice_type>> : (order=3)
|
||||||
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
|
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>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD / λ, action2
|
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <<external>> : OrderEvents.ABCD / λ, action2
|
||||||
|
|
||||||
OrderStates.CANCELED --> [*]
|
OrderStates.CANCELED --> [*]
|
||||||
OrderStates.FULFILLED --> [*]
|
OrderStates.FULFILLED --> [*]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 40
|
"lineNumber" : 40
|
||||||
}, {
|
}, {
|
||||||
"event" : "ORDER_EVENT",
|
"event" : "ORDER_EVENT",
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 52
|
"lineNumber" : 52
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
"name" : "JMS: order.queue",
|
"name" : "JMS: order.queue",
|
||||||
"className" : "click.kamil.maven.api.JmsOrderListener",
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
"methodName" : "onMessage",
|
"methodName" : "onMessage",
|
||||||
"sourceFile" : null,
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/JmsOrderListener.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "JMS",
|
"protocol" : "JMS",
|
||||||
"destination" : "order.queue"
|
"destination" : "order.queue"
|
||||||
@@ -100,8 +102,15 @@
|
|||||||
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 40
|
"lineNumber" : 40
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "INIT",
|
||||||
|
"targetState" : "BUSY",
|
||||||
|
"event" : "SUBMIT"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : { }
|
"default" : { }
|
||||||
@@ -120,7 +129,10 @@
|
|||||||
"rawName" : "\"BUSY\"",
|
"rawName" : "\"BUSY\"",
|
||||||
"fullIdentifier" : "BUSY"
|
"fullIdentifier" : "BUSY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "SUBMIT",
|
"event" : {
|
||||||
|
"rawName" : "\"SUBMIT\"",
|
||||||
|
"fullIdentifier" : "SUBMIT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ {
|
"actions" : [ {
|
||||||
"expression" : "loggingAction()",
|
"expression" : "loggingAction()",
|
||||||
@@ -141,7 +153,10 @@
|
|||||||
"rawName" : "\"DONE\"",
|
"rawName" : "\"DONE\"",
|
||||||
"fullIdentifier" : "DONE"
|
"fullIdentifier" : "DONE"
|
||||||
} ],
|
} ],
|
||||||
"event" : "ORDER_EVENT",
|
"event" : {
|
||||||
|
"rawName" : "\"ORDER_EVENT\"",
|
||||||
|
"fullIdentifier" : "ORDER_EVENT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> INIT
|
[*] --> INIT
|
||||||
|
|
||||||
|
|
||||||
INIT -[#1E90FF,bold]-> BUSY <<external>> <<e_SUBMIT>> : SUBMIT / loggingAction()
|
INIT -[#1E90FF,bold]-> BUSY <<external>> : SUBMIT / loggingAction()
|
||||||
BUSY -[#1E90FF,bold]-> DONE <<external>> <<e_ORDER_EVENT>> : ORDER_EVENT
|
BUSY -[#1E90FF,bold]-> DONE <<external>> : ORDER_EVENT
|
||||||
|
|
||||||
DONE --> [*]
|
DONE --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -232,7 +277,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -694,7 +742,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTX",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTX",
|
||||||
|
"fullIdentifier" : "Events.EVENTX"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
@@ -35,22 +35,22 @@ state States.STATE14 <<choice>>
|
|||||||
state States.STATE9 <<choice>>
|
state States.STATE9 <<choice>>
|
||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
@@ -76,7 +76,7 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
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>> <<e_Events_EVENTX>> : Events.EVENTX
|
States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
} ],
|
} ],
|
||||||
"entryPoints" : [ {
|
"entryPoints" : [ {
|
||||||
@@ -65,8 +66,15 @@
|
|||||||
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
}
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "NEW",
|
||||||
|
"targetState" : "PROCESSING",
|
||||||
|
"event" : "SUBMIT"
|
||||||
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"default" : { }
|
"default" : { }
|
||||||
@@ -85,7 +93,10 @@
|
|||||||
"rawName" : "\"PROCESSING\"",
|
"rawName" : "\"PROCESSING\"",
|
||||||
"fullIdentifier" : "PROCESSING"
|
"fullIdentifier" : "PROCESSING"
|
||||||
} ],
|
} ],
|
||||||
"event" : "SUBMIT",
|
"event" : {
|
||||||
|
"rawName" : "\"SUBMIT\"",
|
||||||
|
"fullIdentifier" : "SUBMIT"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ {
|
"actions" : [ {
|
||||||
"expression" : "processAction()",
|
"expression" : "processAction()",
|
||||||
@@ -106,7 +117,10 @@
|
|||||||
"rawName" : "\"COMPLETED\"",
|
"rawName" : "\"COMPLETED\"",
|
||||||
"fullIdentifier" : "COMPLETED"
|
"fullIdentifier" : "COMPLETED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "FINISH",
|
"event" : {
|
||||||
|
"rawName" : "\"FINISH\"",
|
||||||
|
"fullIdentifier" : "FINISH"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ skinparam svgLinkTarget _self
|
|||||||
[*] --> NEW
|
[*] --> NEW
|
||||||
|
|
||||||
|
|
||||||
NEW -[#1E90FF,bold]-> PROCESSING <<external>> <<e_SUBMIT>> : SUBMIT / processAction()
|
NEW -[#1E90FF,bold]-> PROCESSING <<external>> : SUBMIT / processAction()
|
||||||
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> <<e_FINISH>> : FINISH
|
PROCESSING -[#1E90FF,bold]-> COMPLETED <<external>> : FINISH
|
||||||
|
|
||||||
COMPLETED --> [*]
|
COMPLETED --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "OrderStates.PAID",
|
"rawName" : "OrderStates.PAID",
|
||||||
"fullIdentifier" : "OrderStates.PAID"
|
"fullIdentifier" : "OrderStates.PAID"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.PAY",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.PAY",
|
||||||
|
"fullIdentifier" : "OrderEvents.PAY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "OrderStates.FULFILLED",
|
"rawName" : "OrderStates.FULFILLED",
|
||||||
"fullIdentifier" : "OrderStates.FULFILLED"
|
"fullIdentifier" : "OrderStates.FULFILLED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.FULFILL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.FULFILL",
|
||||||
|
"fullIdentifier" : "OrderEvents.FULFILL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "OrderStates.CANCELED",
|
"rawName" : "OrderStates.CANCELED",
|
||||||
"fullIdentifier" : "OrderStates.CANCELED"
|
"fullIdentifier" : "OrderStates.CANCELED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvents.CANCEL"
|
||||||
|
},
|
||||||
"guard" : {
|
"guard" : {
|
||||||
"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",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
@@ -71,7 +80,10 @@
|
|||||||
"rawName" : "OrderStates.CANCELED",
|
"rawName" : "OrderStates.CANCELED",
|
||||||
"fullIdentifier" : "OrderStates.CANCELED"
|
"fullIdentifier" : "OrderStates.CANCELED"
|
||||||
} ],
|
} ],
|
||||||
"event" : "OrderEvents.CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvents.CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -82,7 +94,10 @@
|
|||||||
"fullIdentifier" : "OrderStates.SUBMITTED"
|
"fullIdentifier" : "OrderStates.SUBMITTED"
|
||||||
} ],
|
} ],
|
||||||
"targetStates" : [ ],
|
"targetStates" : [ ],
|
||||||
"event" : "OrderEvents.ABCD",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.ABCD",
|
||||||
|
"fullIdentifier" : "OrderEvents.ABCD"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -233,7 +248,10 @@
|
|||||||
"fullIdentifier" : "OrderStates.PAID1"
|
"fullIdentifier" : "OrderStates.PAID1"
|
||||||
} ],
|
} ],
|
||||||
"targetStates" : [ ],
|
"targetStates" : [ ],
|
||||||
"event" : "OrderEvents.ABCD",
|
"event" : {
|
||||||
|
"rawName" : "OrderEvents.ABCD",
|
||||||
|
"fullIdentifier" : "OrderEvents.ABCD"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ {
|
"actions" : [ {
|
||||||
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@@ -26,11 +26,11 @@ skinparam svgLinkTarget _self
|
|||||||
state OrderStates.SUBMITTED <<choice>>
|
state OrderStates.SUBMITTED <<choice>>
|
||||||
state OrderStates.PAID <<choice>>
|
state OrderStates.PAID <<choice>>
|
||||||
|
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> <<e_OrderEvents_PAY>> : OrderEvents.PAY
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> : OrderEvents.PAY
|
||||||
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> <<e_OrderEvents_FULFILL>> : OrderEvents.FULFILL
|
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> : OrderEvents.FULFILL
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL [λ]
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL [λ]
|
||||||
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL
|
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL
|
||||||
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
|
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <<external>> : OrderEvents.ABCD
|
||||||
OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID2 <<choice_type>> : [λ] (order=0)
|
OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID2 <<choice_type>> : [λ] (order=0)
|
||||||
OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : (order=1)
|
OrderStates.SUBMITTED -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : (order=1)
|
||||||
OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID1 <<choice_type>> : [λ] (order=0)
|
OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID1 <<choice_type>> : [λ] (order=0)
|
||||||
@@ -39,7 +39,7 @@ OrderStates.PAID -[#FF6347,bold]-> OrderStates.HAPPEN <<choice_type>> : [λ] (or
|
|||||||
OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : (order=3)
|
OrderStates.PAID -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : (order=3)
|
||||||
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
|
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>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD / λ, action2
|
OrderStates.PAID1 -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> : OrderEvents.ABCD / λ, action2
|
||||||
|
|
||||||
OrderStates.CANCELED --> [*]
|
OrderStates.CANCELED --> [*]
|
||||||
OrderStates.FULFILLED --> [*]
|
OrderStates.FULFILLED --> [*]
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
digraph statemachine {
|
||||||
|
rankdir=LR;
|
||||||
|
node [shape=rounded, style=filled, fillcolor=white, fontname="Arial"];
|
||||||
|
edge [fontname="Arial", fontsize=10];
|
||||||
|
|
||||||
|
_start [shape=circle, label="", fillcolor=black, width=0.1];
|
||||||
|
_start -> NEW;
|
||||||
|
COMPLETED [fillcolor=lightgray];
|
||||||
|
CANCELLED [fillcolor=lightgray];
|
||||||
|
NEW -> PROCESSING [label="OrderEvent.PROCESS", style="solid", color="black"];
|
||||||
|
PROCESSING -> COMPLETED [label="OrderEvent.COMPLETE", style="solid", color="black"];
|
||||||
|
NEW -> CANCELLED [label="OrderEvent.CANCEL", style="solid", color="black"];
|
||||||
|
PROCESSING -> CANCELLED [label="OrderEvent.CANCEL", style="solid", color="black"];
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,429 @@
|
|||||||
|
{
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "event",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
}, {
|
||||||
|
"event" : "eventProvider",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessageWithProvider",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 50
|
||||||
|
}, {
|
||||||
|
"event" : "customMessage",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendCustomMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 78
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/process",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "processOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/process",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/complete",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "completeOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/complete",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/cancel",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/cancel",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/functional-complete",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "functionalCompleteOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/functional-complete",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "RABBIT",
|
||||||
|
"name" : "RABBIT: order.custom.transition.queue",
|
||||||
|
"className" : "click.kamil.web.RabbitOrderListener",
|
||||||
|
"methodName" : "handleCustomTransition",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/RabbitOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "RABBIT",
|
||||||
|
"destination" : "order.custom.transition.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "payload",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.process.queue",
|
||||||
|
"className" : "click.kamil.web.JmsOrderListener",
|
||||||
|
"methodName" : "receiveProcessCommand",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.process.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.cancel.queue",
|
||||||
|
"className" : "click.kamil.web.JmsOrderListener",
|
||||||
|
"methodName" : "receiveCancelCommand",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.cancel.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/process",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "processOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/process",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.OrderController.processOrder", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.PROCESS",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.NEW",
|
||||||
|
"targetState" : "OrderState.PROCESSING",
|
||||||
|
"event" : "OrderEvent.PROCESS"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/complete",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "completeOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/complete",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.OrderController.completeOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.COMPLETE",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.PROCESSING",
|
||||||
|
"targetState" : "OrderState.COMPLETED",
|
||||||
|
"event" : "OrderEvent.COMPLETE"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/cancel",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/cancel",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.OrderController.cancelOrder", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.CANCEL",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.NEW",
|
||||||
|
"targetState" : "OrderState.CANCELLED",
|
||||||
|
"event" : "OrderEvent.CANCEL"
|
||||||
|
}, {
|
||||||
|
"sourceState" : "OrderState.PROCESSING",
|
||||||
|
"targetState" : "OrderState.CANCELLED",
|
||||||
|
"event" : "OrderEvent.CANCEL"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /api/orders/functional-complete",
|
||||||
|
"className" : "click.kamil.web.OrderController",
|
||||||
|
"methodName" : "functionalCompleteOrder",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/OrderController.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/api/orders/functional-complete",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.OrderController.functionalCompleteOrder", "click.kamil.web.OrderController.triggerTransitionFunction", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.COMPLETE",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.PROCESSING",
|
||||||
|
"targetState" : "OrderState.COMPLETED",
|
||||||
|
"event" : "OrderEvent.COMPLETE"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "RABBIT",
|
||||||
|
"name" : "RABBIT: order.custom.transition.queue",
|
||||||
|
"className" : "click.kamil.web.RabbitOrderListener",
|
||||||
|
"methodName" : "handleCustomTransition",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/RabbitOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "RABBIT",
|
||||||
|
"destination" : "order.custom.transition.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "payload",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.RabbitOrderListener.handleCustomTransition", "click.kamil.service.StateMachineServiceImpl.sendCustomMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.PROCESS",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendCustomMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 78
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.NEW",
|
||||||
|
"targetState" : "OrderState.PROCESSING",
|
||||||
|
"event" : "OrderEvent.PROCESS"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.process.queue",
|
||||||
|
"className" : "click.kamil.web.JmsOrderListener",
|
||||||
|
"methodName" : "receiveProcessCommand",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.process.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.JmsOrderListener.receiveProcessCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithOutbox", "click.kamil.service.StateMachineServiceImpl.sendMessage" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.PROCESS",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessage",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 25
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.NEW",
|
||||||
|
"targetState" : "OrderState.PROCESSING",
|
||||||
|
"event" : "OrderEvent.PROCESS"
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.cancel.queue",
|
||||||
|
"className" : "click.kamil.web.JmsOrderListener",
|
||||||
|
"methodName" : "receiveCancelCommand",
|
||||||
|
"sourceFile" : "web/src/main/java/click/kamil/web/JmsOrderListener.java",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.cancel.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.web.JmsOrderListener.receiveCancelCommand", "click.kamil.service.StateMachineServiceImpl.sendMessageWithProvider" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "OrderEvent.CANCEL",
|
||||||
|
"className" : "click.kamil.service.StateMachineServiceImpl",
|
||||||
|
"methodName" : "sendMessageWithProvider",
|
||||||
|
"sourceFile" : "service/src/main/java/click/kamil/service/StateMachineServiceImpl.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"sourceState" : null,
|
||||||
|
"lineNumber" : 50
|
||||||
|
},
|
||||||
|
"contextMachineId" : null,
|
||||||
|
"matchedTransitions" : [ {
|
||||||
|
"sourceState" : "OrderState.NEW",
|
||||||
|
"targetState" : "OrderState.CANCELLED",
|
||||||
|
"event" : "OrderEvent.CANCEL"
|
||||||
|
}, {
|
||||||
|
"sourceState" : "OrderState.PROCESSING",
|
||||||
|
"targetState" : "OrderState.CANCELLED",
|
||||||
|
"event" : "OrderEvent.CANCEL"
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name" : "click.kamil.domain.StateMachineConfig",
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"startStates" : [ "OrderState.NEW" ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "OrderState.NEW",
|
||||||
|
"fullIdentifier" : "OrderState.NEW"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "OrderState.PROCESSING",
|
||||||
|
"fullIdentifier" : "OrderState.PROCESSING"
|
||||||
|
} ],
|
||||||
|
"event" : {
|
||||||
|
"rawName" : "OrderEvent.PROCESS",
|
||||||
|
"fullIdentifier" : "OrderEvent.PROCESS"
|
||||||
|
},
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "OrderState.PROCESSING",
|
||||||
|
"fullIdentifier" : "OrderState.PROCESSING"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "OrderState.COMPLETED",
|
||||||
|
"fullIdentifier" : "OrderState.COMPLETED"
|
||||||
|
} ],
|
||||||
|
"event" : {
|
||||||
|
"rawName" : "OrderEvent.COMPLETE",
|
||||||
|
"fullIdentifier" : "OrderEvent.COMPLETE"
|
||||||
|
},
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "OrderState.NEW",
|
||||||
|
"fullIdentifier" : "OrderState.NEW"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "OrderState.CANCELLED",
|
||||||
|
"fullIdentifier" : "OrderState.CANCELLED"
|
||||||
|
} ],
|
||||||
|
"event" : {
|
||||||
|
"rawName" : "OrderEvent.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvent.CANCEL"
|
||||||
|
},
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "OrderState.PROCESSING",
|
||||||
|
"fullIdentifier" : "OrderState.PROCESSING"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "OrderState.CANCELLED",
|
||||||
|
"fullIdentifier" : "OrderState.CANCELLED"
|
||||||
|
} ],
|
||||||
|
"event" : {
|
||||||
|
"rawName" : "OrderEvent.CANCEL",
|
||||||
|
"fullIdentifier" : "OrderEvent.CANCEL"
|
||||||
|
},
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"endStates" : [ "OrderState.COMPLETED", "OrderState.CANCELLED" ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
@startuml
|
||||||
|
!pragma layout smetana
|
||||||
|
set separator none
|
||||||
|
hide empty description
|
||||||
|
hide stereotype
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor white
|
||||||
|
BorderColor #94a3b8
|
||||||
|
BorderThickness 1
|
||||||
|
FontName Inter
|
||||||
|
FontSize 9
|
||||||
|
FontStyle bold
|
||||||
|
RoundCorner 20
|
||||||
|
Padding 1
|
||||||
|
}
|
||||||
|
skinparam shadowing false
|
||||||
|
skinparam ArrowFontName JetBrains Mono
|
||||||
|
skinparam ArrowFontSize 8
|
||||||
|
skinparam ArrowColor #cbd5e1
|
||||||
|
skinparam ArrowThickness 1
|
||||||
|
skinparam dpi 110
|
||||||
|
skinparam svgLinkTarget _self
|
||||||
|
|
||||||
|
[*] --> OrderState.NEW
|
||||||
|
|
||||||
|
|
||||||
|
OrderState.NEW -[#1E90FF,bold]-> OrderState.PROCESSING <<external>> : OrderEvent.PROCESS
|
||||||
|
OrderState.PROCESSING -[#1E90FF,bold]-> OrderState.COMPLETED <<external>> : OrderEvent.COMPLETE
|
||||||
|
OrderState.NEW -[#1E90FF,bold]-> OrderState.CANCELLED <<external>> : OrderEvent.CANCEL
|
||||||
|
OrderState.PROCESSING -[#1E90FF,bold]-> OrderState.CANCELLED <<external>> : OrderEvent.CANCEL
|
||||||
|
|
||||||
|
OrderState.COMPLETED --> [*]
|
||||||
|
OrderState.CANCELLED --> [*]
|
||||||
|
@enduml
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="NEW">
|
||||||
|
<state id="NEW">
|
||||||
|
<transition target="PROCESSING" event="OrderEvent.PROCESS"/>
|
||||||
|
<transition target="CANCELLED" event="OrderEvent.CANCEL"/>
|
||||||
|
</state>
|
||||||
|
<state id="PROCESSING">
|
||||||
|
<transition target="COMPLETED" event="OrderEvent.COMPLETE"/>
|
||||||
|
<transition target="CANCELLED" event="OrderEvent.CANCEL"/>
|
||||||
|
</state>
|
||||||
|
<state id="COMPLETED">
|
||||||
|
</state>
|
||||||
|
<state id="CANCELLED">
|
||||||
|
</state>
|
||||||
|
</scxml>
|
||||||
|
|
||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -232,7 +277,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -246,7 +294,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -260,7 +311,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -274,7 +328,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -288,7 +345,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -302,7 +362,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -764,7 +827,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTX",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTX",
|
||||||
|
"fullIdentifier" : "Events.EVENTX"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -813,7 +879,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_3",
|
"rawName" : "States.STATE_EXTRA_3",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_3"
|
"fullIdentifier" : "States.STATE_EXTRA_3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -827,7 +896,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -841,7 +913,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
@@ -36,27 +36,27 @@ state States.STATE9 <<choice>>
|
|||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
state States.STATE2 <<choice>>
|
state States.STATE2 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
@@ -82,12 +82,12 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
States.STATE8 -[#FF6347,bold]-> States.STATE10 <<choice_type>> : (order=1)
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
|
States.STATE2 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX
|
||||||
States.STATE2 -[#FF6347,bold]-> States.STATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
States.STATE2 -[#FF6347,bold]-> States.STATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
|
||||||
States.STATE2 -[#FF6347,bold]-> States.STATE_EXTRA_1 <<choice_type>> : (order=1)
|
States.STATE2 -[#FF6347,bold]-> States.STATE_EXTRA_1 <<choice_type>> : (order=1)
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.STATE_EXTRA_3 <<external>> : Events.EVENTY
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : 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>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
|
States.STATE_EXTRA_2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
"rawName" : "States.STATE2",
|
"rawName" : "States.STATE2",
|
||||||
"fullIdentifier" : "States.STATE2"
|
"fullIdentifier" : "States.STATE2"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT1",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT1",
|
||||||
|
"fullIdentifier" : "Events.EVENT1"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -36,7 +39,10 @@
|
|||||||
"rawName" : "States.STATE3",
|
"rawName" : "States.STATE3",
|
||||||
"fullIdentifier" : "States.STATE3"
|
"fullIdentifier" : "States.STATE3"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT2",
|
||||||
|
"fullIdentifier" : "Events.EVENT2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -50,7 +56,10 @@
|
|||||||
"rawName" : "States.STATE4",
|
"rawName" : "States.STATE4",
|
||||||
"fullIdentifier" : "States.STATE4"
|
"fullIdentifier" : "States.STATE4"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT3",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT3",
|
||||||
|
"fullIdentifier" : "Events.EVENT3"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -64,7 +73,10 @@
|
|||||||
"rawName" : "States.STATE5",
|
"rawName" : "States.STATE5",
|
||||||
"fullIdentifier" : "States.STATE5"
|
"fullIdentifier" : "States.STATE5"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT4",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT4",
|
||||||
|
"fullIdentifier" : "Events.EVENT4"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -78,7 +90,10 @@
|
|||||||
"rawName" : "States.STATE6",
|
"rawName" : "States.STATE6",
|
||||||
"fullIdentifier" : "States.STATE6"
|
"fullIdentifier" : "States.STATE6"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT5",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT5",
|
||||||
|
"fullIdentifier" : "Events.EVENT5"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -92,7 +107,10 @@
|
|||||||
"rawName" : "States.STATE7",
|
"rawName" : "States.STATE7",
|
||||||
"fullIdentifier" : "States.STATE7"
|
"fullIdentifier" : "States.STATE7"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT6",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT6",
|
||||||
|
"fullIdentifier" : "Events.EVENT6"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -106,7 +124,10 @@
|
|||||||
"rawName" : "States.STATE8",
|
"rawName" : "States.STATE8",
|
||||||
"fullIdentifier" : "States.STATE8"
|
"fullIdentifier" : "States.STATE8"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT7",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT7",
|
||||||
|
"fullIdentifier" : "Events.EVENT7"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -120,7 +141,10 @@
|
|||||||
"rawName" : "States.STATE9",
|
"rawName" : "States.STATE9",
|
||||||
"fullIdentifier" : "States.STATE9"
|
"fullIdentifier" : "States.STATE9"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT8",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT8",
|
||||||
|
"fullIdentifier" : "Events.EVENT8"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -134,7 +158,10 @@
|
|||||||
"rawName" : "States.STATE10",
|
"rawName" : "States.STATE10",
|
||||||
"fullIdentifier" : "States.STATE10"
|
"fullIdentifier" : "States.STATE10"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT9",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT9",
|
||||||
|
"fullIdentifier" : "Events.EVENT9"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -148,7 +175,10 @@
|
|||||||
"rawName" : "States.STATE11",
|
"rawName" : "States.STATE11",
|
||||||
"fullIdentifier" : "States.STATE11"
|
"fullIdentifier" : "States.STATE11"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT10",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT10",
|
||||||
|
"fullIdentifier" : "Events.EVENT10"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -162,7 +192,10 @@
|
|||||||
"rawName" : "States.STATE12",
|
"rawName" : "States.STATE12",
|
||||||
"fullIdentifier" : "States.STATE12"
|
"fullIdentifier" : "States.STATE12"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT11",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT11",
|
||||||
|
"fullIdentifier" : "Events.EVENT11"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -176,7 +209,10 @@
|
|||||||
"rawName" : "States.STATE13",
|
"rawName" : "States.STATE13",
|
||||||
"fullIdentifier" : "States.STATE13"
|
"fullIdentifier" : "States.STATE13"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT12",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT12",
|
||||||
|
"fullIdentifier" : "Events.EVENT12"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -190,7 +226,10 @@
|
|||||||
"rawName" : "States.STATE14",
|
"rawName" : "States.STATE14",
|
||||||
"fullIdentifier" : "States.STATE14"
|
"fullIdentifier" : "States.STATE14"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT13",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT13",
|
||||||
|
"fullIdentifier" : "Events.EVENT13"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -204,7 +243,10 @@
|
|||||||
"rawName" : "States.STATE15",
|
"rawName" : "States.STATE15",
|
||||||
"fullIdentifier" : "States.STATE15"
|
"fullIdentifier" : "States.STATE15"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT14",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT14",
|
||||||
|
"fullIdentifier" : "Events.EVENT14"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -218,7 +260,10 @@
|
|||||||
"rawName" : "States.STATE16",
|
"rawName" : "States.STATE16",
|
||||||
"fullIdentifier" : "States.STATE16"
|
"fullIdentifier" : "States.STATE16"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT15",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT15",
|
||||||
|
"fullIdentifier" : "Events.EVENT15"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -232,7 +277,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -246,7 +294,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -260,7 +311,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -274,7 +328,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -288,7 +345,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -302,7 +362,10 @@
|
|||||||
"rawName" : "States.STATEY",
|
"rawName" : "States.STATEY",
|
||||||
"fullIdentifier" : "States.STATEY"
|
"fullIdentifier" : "States.STATEY"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTY",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTY",
|
||||||
|
"fullIdentifier" : "Events.EVENTY"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -764,7 +827,10 @@
|
|||||||
"rawName" : "States.STATE_EXTRA_1",
|
"rawName" : "States.STATE_EXTRA_1",
|
||||||
"fullIdentifier" : "States.STATE_EXTRA_1"
|
"fullIdentifier" : "States.STATE_EXTRA_1"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENTX",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENTX",
|
||||||
|
"fullIdentifier" : "Events.EVENTX"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -778,7 +844,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -792,7 +861,10 @@
|
|||||||
"rawName" : "States.CANCEL",
|
"rawName" : "States.CANCEL",
|
||||||
"fullIdentifier" : "States.CANCEL"
|
"fullIdentifier" : "States.CANCEL"
|
||||||
} ],
|
} ],
|
||||||
"event" : "Events.EVENT_CANCEL_2",
|
"event" : {
|
||||||
|
"rawName" : "Events.EVENT_CANCEL_2",
|
||||||
|
"fullIdentifier" : "Events.EVENT_CANCEL_2"
|
||||||
|
},
|
||||||
"guard" : null,
|
"guard" : null,
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
@@ -35,27 +35,27 @@ state States.STATE14 <<choice>>
|
|||||||
state States.STATE9 <<choice>>
|
state States.STATE9 <<choice>>
|
||||||
state States.STATE8 <<choice>>
|
state States.STATE8 <<choice>>
|
||||||
|
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
|
States.STATE1 -[#1E90FF,bold]-> States.STATE2 <<external>> : Events.EVENT1
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
|
States.STATE2 -[#1E90FF,bold]-> States.STATE3 <<external>> : Events.EVENT2
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
|
States.STATE3 -[#1E90FF,bold]-> States.STATE4 <<external>> : Events.EVENT3
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
|
States.STATE4 -[#1E90FF,bold]-> States.STATE5 <<external>> : Events.EVENT4
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
|
States.STATE5 -[#1E90FF,bold]-> States.STATE6 <<external>> : Events.EVENT5
|
||||||
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
|
States.STATE6 -[#1E90FF,bold]-> States.STATE7 <<external>> : Events.EVENT6
|
||||||
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
|
States.STATE7 -[#1E90FF,bold]-> States.STATE8 <<external>> : Events.EVENT7
|
||||||
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
|
States.STATE8 -[#1E90FF,bold]-> States.STATE9 <<external>> : Events.EVENT8
|
||||||
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
|
States.STATE9 -[#1E90FF,bold]-> States.STATE10 <<external>> : Events.EVENT9
|
||||||
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
|
States.STATE10 -[#1E90FF,bold]-> States.STATE11 <<external>> : Events.EVENT10
|
||||||
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
|
States.STATE11 -[#1E90FF,bold]-> States.STATE12 <<external>> : Events.EVENT11
|
||||||
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
|
States.STATE12 -[#1E90FF,bold]-> States.STATE13 <<external>> : Events.EVENT12
|
||||||
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
|
States.STATE13 -[#1E90FF,bold]-> States.STATE14 <<external>> : Events.EVENT13
|
||||||
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
|
States.STATE14 -[#1E90FF,bold]-> States.STATE15 <<external>> : Events.EVENT14
|
||||||
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
|
States.STATE15 -[#1E90FF,bold]-> States.STATE16 <<external>> : Events.EVENT15
|
||||||
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE2 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE3 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE4 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE5 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
|
States.STATE4 -[#1E90FF,bold]-> States.STATEY <<external>> : Events.EVENTY
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATEY -[#FF6347,bold]-> States.STATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
States.STATEY -[#FF6347,bold]-> States.STATEZ <<choice_type>> : (order=1)
|
||||||
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
States.STATE16 -[#FF6347,bold]-> States.STATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
|
||||||
@@ -81,9 +81,9 @@ States.STATE9 -[#FF6347,bold]-> States.STATE7 <<choice_type>> : [guardVarEquals(
|
|||||||
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
States.STATE9 -[#FF6347,bold]-> States.STATE6 <<choice_type>> : (order=2)
|
||||||
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
States.STATE8 -[#FF6347,bold]-> States.STATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
|
||||||
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>> <<e_Events_EVENTX>> : Events.EVENTX
|
States.STATE5 -[#1E90FF,bold]-> States.STATE_EXTRA_1 <<external>> : Events.EVENTX
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL
|
||||||
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
|
States.STATE_EXTRA_1 -[#1E90FF,bold]-> States.CANCEL <<external>> : Events.EVENT_CANCEL_2
|
||||||
|
|
||||||
States.STATEZ --> [*]
|
States.STATEZ --> [*]
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ public class HtmlExporterCommand implements Callable<Integer> {
|
|||||||
@Option(names = {"--no-diamonds"}, description = "Disable rendering choice pseudostates as PlantUML diamonds (render them as normal state nodes instead).")
|
@Option(names = {"--no-diamonds"}, description = "Disable rendering choice pseudostates as PlantUML diamonds (render them as normal state nodes instead).")
|
||||||
private boolean noDiamonds;
|
private boolean noDiamonds;
|
||||||
|
|
||||||
|
@Option(names = {"--no-metadata-pane"}, description = "Disable rendering the left metadata pane (entry points, flows) in the HTML viewer.")
|
||||||
|
private boolean noMetadataPane;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer call() throws Exception {
|
public Integer call() throws Exception {
|
||||||
var out = spec.commandLine().getOut();
|
var out = spec.commandLine().getOut();
|
||||||
@@ -78,12 +81,17 @@ public class HtmlExporterCommand implements Callable<Integer> {
|
|||||||
List<String> formats = List.of("html", "json");
|
List<String> formats = List.of("html", "json");
|
||||||
List<String> profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList();
|
List<String> profiles = activeProfiles != null ? activeProfiles : java.util.Collections.emptyList();
|
||||||
|
|
||||||
|
if (noMetadataPane) {
|
||||||
|
System.setProperty("html.hideMetadataPane", "true");
|
||||||
|
}
|
||||||
|
|
||||||
if (jsonFile != null) {
|
if (jsonFile != null) {
|
||||||
exportService.runJsonExporter(jsonFile, outputDir, formats, profiles);
|
exportService.runJsonExporter(jsonFile, outputDir, formats, profiles);
|
||||||
} else {
|
} else {
|
||||||
boolean renderChoicesAsDiamonds = !noDiamonds;
|
boolean renderChoicesAsDiamonds = !noDiamonds;
|
||||||
exportService.runExporter(inputDir, outputDir, formats, renderChoicesAsDiamonds, profiles, flowsFile, machineFilter);
|
exportService.runExporter(inputDir, outputDir, formats, renderChoicesAsDiamonds, profiles, flowsFile, machineFilter);
|
||||||
}
|
}
|
||||||
|
System.clearProperty("html.hideMetadataPane");
|
||||||
|
|
||||||
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ Interactive documentation generated successfully."));
|
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ Interactive documentation generated successfully."));
|
||||||
|
|
||||||
|
|||||||
@@ -56,12 +56,64 @@ public class HtmlExporter implements StateMachineExporter {
|
|||||||
// 5. Prepare Metadata JSON
|
// 5. Prepare Metadata JSON
|
||||||
String metadataJson = objectMapper.writeValueAsString(result);
|
String metadataJson = objectMapper.writeValueAsString(result);
|
||||||
|
|
||||||
|
// Check if we should render metadata pane
|
||||||
|
boolean hideMetadataProp = Boolean.getBoolean("html.hideMetadataPane");
|
||||||
|
boolean hasEntryPoints = false;
|
||||||
|
if (result.getMetadata() != null && result.getMetadata().getEntryPoints() != null && !result.getMetadata().getEntryPoints().isEmpty()) {
|
||||||
|
Set<String> smEvents = result.getTransitions().stream()
|
||||||
|
.filter(t -> t.getEvent() != null)
|
||||||
|
.map(t -> {
|
||||||
|
String eventStr = t.getEvent().fullIdentifier() != null ? t.getEvent().fullIdentifier() : t.getEvent().rawName();
|
||||||
|
return eventStr == null ? null : eventStr.replaceAll("[^a-zA-Z0-9_]", "_");
|
||||||
|
})
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
if (result.getMetadata().getCallChains() != null) {
|
||||||
|
hasEntryPoints = result.getMetadata().getCallChains().stream()
|
||||||
|
.anyMatch(c -> c.getMatchedTransitions() != null && !c.getMatchedTransitions().isEmpty());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean hasFlows = result.getFlows() != null && !result.getFlows().isEmpty();
|
||||||
|
boolean shouldRenderPane = !hideMetadataProp && options.isIncludeMetadataPane() && (hasEntryPoints || hasFlows);
|
||||||
|
|
||||||
// 6. Inject Data
|
// 6. Inject Data
|
||||||
return template
|
String finalHtml = template
|
||||||
.replace("{{MACHINE_NAME}}", result.getName())
|
.replace("{{MACHINE_NAME}}", result.getName())
|
||||||
.replace("{{SVG_CONTENT}}", decoratedSvg)
|
.replace("{{SVG_CONTENT}}", decoratedSvg)
|
||||||
.replace("{{METADATA_JSON}}", metadataJson);
|
.replace("{{METADATA_JSON}}", metadataJson);
|
||||||
|
|
||||||
|
if (shouldRenderPane) {
|
||||||
|
// If template.html uses {{SIDEBAR_HTML}} and {{TOGGLE_BUTTON_HTML}}, replace with actual HTML
|
||||||
|
finalHtml = finalHtml.replace("{{SIDEBAR_HTML}}", "<div id=\"sidebar\">\n" +
|
||||||
|
" <div class=\"sidebar-header\">\n" +
|
||||||
|
" <header>\n" +
|
||||||
|
" <h1>Explorer</h1>\n" +
|
||||||
|
" <p>{{MACHINE_NAME}}</p>\n" +
|
||||||
|
" </header>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" \n" +
|
||||||
|
" <div class=\"tabs\">\n" +
|
||||||
|
" <div class=\"tab active\" data-tab=\"explorer\">Explorer</div>\n" +
|
||||||
|
" <div class=\"tab\" data-tab=\"flows\">Business Flows</div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
"\n" +
|
||||||
|
" <div id=\"tab-explorer\" class=\"tab-content active\">\n" +
|
||||||
|
" <div id=\"ep-list\"></div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
"\n" +
|
||||||
|
" <div id=\"tab-flows\" class=\"tab-content\">\n" +
|
||||||
|
" <div id=\"flow-list\"></div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
"</div>").replace("{{MACHINE_NAME}}", result.getName());
|
||||||
|
|
||||||
|
finalHtml = finalHtml.replace("{{TOGGLE_BUTTON_HTML}}", " <button id=\"toggle-sidebar\" aria-label=\"Toggle Sidebar\" title=\"Toggle Sidebar\">\n" +
|
||||||
|
" <svg viewBox=\"0 0 24 24\"><path d=\"M4 6h16M4 12h16M4 18h16\"></path></svg>\n" +
|
||||||
|
" </button>");
|
||||||
|
} else {
|
||||||
|
finalHtml = finalHtml.replace("{{SIDEBAR_HTML}}", "").replace("{{TOGGLE_BUTTON_HTML}}", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return finalHtml;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Failed to export to HTML", e);
|
log.error("Failed to export to HTML", e);
|
||||||
throw new RuntimeException("HTML export failed", e);
|
throw new RuntimeException("HTML export failed", e);
|
||||||
|
|||||||
@@ -261,32 +261,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="sidebar">
|
{{SIDEBAR_HTML}}
|
||||||
<div class="sidebar-header">
|
|
||||||
<header>
|
|
||||||
<h1>Explorer</h1>
|
|
||||||
<p>{{MACHINE_NAME}}</p>
|
|
||||||
</header>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tabs">
|
|
||||||
<div class="tab active" data-tab="explorer">Explorer</div>
|
|
||||||
<div class="tab" data-tab="flows">Business Flows</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tab-explorer" class="tab-content active">
|
|
||||||
<div id="ep-list"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tab-flows" class="tab-content">
|
|
||||||
<div id="flow-list"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<button id="toggle-sidebar" aria-label="Toggle Sidebar" title="Toggle Sidebar">
|
{{TOGGLE_BUTTON_HTML}}
|
||||||
<svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
|
||||||
</button>
|
|
||||||
<div id="svg-container">
|
<div id="svg-container">
|
||||||
{{SVG_CONTENT}}
|
{{SVG_CONTENT}}
|
||||||
</div>
|
</div>
|
||||||
@@ -304,18 +282,21 @@
|
|||||||
const svg = document.querySelector('#svg-container svg');
|
const svg = document.querySelector('#svg-container svg');
|
||||||
panZoomInstance = svgPanZoom(svg, { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true });
|
panZoomInstance = svgPanZoom(svg, { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true });
|
||||||
|
|
||||||
document.getElementById('toggle-sidebar').addEventListener('click', () => {
|
const toggleSidebar = document.getElementById('toggle-sidebar');
|
||||||
const sidebar = document.getElementById('sidebar');
|
if (toggleSidebar) {
|
||||||
sidebar.classList.toggle('collapsed');
|
toggleSidebar.addEventListener('click', () => {
|
||||||
|
const sidebar = document.getElementById('sidebar');
|
||||||
|
if (sidebar) sidebar.classList.toggle('collapsed');
|
||||||
|
|
||||||
// Re-center SVG pan-zoom after transition
|
// Re-center SVG pan-zoom after transition
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (panZoomInstance) {
|
if (panZoomInstance) {
|
||||||
panZoomInstance.resize();
|
panZoomInstance.resize();
|
||||||
panZoomInstance.center();
|
panZoomInstance.center();
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
setupTabs();
|
setupTabs();
|
||||||
populateSidebar();
|
populateSidebar();
|
||||||
@@ -325,8 +306,10 @@
|
|||||||
|
|
||||||
function setupTabs() {
|
function setupTabs() {
|
||||||
const flows = metadata.flows || [];
|
const flows = metadata.flows || [];
|
||||||
|
const tabsEl = document.querySelector('.tabs');
|
||||||
|
if (!tabsEl) return;
|
||||||
if (flows.length === 0) {
|
if (flows.length === 0) {
|
||||||
document.querySelector('.tabs').style.display = 'none';
|
tabsEl.style.display = 'none';
|
||||||
document.querySelector('.tab-content[data-tab="flows"]')?.remove();
|
document.querySelector('.tab-content[data-tab="flows"]')?.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -342,15 +325,15 @@
|
|||||||
|
|
||||||
function populateSidebar() {
|
function populateSidebar() {
|
||||||
const list = document.getElementById('ep-list');
|
const list = document.getElementById('ep-list');
|
||||||
|
if (!list) return;
|
||||||
const entryPoints = metadata.metadata.entryPoints || [];
|
const entryPoints = metadata.metadata.entryPoints || [];
|
||||||
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
|
||||||
|
|
||||||
entryPoints.forEach(ep => {
|
entryPoints.forEach(ep => {
|
||||||
// Quality Filter: Hide if it doesn't trigger a machine event
|
// Quality Filter: Hide if it doesn't trigger a machine event
|
||||||
const chains = (metadata.metadata.callChains || []).filter(c =>
|
const chains = (metadata.metadata.callChains || []).filter(c =>
|
||||||
c.entryPoint.className === ep.className &&
|
c.entryPoint.className === ep.className &&
|
||||||
c.entryPoint.methodName === ep.methodName &&
|
c.entryPoint.methodName === ep.methodName &&
|
||||||
machineEvents.has(c.triggerPoint.event)
|
c.matchedTransitions && c.matchedTransitions.length > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
if (chains.length === 0) return;
|
if (chains.length === 0) return;
|
||||||
@@ -364,6 +347,22 @@
|
|||||||
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
||||||
${sourceHint}
|
${sourceHint}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
// Add tags for matched events
|
||||||
|
let triggersHtml = '<div class="ep-transitions" style="margin-top: 8px;">Triggers: ';
|
||||||
|
const addedEvents = new Set();
|
||||||
|
chains.forEach(c => {
|
||||||
|
c.matchedTransitions.forEach(t => {
|
||||||
|
const evName = t.event || "";
|
||||||
|
if (!addedEvents.has(evName)) {
|
||||||
|
addedEvents.add(evName);
|
||||||
|
triggersHtml += `<span class="badge transition" style="font-size: 0.65rem; padding: 2px 6px;">${evName}</span> `;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
triggersHtml += '</div>';
|
||||||
|
card.innerHTML += triggersHtml;
|
||||||
|
|
||||||
card.onmouseenter = () => highlightEntryPoint(ep);
|
card.onmouseenter = () => highlightEntryPoint(ep);
|
||||||
card.onmouseleave = clearHighlights;
|
card.onmouseleave = clearHighlights;
|
||||||
list.appendChild(card);
|
list.appendChild(card);
|
||||||
@@ -372,6 +371,7 @@
|
|||||||
|
|
||||||
function populateFlows() {
|
function populateFlows() {
|
||||||
const list = document.getElementById('flow-list');
|
const list = document.getElementById('flow-list');
|
||||||
|
if (!list) return;
|
||||||
const flows = metadata.flows || [];
|
const flows = metadata.flows || [];
|
||||||
|
|
||||||
if (flows.length === 0) {
|
if (flows.length === 0) {
|
||||||
@@ -394,14 +394,21 @@
|
|||||||
|
|
||||||
function highlightEntryPoint(ep) {
|
function highlightEntryPoint(ep) {
|
||||||
clearHighlights();
|
clearHighlights();
|
||||||
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
|
||||||
const chains = metadata.metadata.callChains || [];
|
const chains = metadata.metadata.callChains || [];
|
||||||
const relevantEvents = chains
|
|
||||||
.filter(c => c.entryPoint.className === ep.className && c.entryPoint.methodName === ep.methodName && machineEvents.has(c.triggerPoint.event))
|
|
||||||
.map(c => c.triggerPoint.event);
|
|
||||||
|
|
||||||
if (relevantEvents.length === 0) return;
|
let steps = [];
|
||||||
highlightEvents(relevantEvents);
|
chains.forEach(c => {
|
||||||
|
if (c.entryPoint.className === ep.className && c.entryPoint.methodName === ep.methodName) {
|
||||||
|
if (c.matchedTransitions && c.matchedTransitions.length > 0) {
|
||||||
|
c.matchedTransitions.forEach(t => {
|
||||||
|
steps.push({ event: t.event, source: t.sourceState });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (steps.length === 0) return;
|
||||||
|
highlightEvents(steps);
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightFlow(flow) {
|
function highlightFlow(flow) {
|
||||||
@@ -419,19 +426,38 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
steps.forEach(step => {
|
steps.forEach(step => {
|
||||||
let linkId = "";
|
let targetEvent = "";
|
||||||
if (step.includes("->")) {
|
let targetSource = "";
|
||||||
// Named Choice Branch: "SRC->TGT"
|
let targetAnon = "";
|
||||||
|
|
||||||
|
if (typeof step === 'object') {
|
||||||
|
targetEvent = normalize(step.event);
|
||||||
|
targetSource = normalize(step.source);
|
||||||
|
} else if (step.includes("->")) {
|
||||||
const parts = step.split("->");
|
const parts = step.split("->");
|
||||||
linkId = "#link_anon_" + normalize(parts[0]) + "_" + normalize(parts[1]);
|
targetAnon = "#link_anon_" + normalize(parts[0]) + "_" + normalize(parts[1]);
|
||||||
} else {
|
} else {
|
||||||
// Standard Event
|
targetEvent = normalize(step);
|
||||||
linkId = "#link_" + normalize(step);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
svg.querySelectorAll('a').forEach(link => {
|
svg.querySelectorAll('a').forEach(link => {
|
||||||
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
||||||
if (href === linkId) {
|
if (!href) return;
|
||||||
|
|
||||||
|
let matches = false;
|
||||||
|
if (targetAnon) {
|
||||||
|
matches = (href === targetAnon);
|
||||||
|
} else if (targetEvent) {
|
||||||
|
if (targetSource) {
|
||||||
|
// Exact match
|
||||||
|
matches = (href === "#link_" + targetSource + "__" + targetEvent);
|
||||||
|
} else {
|
||||||
|
// Match all sources for this event
|
||||||
|
matches = href.startsWith("#link_") && href.endsWith("__" + targetEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matches) {
|
||||||
highlightLinkGroup(link);
|
highlightLinkGroup(link);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -496,20 +522,31 @@
|
|||||||
const isAnon = linkId.startsWith('anon_');
|
const isAnon = linkId.startsWith('anon_');
|
||||||
|
|
||||||
let metaTrans = null;
|
let metaTrans = null;
|
||||||
|
let cleanEventName = linkId;
|
||||||
if (isAnon) {
|
if (isAnon) {
|
||||||
metaTrans = transitions.find(t =>
|
metaTrans = transitions.find(t =>
|
||||||
!t.event &&
|
!t.event &&
|
||||||
"anon_" + normalize(t.sourceStates[0].fullIdentifier) + "_" + normalize(t.targetStates[0].fullIdentifier) === linkId
|
"anon_" + normalize(t.sourceStates[0].fullIdentifier) + "_" + normalize(t.targetStates[0].fullIdentifier) === linkId
|
||||||
);
|
);
|
||||||
|
cleanEventName = "Internal logic";
|
||||||
} else {
|
} else {
|
||||||
metaTrans = transitions.find(t => normalize(t.event) === linkId);
|
metaTrans = transitions.find(t => {
|
||||||
|
if (!t.event) return false;
|
||||||
|
const evStr = t.event.fullIdentifier || t.event.rawName || t.event;
|
||||||
|
const sourceStr = t.sourceStates && t.sourceStates.length > 0 ? (t.sourceStates[0].fullIdentifier || t.sourceStates[0].rawName) : "";
|
||||||
|
const expectedLinkId = normalize(sourceStr) + "__" + normalize(evStr);
|
||||||
|
return expectedLinkId === linkId;
|
||||||
|
});
|
||||||
|
if (metaTrans && metaTrans.event) {
|
||||||
|
cleanEventName = metaTrans.event.fullIdentifier || metaTrans.event.rawName || metaTrans.event;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (metaTrans || isAnon) {
|
if (metaTrans || isAnon) {
|
||||||
link.style.cursor = 'pointer';
|
link.style.cursor = 'pointer';
|
||||||
const setupTippy = (el) => {
|
const setupTippy = (el) => {
|
||||||
tippy(el, {
|
tippy(el, {
|
||||||
content: createTooltip(isAnon ? "Internal logic" : linkId, metaTrans),
|
content: createTooltip(cleanEventName, metaTrans),
|
||||||
allowHTML: true,
|
allowHTML: true,
|
||||||
theme: 'modern',
|
theme: 'modern',
|
||||||
interactive: true,
|
interactive: true,
|
||||||
@@ -535,7 +572,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createTooltip(name, trans) {
|
function createTooltip(name, trans) {
|
||||||
const chains = (metadata.metadata.callChains || []).filter(c => normalize(c.triggerPoint.event) === name);
|
const chains = (metadata.metadata.callChains || []).filter(c => {
|
||||||
|
if (!c.matchedTransitions || c.matchedTransitions.length === 0) return false;
|
||||||
|
return c.matchedTransitions.some(t => {
|
||||||
|
const cEventStr = typeof t.event === 'object' ? (t.event.fullIdentifier || t.event.rawName || t.event) : t.event;
|
||||||
|
return normalize(cEventStr) === normalize(name);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
let html = `<div class="tooltip-content">
|
let html = `<div class="tooltip-content">
|
||||||
<div style="font-weight:900; font-size:1.1rem; margin-bottom:12px; border-bottom:1px solid #eee; padding-bottom:8px; line-height:1.3;">
|
<div style="font-weight:900; font-size:1.1rem; margin-bottom:12px; border-bottom:1px solid #eee; padding-bottom:8px; line-height:1.3;">
|
||||||
@@ -588,7 +631,7 @@
|
|||||||
let html = `<div style="font-size:0.65rem; font-weight:700; color:#94a3b8; margin-top:8px; margin-bottom:4px; text-transform:uppercase;">Input Data</div>`;
|
let html = `<div style="font-size:0.65rem; font-weight:700; color:#94a3b8; margin-top:8px; margin-bottom:4px; text-transform:uppercase;">Input Data</div>`;
|
||||||
html += `<div class="payload-box">`;
|
html += `<div class="payload-box">`;
|
||||||
params.forEach(p => {
|
params.forEach(p => {
|
||||||
const annotation = (p.annotations || []).find(a => a.endsWith("RequestBody") || a.endsWith("PathVariable") || a.endsWith("RequestParam"));
|
const annotation = (p.annotations || []).find(a => a.endsWith("RequestBody") || a.endsWith("PathVariable") || a.endsWith("RequestParam") || a.endsWith("Payload") || a.endsWith("Header") || a.endsWith("Headers"));
|
||||||
const cleanAnn = annotation ? "@" + annotation.substring(annotation.lastIndexOf('.') + 1) : "";
|
const cleanAnn = annotation ? "@" + annotation.substring(annotation.lastIndexOf('.') + 1) : "";
|
||||||
html += `<div class="payload-param">
|
html += `<div class="payload-param">
|
||||||
<span style="color:#f43f5e; font-size:0.65rem; font-weight:bold;">${cleanAnn}</span>
|
<span style="color:#f43f5e; font-size:0.65rem; font-weight:bold;">${cleanAnn}</span>
|
||||||
|
|||||||
@@ -81,8 +81,92 @@ public class HtmlExporterTest {
|
|||||||
|
|
||||||
// 7. Assertions - Surgical SVG Identification
|
// 7. Assertions - Surgical SVG Identification
|
||||||
// Every event should be wrapped in an identifying hyperlink for robust JS selection
|
// Every event should be wrapped in an identifying hyperlink for robust JS selection
|
||||||
assertThat(html).contains("#link_CREATE");
|
java.nio.file.Files.writeString(java.nio.file.Paths.get("debug_html.html"), html);
|
||||||
assertThat(html).contains("#link_ASSIGN");
|
|
||||||
assertThat(html).contains("#link_CLOSE_TICKET");
|
click.kamil.springstatemachineexporter.exporter.ExportOptions plantUmlOptions = click.kamil.springstatemachineexporter.exporter.ExportOptions.builder()
|
||||||
|
.embedIdentifiers(true)
|
||||||
|
.build();
|
||||||
|
click.kamil.springstatemachineexporter.exporter.PlantUml pumlExporter = new click.kamil.springstatemachineexporter.exporter.PlantUml();
|
||||||
|
java.nio.file.Files.writeString(java.nio.file.Paths.get("debug_puml.puml"), pumlExporter.export(result, plantUmlOptions));
|
||||||
|
|
||||||
|
assertThat(html).contains("__CREATE");
|
||||||
|
assertThat(html).contains("__ASSIGN");
|
||||||
|
assertThat(html).contains("__CLOSE_TICKET");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldRenderSidebarWhenMatchedTransitionsExist() throws IOException {
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.EntryPoint ep = click.kamil.springstatemachineexporter.analysis.model.EntryPoint.builder().name("Test").build();
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.CallChain chain = click.kamil.springstatemachineexporter.analysis.model.CallChain.builder()
|
||||||
|
.matchedTransitions(List.of(click.kamil.springstatemachineexporter.analysis.model.MatchedTransition.builder().event("TEST_EVENT").build()))
|
||||||
|
.build();
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata metadata = click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata.builder()
|
||||||
|
.entryPoints(List.of(ep))
|
||||||
|
.callChains(List.of(chain))
|
||||||
|
.build();
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.name("SidebarTest")
|
||||||
|
.transitions(List.of())
|
||||||
|
.startStates(java.util.Collections.emptySet())
|
||||||
|
.endStates(java.util.Collections.emptySet())
|
||||||
|
.metadata(metadata)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
HtmlExporter exporter = new HtmlExporter();
|
||||||
|
String html = exporter.export(result, ExportOptions.builder().includeMetadataPane(true).build());
|
||||||
|
|
||||||
|
assertThat(html).contains("id=\"sidebar\"");
|
||||||
|
assertThat(html).contains("id=\"ep-list\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldNotRenderSidebarWhenNoMatchedTransitionsExist() throws IOException {
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.EntryPoint ep = click.kamil.springstatemachineexporter.analysis.model.EntryPoint.builder().name("Test").build();
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.CallChain chain = click.kamil.springstatemachineexporter.analysis.model.CallChain.builder()
|
||||||
|
.triggerPoint(click.kamil.springstatemachineexporter.analysis.model.TriggerPoint.builder().event("TEST_EVENT").build())
|
||||||
|
.matchedTransitions(List.of()) // EMPTY
|
||||||
|
.build();
|
||||||
|
click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata metadata = click.kamil.springstatemachineexporter.analysis.model.CodebaseMetadata.builder()
|
||||||
|
.entryPoints(List.of(ep))
|
||||||
|
.callChains(List.of(chain))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Transition transition = new Transition();
|
||||||
|
transition.setEvent(click.kamil.springstatemachineexporter.model.Event.of("TEST_EVENT"));
|
||||||
|
transition.setSourceStates(List.of());
|
||||||
|
transition.setTargetStates(List.of());
|
||||||
|
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.name("SidebarTestEmpty")
|
||||||
|
.transitions(List.of(transition))
|
||||||
|
.startStates(java.util.Collections.emptySet())
|
||||||
|
.endStates(java.util.Collections.emptySet())
|
||||||
|
.metadata(metadata)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
HtmlExporter exporter = new HtmlExporter();
|
||||||
|
String html = exporter.export(result, ExportOptions.builder().includeMetadataPane(true).build());
|
||||||
|
|
||||||
|
assertThat(html).doesNotContain("id=\"sidebar\"");
|
||||||
|
assertThat(html).doesNotContain("id=\"ep-list\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldContainCorrectJsLogicForEventTooltipResolution() throws IOException {
|
||||||
|
HtmlExporter exporter = new HtmlExporter();
|
||||||
|
AnalysisResult result = AnalysisResult.builder()
|
||||||
|
.name("JsTest")
|
||||||
|
.transitions(List.of())
|
||||||
|
.startStates(java.util.Collections.emptySet())
|
||||||
|
.endStates(java.util.Collections.emptySet())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
String html = exporter.export(result, ExportOptions.builder().build());
|
||||||
|
|
||||||
|
// Verify that the template gracefully unwraps the Event JSON object for interactive hovers in attachInteractivity
|
||||||
|
assertThat(html).contains("const evStr = t.event.fullIdentifier || t.event.rawName || t.event;");
|
||||||
|
|
||||||
|
// Verify that the template gracefully unwraps the Event JSON object when filtering call chains in createTooltip
|
||||||
|
assertThat(html).contains("const cEventStr = typeof t.event === 'object' ? (t.event.fullIdentifier || t.event.rawName || t.event) : t.event;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
33
state_machines/complex_multi_module_sm/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
33
state_machines/complex_multi_module_sm/domain/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
24
state_machines/complex_multi_module_sm/domain/pom.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>click.kamil.complex</groupId>
|
||||||
|
<artifactId>complex-multi-module-sm</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>domain</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.statemachine</groupId>
|
||||||
|
<artifactId>spring-statemachine-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package click.kamil.domain;
|
||||||
|
|
||||||
|
import org.springframework.messaging.support.GenericMessage;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CustomStateMachineMessage<T, P> extends GenericMessage<T> {
|
||||||
|
|
||||||
|
private final P customPayload;
|
||||||
|
|
||||||
|
public CustomStateMachineMessage(T payload, P customPayload) {
|
||||||
|
super(payload);
|
||||||
|
this.customPayload = customPayload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomStateMachineMessage(T payload, Map<String, Object> headers, P customPayload) {
|
||||||
|
super(payload, headers);
|
||||||
|
this.customPayload = customPayload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public P getCustomPayload() {
|
||||||
|
return customPayload;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package click.kamil.domain;
|
||||||
|
|
||||||
|
public interface IEvent {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package click.kamil.domain;
|
||||||
|
|
||||||
|
public interface IState {
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package click.kamil.domain;
|
||||||
|
|
||||||
|
public enum OrderEvent implements IEvent {
|
||||||
|
PROCESS, COMPLETE, CANCEL
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package click.kamil.domain;
|
||||||
|
|
||||||
|
public enum OrderState implements IState {
|
||||||
|
NEW, PROCESSING, COMPLETED, CANCELLED
|
||||||
|
}
|
||||||