This commit is contained in:
2026-07-06 21:21:35 +02:00
parent 0a8f9720c9
commit 56588a835d
17 changed files with 599 additions and 384 deletions

View File

@@ -60,9 +60,3 @@ task runGolden(type: JavaExec) {
classpath = sourceSets.test.runtimeClasspath
workingDir = rootProject.projectDir
}
task runGoldenFixed(type: JavaExec) {
mainClass = "click.kamil.springstatemachineexporter.GoldenUpdater"
classpath = sourceSets.test.runtimeClasspath
workingDir = rootProject.projectDir
}

View File

@@ -27,6 +27,7 @@ public class TriggerPoint {
private final java.util.List<String> polymorphicEvents; // NEW: stores concrete events resolved via deep polymorphism
private final boolean external;
private final String constraint;
private final boolean ambiguous;
public TriggerPoint(
String event,
@@ -41,7 +42,8 @@ public class TriggerPoint {
String eventTypeFqn,
java.util.List<String> polymorphicEvents,
boolean external,
String constraint) {
String constraint,
boolean ambiguous) {
this.className = className;
this.methodName = methodName;
this.sourceFile = sourceFile;
@@ -61,6 +63,7 @@ public class TriggerPoint {
}
this.external = external;
this.constraint = constraint;
this.ambiguous = ambiguous;
}
private static String qualifyEvent(String e, String eventTypeFqn) {

View File

@@ -239,9 +239,8 @@ public class ConstantResolver {
}
try {
java.util.Map<String, String> localVars = new java.util.HashMap<>(prebuiltLocals);
java.util.Set<String> declaredLocals = new java.util.HashSet<>(prebuiltLocals.keySet());
return evaluateBody(md.getBody(), localVars, declaredLocals, context, visited);
return evaluateBody(md.getBody(), prebuiltLocals, declaredLocals, context, visited);
} finally {
visited.remove(methodFqn);
}
@@ -267,7 +266,7 @@ public class ConstantResolver {
String varName = fragment.getName().getIdentifier();
declaredLocals.add(varName);
if (fragment.getInitializer() != null) {
String rhsVal = resolveExpressionWithParams(fragment.getInitializer(), localVars);
String rhsVal = resolveExpressionWithParams(fragment.getInitializer(), localVars, context);
if (rhsVal == null) rhsVal = resolveInternal(fragment.getInitializer(), context, visited);
if (rhsVal != null) localVars.put(varName, rhsVal);
}
@@ -276,6 +275,43 @@ public class ConstantResolver {
return super.visit(vds);
}
@Override
public boolean visit(org.eclipse.jdt.core.dom.MethodInvocation node) {
MethodDeclaration sideEffectMd = findInvokedMethod(node, context);
if (sideEffectMd != null && sideEffectMd.getBody() != null) {
TypeDeclaration currentTd = findEnclosingType(sideEffectMd);
if (sideEffectMd != null && sideEffectMd.getBody() != null) {
java.util.Map<String, String> inlineLocals = new java.util.HashMap<>();
for (java.util.Map.Entry<String, String> entry : localVars.entrySet()) {
if (entry.getKey().startsWith("this.")) {
inlineLocals.put(entry.getKey(), entry.getValue());
} else if (context.hasField(currentTd, entry.getKey())) {
inlineLocals.put(entry.getKey(), entry.getValue());
inlineLocals.put("this." + entry.getKey(), entry.getValue());
}
}
for (int i = 0; i < node.arguments().size() && i < sideEffectMd.parameters().size(); i++) {
Expression arg = (Expression) node.arguments().get(i);
String val = resolveExpressionWithParams(arg, localVars, context);
if (val == null) val = resolveInternal(arg, context, visited);
if (val != null) {
org.eclipse.jdt.core.dom.SingleVariableDeclaration param = (org.eclipse.jdt.core.dom.SingleVariableDeclaration) sideEffectMd.parameters().get(i);
inlineLocals.put(param.getName().getIdentifier(), val);
}
}
evaluateMethodBodyWithLocals(sideEffectMd, inlineLocals, context, visited);
for (java.util.Map.Entry<String, String> entry : inlineLocals.entrySet()) {
if (entry.getKey().startsWith("this.")) {
localVars.put(entry.getKey(), entry.getValue());
String bareName = entry.getKey().substring(5);
if (!declaredLocals.contains(bareName)) localVars.put(bareName, entry.getValue());
}
}
}
}
return super.visit(node);
}
@Override
public boolean visit(Assignment assignment) {
Expression lhs = assignment.getLeftHandSide();
@@ -285,7 +321,7 @@ public class ConstantResolver {
} else if (lhs instanceof FieldAccess fa) {
varName = "this." + fa.getName().getIdentifier();
}
String rhsVal = resolveExpressionWithParams(assignment.getRightHandSide(), localVars);
String rhsVal = resolveExpressionWithParams(assignment.getRightHandSide(), localVars, context);
if (rhsVal == null) rhsVal = resolveInternal(assignment.getRightHandSide(), context, visited);
if (varName != null && rhsVal != null) {
if (varName.startsWith("this.")) {
@@ -316,7 +352,7 @@ public class ConstantResolver {
String result = evaluateSwitchExpression(se, localVars, context, visited);
if (result != null) finalResult[0] = result;
} else if (rs.getExpression() != null) {
String result = resolveExpressionWithParams(rs.getExpression(), localVars);
String result = resolveExpressionWithParams(rs.getExpression(), localVars, context);
if (result == null) result = resolveInternal(rs.getExpression(), context, visited);
if (result != null) finalResult[0] = result;
}
@@ -329,7 +365,7 @@ public class ConstantResolver {
}
private String evaluateSwitchStatement(org.eclipse.jdt.core.dom.SwitchStatement ss, java.util.Map<String, String> paramValues, CodebaseContext context, Set<String> visited) {
String switchVar = resolveExpressionWithParams(ss.getExpression(), paramValues);
String switchVar = resolveExpressionWithParams(ss.getExpression(), paramValues, context);
if (switchVar == null) {
Set<String> values = new LinkedHashSet<>();
for (Object stmtObj : ss.statements()) {
@@ -381,7 +417,7 @@ public class ConstantResolver {
matchingCase = true;
} else {
for (Object exprObj : sc.expressions()) {
String caseVal = resolveExpressionWithParams((Expression) exprObj, paramValues);
String caseVal = resolveExpressionWithParams((Expression) exprObj, paramValues, context);
// Bare SimpleName case label (e.g. "case PAY"): use identifier as fallback
if (caseVal == null && exprObj instanceof org.eclipse.jdt.core.dom.SimpleName caseSn) {
caseVal = caseSn.getIdentifier();
@@ -416,7 +452,7 @@ public class ConstantResolver {
}
private String evaluateSwitchExpression(org.eclipse.jdt.core.dom.SwitchExpression se, java.util.Map<String, String> paramValues, CodebaseContext context, Set<String> visited) {
String switchVar = resolveExpressionWithParams(se.getExpression(), paramValues);
String switchVar = resolveExpressionWithParams(se.getExpression(), paramValues, context);
if (switchVar == null) {
Set<String> values = new LinkedHashSet<>();
for (Object stmtObj : se.statements()) {
@@ -468,7 +504,7 @@ public class ConstantResolver {
matchingCase = true;
} else {
for (Object exprObj : sc.expressions()) {
String caseVal = resolveExpressionWithParams((Expression) exprObj, paramValues);
String caseVal = resolveExpressionWithParams((Expression) exprObj, paramValues, context);
// Bare SimpleName case label (e.g. "case PAY"): use identifier as fallback
if (caseVal == null && exprObj instanceof org.eclipse.jdt.core.dom.SimpleName caseSn) {
caseVal = caseSn.getIdentifier();
@@ -502,7 +538,7 @@ public class ConstantResolver {
return null;
}
private String resolveExpressionWithParams(Expression expr, java.util.Map<String, String> paramValues) {
private String resolveExpressionWithParams(Expression expr, java.util.Map<String, String> paramValues, CodebaseContext context) {
if (expr instanceof SimpleName sn) {
String name = sn.getIdentifier();
if (paramValues.containsKey(name)) return paramValues.get(name);
@@ -515,7 +551,65 @@ public class ConstantResolver {
return null;
} else if (expr instanceof org.eclipse.jdt.core.dom.StringLiteral sl) {
return sl.getLiteralValue();
}
} else if (expr instanceof MethodInvocation mi) {
if ("valueOf".equals(mi.getName().getIdentifier())) {
Expression arg = null;
if (mi.arguments().size() == 1) {
arg = (Expression) mi.arguments().get(0);
} else if (mi.arguments().size() == 2) {
arg = (Expression) mi.arguments().get(1);
}
if (arg != null) {
String resolvedArg = resolveExpressionWithParams(arg, paramValues, context);
if (resolvedArg != null && resolvedArg.matches("^[a-zA-Z_][a-zA-Z0-9_]*$")) {
String enumFqn = null;
if (mi.arguments().size() == 2) {
enumFqn = resolveEnumFqn((Expression) mi.arguments().get(0), context);
} else if (mi.arguments().size() == 1 && mi.getExpression() != null) {
enumFqn = resolveEnumFqn(mi.getExpression(), context);
}
if (enumFqn != null) {
return enumFqn + "." + resolvedArg;
} else {
// If we can't resolve the exact enum type here, we can just return the bare constant
return resolvedArg;
}
}
}
} else {
MethodDeclaration sideEffectMd = findInvokedMethod(mi, context);
if (sideEffectMd != null && sideEffectMd.getBody() != null) {
TypeDeclaration currentTd = findEnclosingType(sideEffectMd);
java.util.Map<String, String> inlineLocals = new java.util.HashMap<>();
for (java.util.Map.Entry<String, String> entry : paramValues.entrySet()) {
if (entry.getKey().startsWith("this.")) {
inlineLocals.put(entry.getKey(), entry.getValue());
} else if (context.hasField(currentTd, entry.getKey())) {
inlineLocals.put(entry.getKey(), entry.getValue());
inlineLocals.put("this." + entry.getKey(), entry.getValue());
}
}
for (int i = 0; i < mi.arguments().size() && i < sideEffectMd.parameters().size(); i++) {
Expression arg = (Expression) mi.arguments().get(i);
String val = resolveExpressionWithParams(arg, paramValues, context);
if (val == null) val = resolveInternal(arg, context, new java.util.HashSet<>());
if (val != null) {
org.eclipse.jdt.core.dom.SingleVariableDeclaration param = (org.eclipse.jdt.core.dom.SingleVariableDeclaration) sideEffectMd.parameters().get(i);
inlineLocals.put(param.getName().getIdentifier(), val);
}
}
String ret = evaluateMethodBodyWithLocals(sideEffectMd, inlineLocals, context, new java.util.HashSet<>());
for (java.util.Map.Entry<String, String> entry : inlineLocals.entrySet()) {
if (entry.getKey().startsWith("this.")) {
paramValues.put(entry.getKey(), entry.getValue());
String bareName = entry.getKey().substring(5);
paramValues.put(bareName, entry.getValue());
}
}
return ret;
}
}
}
return null;
}
@@ -685,11 +779,29 @@ public class ConstantResolver {
}
private TypeDeclaration findEnclosingType(ASTNode node) {
ASTNode parent = node.getParent();
while (parent != null && !(parent instanceof TypeDeclaration)) {
parent = parent.getParent();
ASTNode current = node;
while (current != null && !(current instanceof TypeDeclaration)) {
current = current.getParent();
}
return (TypeDeclaration) parent;
return (TypeDeclaration) current;
}
private MethodDeclaration findInvokedMethod(org.eclipse.jdt.core.dom.MethodInvocation mi, CodebaseContext context) {
org.eclipse.jdt.core.dom.IMethodBinding methodBinding = mi.resolveMethodBinding();
if (methodBinding != null) {
org.eclipse.jdt.core.dom.ITypeBinding declaringClass = methodBinding.getDeclaringClass();
if (declaringClass != null) {
TypeDeclaration targetTd = context.getTypeDeclaration(declaringClass.getErasure().getQualifiedName());
if (targetTd != null) {
return context.findMethodDeclaration(targetTd, mi.getName().getIdentifier(), false);
}
}
}
TypeDeclaration currentTd = findEnclosingType(mi);
if (currentTd != null && (mi.getExpression() == null || mi.getExpression() instanceof org.eclipse.jdt.core.dom.ThisExpression)) {
return context.findMethodDeclaration(currentTd, mi.getName().getIdentifier(), true);
}
return null;
}
private MethodDeclaration findEnclosingMethod(ASTNode node) {

View File

@@ -137,11 +137,11 @@ public abstract class AbstractCallGraphEngine implements CallGraphEngine {
String currentParamName = event;
String resolvedValue = event;
String methodSuffix = "";
String[] extractedEntry = extractMethodSuffix(currentParamName, methodSuffix);
currentParamName = extractedEntry[0];
methodSuffix = extractedEntry[1];
if (finalParamNameRef != null) finalParamNameRef[0] = currentParamName;
String[] extractedEntry = extractMethodSuffix(currentParamName, methodSuffix);
currentParamName = extractedEntry[0];
methodSuffix = extractedEntry[1];
boolean isAmbiguous = false;
if (finalParamNameRef != null) finalParamNameRef[0] = currentParamName;
for (int i = path.size() - 1; i > 0; i--) {
String target = path.get(i);
@@ -410,6 +410,7 @@ public abstract class AbstractCallGraphEngine implements CallGraphEngine {
.stateTypeFqn(tp.getStateTypeFqn())
.eventTypeFqn(tp.getEventTypeFqn())
.external(tp.isExternal())
.ambiguous(isAmbiguous)
.build();
}
@@ -515,6 +516,7 @@ public abstract class AbstractCallGraphEngine implements CallGraphEngine {
.stateTypeFqn(tp.getStateTypeFqn())
.eventTypeFqn(tp.getEventTypeFqn())
.external(tp.isExternal())
.ambiguous(isAmbiguous)
.build();
}
}
@@ -638,6 +640,7 @@ public abstract class AbstractCallGraphEngine implements CallGraphEngine {
for (String ev : enumValues) {
polymorphicEvents.add(constantExtractor.parseEnumSetElement(ev));
}
isAmbiguous = true;
} else {
List<String> typesToInspect = new ArrayList<>();
if ("inline-instantiation".equals(sourceMethod)) {

View File

@@ -277,37 +277,17 @@ public class ConstructorAnalyzer {
}
// Evaluate constructor body regardless of whether parameters could be resolved as constants
ctor.getBody().accept(new ASTVisitor() {
@Override
public boolean visit(Assignment node) {
Expression lhs = node.getLeftHandSide();
Expression rhs = node.getRightHandSide();
String fieldName = null;
if (lhs instanceof FieldAccess fa
&& fa.getExpression() instanceof ThisExpression) {
fieldName = fa.getName().getIdentifier();
} else if (lhs instanceof SimpleName sn
&& !paramValues.containsKey(sn.getIdentifier())) {
fieldName = sn.getIdentifier();
}
if (fieldName != null) {
String paramVal = null;
if (rhs instanceof SimpleName snRhs) {
paramVal = paramValues.get(snRhs.getIdentifier());
} else if (rhsResolver != null) {
paramVal = rhsResolver.resolve(rhs, paramValues, td);
}
if (paramVal != null) {
fieldValues.put(fieldName, paramVal);
fieldValues.put("this." + fieldName, paramVal);
}
}
return super.visit(node);
java.util.Map<String, String> localVars = new java.util.HashMap<>(paramValues);
constantResolver.evaluateMethodBodyWithLocals(ctor, localVars, context, new java.util.HashSet<>());
for (java.util.Map.Entry<String, String> entry : localVars.entrySet()) {
if (entry.getKey().startsWith("this.")) {
fieldValues.put(entry.getKey(), entry.getValue());
fieldValues.put(entry.getKey().substring(5), entry.getValue());
} else if (context.hasField(td, entry.getKey())) {
fieldValues.put(entry.getKey(), entry.getValue());
fieldValues.put("this." + entry.getKey(), entry.getValue());
}
});
}
ctor.getBody().accept(new ASTVisitor() {
@Override
@@ -399,37 +379,17 @@ public class ConstructorAnalyzer {
}
if (superParamValues.isEmpty()) continue;
superCtor.getBody().accept(new ASTVisitor() {
@Override
public boolean visit(Assignment node) {
Expression lhs = node.getLeftHandSide();
Expression rhs = node.getRightHandSide();
String fieldName = null;
if (lhs instanceof FieldAccess fa
&& fa.getExpression() instanceof ThisExpression) {
fieldName = fa.getName().getIdentifier();
} else if (lhs instanceof SimpleName sn
&& !superParamValues.containsKey(sn.getIdentifier())) {
fieldName = sn.getIdentifier();
}
if (fieldName != null) {
String paramVal = null;
if (rhs instanceof SimpleName snRhs) {
paramVal = superParamValues.get(snRhs.getIdentifier());
} else if (rhsResolver != null) {
paramVal = rhsResolver.resolve(rhs, superParamValues, superTd);
}
if (paramVal != null) {
fieldValues.put(fieldName, paramVal);
fieldValues.put("this." + fieldName, paramVal);
}
}
return super.visit(node);
java.util.Map<String, String> localVars = new java.util.HashMap<>(superParamValues);
constantResolver.evaluateMethodBodyWithLocals(superCtor, localVars, context, new java.util.HashSet<>());
for (java.util.Map.Entry<String, String> entry : localVars.entrySet()) {
if (entry.getKey().startsWith("this.")) {
fieldValues.put(entry.getKey(), entry.getValue());
fieldValues.put(entry.getKey().substring(5), entry.getValue());
} else if (context.hasField(superTd, entry.getKey())) {
fieldValues.put(entry.getKey(), entry.getValue());
fieldValues.put("this." + entry.getKey(), entry.getValue());
}
});
}
superCtor.getBody().accept(new ASTVisitor() {
@Override

View File

@@ -60,6 +60,7 @@ class EnterpriseBugsTest {
Files.writeString(tempDir.resolve("OrderConfig.java"), source);
CodebaseContext context = new CodebaseContext();
context.setResolveBindings(true);
context.scan(tempDir);
HeuristicCallGraphEngine engine = new HeuristicCallGraphEngine(context);

View File

@@ -1,7 +1,7 @@
{
"metadata" : {
"triggers" : [ {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -11,9 +11,10 @@
"lineNumber" : 30,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -23,9 +24,10 @@
"lineNumber" : 37,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -35,9 +37,10 @@
"lineNumber" : 44,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -47,9 +50,10 @@
"lineNumber" : 51,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -59,9 +63,10 @@
"lineNumber" : 58,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -71,9 +76,10 @@
"lineNumber" : 65,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -83,7 +89,8 @@
"lineNumber" : 72,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -95,7 +102,8 @@
"lineNumber" : 81,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -107,7 +115,8 @@
"lineNumber" : 87,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -119,7 +128,8 @@
"lineNumber" : 93,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -269,7 +279,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -279,7 +289,8 @@
"lineNumber" : 30,
"polymorphicEvents" : [ "OrderEvent.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -302,7 +313,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -312,7 +323,8 @@
"lineNumber" : 37,
"polymorphicEvents" : [ "OrderEvent.SHIP" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -335,7 +347,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.submitDocument", "click.kamil.enterprise.web.StateMachineDispatcher.submitDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -345,7 +357,8 @@
"lineNumber" : 44,
"polymorphicEvents" : [ "DocumentEvent.SUBMIT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -372,7 +385,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.approveDocument", "click.kamil.enterprise.web.StateMachineDispatcher.approveDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -382,7 +395,8 @@
"lineNumber" : 51,
"polymorphicEvents" : [ "DocumentEvent.APPROVE" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -409,7 +423,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.rejectDocument", "click.kamil.enterprise.web.StateMachineDispatcher.rejectDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -419,7 +433,8 @@
"lineNumber" : 58,
"polymorphicEvents" : [ "DocumentEvent.REJECT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -446,7 +461,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.verifyUser", "click.kamil.enterprise.web.StateMachineDispatcher.verifyUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -456,7 +471,8 @@
"lineNumber" : 65,
"polymorphicEvents" : [ "UserEvent.VERIFY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -479,7 +495,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.suspendUser", "click.kamil.enterprise.web.StateMachineDispatcher.suspendUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -489,7 +505,8 @@
"lineNumber" : 72,
"polymorphicEvents" : [ "UserEvent.SUSPEND" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -526,11 +543,12 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "ORDER",
"lineNumber" : 81,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -567,26 +585,15 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "DOCUMENT",
"lineNumber" : 87,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
"sourceState" : "DocumentState.DRAFT",
"targetState" : "DocumentState.IN_REVIEW",
"event" : "DocumentEvent.SUBMIT"
}, {
"sourceState" : "DocumentState.IN_REVIEW",
"targetState" : "DocumentState.APPROVED",
"event" : "DocumentEvent.APPROVE"
}, {
"sourceState" : "DocumentState.IN_REVIEW",
"targetState" : "DocumentState.DRAFT",
"event" : "DocumentEvent.REJECT"
} ]
"matchedTransitions" : null
}, {
"entryPoint" : {
"type" : "REST",
@@ -620,11 +627,12 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "USER",
"lineNumber" : 93,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -650,7 +658,7 @@
"rawName" : "DocumentEvent.SUBMIT",
"fullIdentifier" : "DocumentEvent.SUBMIT"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
}, {
@@ -667,7 +675,7 @@
"rawName" : "DocumentEvent.APPROVE",
"fullIdentifier" : "DocumentEvent.APPROVE"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
}, {
@@ -684,7 +692,7 @@
"rawName" : "DocumentEvent.REJECT",
"fullIdentifier" : "DocumentEvent.REJECT"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
} ],

View File

@@ -11,7 +11,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PLACE_ORDER",
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
@@ -23,7 +24,8 @@
"lineNumber" : 16,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "CANCEL_ORDER",
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
@@ -35,7 +37,8 @@
"lineNumber" : 21,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PAY_ORDER",
"className" : "click.kamil.examples.enterprise.service.ReactivePaymentService",
@@ -47,7 +50,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "SHIP_ORDER",
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
@@ -59,7 +63,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "RETURN_ORDER",
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
@@ -71,7 +76,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -206,7 +212,8 @@
"lineNumber" : 16,
"polymorphicEvents" : [ "PLACE_ORDER" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -243,7 +250,8 @@
"lineNumber" : 21,
"polymorphicEvents" : [ "CANCEL_ORDER" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -276,7 +284,8 @@
"lineNumber" : 16,
"polymorphicEvents" : [ "PLACE_ORDER" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -313,7 +322,8 @@
"lineNumber" : 21,
"polymorphicEvents" : [ "CANCEL_ORDER" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -345,7 +355,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -378,7 +389,8 @@
"lineNumber" : 18,
"polymorphicEvents" : [ "PAY_ORDER" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -415,7 +427,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -452,7 +465,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -11,7 +11,8 @@
"lineNumber" : 34,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "AUDIT_EVENT",
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
@@ -23,7 +24,8 @@
"lineNumber" : 16,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "FALLBACK_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.FallbackQuirkService",
@@ -35,7 +37,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PROFILED_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.ProfiledQuirkService",
@@ -47,7 +50,8 @@
"lineNumber" : 19,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PRIMARY_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.PrimaryQuirkService",
@@ -59,7 +63,8 @@
"lineNumber" : 19,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "SUBMIT_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -71,7 +76,8 @@
"lineNumber" : 20,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "CANCEL_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -83,7 +89,8 @@
"lineNumber" : 25,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "[LIFECYCLE:RESTORE]",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -95,7 +102,8 @@
"lineNumber" : 29,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "QUALIFIER_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.QualifierQuirkService",
@@ -107,7 +115,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "NAMED_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.NamedQuirkService",
@@ -119,7 +128,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "AUTHORIZE",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -131,7 +141,8 @@
"lineNumber" : 22,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "CAPTURE",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -143,7 +154,8 @@
"lineNumber" : 35,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "[LIFECYCLE:RESTORE]",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -155,7 +167,8 @@
"lineNumber" : 28,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "REACTIVE_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
@@ -167,7 +180,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -397,7 +411,8 @@
"lineNumber" : 20,
"polymorphicEvents" : [ "SUBMIT_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -430,7 +445,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "CANCEL_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -463,7 +479,8 @@
"lineNumber" : 34,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -500,7 +517,8 @@
"lineNumber" : 29,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "orderId",
"matchedTransitions" : null
@@ -533,7 +551,8 @@
"lineNumber" : 18,
"polymorphicEvents" : [ "REACTIVE_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -565,7 +584,8 @@
"lineNumber" : 16,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -598,7 +618,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -627,7 +648,8 @@
"lineNumber" : 19,
"polymorphicEvents" : [ "PRIMARY_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -656,7 +678,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -685,7 +708,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "QUALIFIER_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -714,7 +738,8 @@
"lineNumber" : 19,
"polymorphicEvents" : [ "PRIMARY_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -743,7 +768,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "QUALIFIER_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -772,7 +798,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -805,7 +832,8 @@
"lineNumber" : 22,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -838,7 +866,8 @@
"lineNumber" : 35,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "paymentId",
"matchedTransitions" : null
@@ -871,7 +900,8 @@
"lineNumber" : 28,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "paymentId",
"matchedTransitions" : null

View File

@@ -11,7 +11,8 @@
"lineNumber" : 34,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "AUDIT_EVENT",
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
@@ -23,7 +24,8 @@
"lineNumber" : 16,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "FALLBACK_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.FallbackQuirkService",
@@ -35,7 +37,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PROFILED_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.ProfiledQuirkService",
@@ -47,7 +50,8 @@
"lineNumber" : 19,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "PRIMARY_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.PrimaryQuirkService",
@@ -59,7 +63,8 @@
"lineNumber" : 19,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "SUBMIT_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -71,7 +76,8 @@
"lineNumber" : 20,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "CANCEL_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -83,7 +89,8 @@
"lineNumber" : 25,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "[LIFECYCLE:RESTORE]",
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
@@ -95,7 +102,8 @@
"lineNumber" : 29,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "QUALIFIER_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.QualifierQuirkService",
@@ -107,7 +115,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "NAMED_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.NamedQuirkService",
@@ -119,7 +128,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "AUTHORIZE",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -131,7 +141,8 @@
"lineNumber" : 22,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "CAPTURE",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -143,7 +154,8 @@
"lineNumber" : 35,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "[LIFECYCLE:RESTORE]",
"className" : "click.kamil.examples.statemachine.extended.service.PaymentServiceImpl",
@@ -155,7 +167,8 @@
"lineNumber" : 28,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "REACTIVE_EVENT",
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
@@ -167,7 +180,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -397,7 +411,8 @@
"lineNumber" : 20,
"polymorphicEvents" : [ "SUBMIT_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -430,7 +445,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "CANCEL_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -463,7 +479,8 @@
"lineNumber" : 34,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -500,7 +517,8 @@
"lineNumber" : 29,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "orderId",
"matchedTransitions" : null
@@ -533,7 +551,8 @@
"lineNumber" : 18,
"polymorphicEvents" : [ "REACTIVE_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -565,7 +584,8 @@
"lineNumber" : 16,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -598,7 +618,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -627,7 +648,8 @@
"lineNumber" : 19,
"polymorphicEvents" : [ "PRIMARY_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -656,7 +678,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -685,7 +708,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "QUALIFIER_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -714,7 +738,8 @@
"lineNumber" : 19,
"polymorphicEvents" : [ "PRIMARY_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -743,7 +768,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "QUALIFIER_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -772,7 +798,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "NAMED_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -805,7 +832,8 @@
"lineNumber" : 22,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -838,7 +866,8 @@
"lineNumber" : 35,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "paymentId",
"matchedTransitions" : null
@@ -871,7 +900,8 @@
"lineNumber" : 28,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : "paymentId",
"matchedTransitions" : null

View File

@@ -11,7 +11,8 @@
"lineNumber" : 15,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -61,7 +62,8 @@
"lineNumber" : 15,
"polymorphicEvents" : [ "INHERITED_SUBMIT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -94,7 +96,8 @@
"lineNumber" : 15,
"polymorphicEvents" : [ "INHERITED_SUBMIT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -11,7 +11,8 @@
"lineNumber" : 40,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "ORDER_EVENT",
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderService",
@@ -23,7 +24,8 @@
"lineNumber" : 52,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -112,7 +114,8 @@
"lineNumber" : 40,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -149,7 +152,8 @@
"lineNumber" : 40,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -186,7 +190,8 @@
"lineNumber" : 52,
"polymorphicEvents" : [ "ORDER_EVENT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -11,7 +11,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -73,7 +74,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -110,7 +112,8 @@
"lineNumber" : 18,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -1,7 +1,7 @@
{
"metadata" : {
"triggers" : [ {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -11,9 +11,10 @@
"lineNumber" : 30,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -23,9 +24,10 @@
"lineNumber" : 37,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -35,9 +37,10 @@
"lineNumber" : 44,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -47,9 +50,10 @@
"lineNumber" : 51,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -59,9 +63,10 @@
"lineNumber" : 58,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -71,9 +76,10 @@
"lineNumber" : 65,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -83,7 +89,8 @@
"lineNumber" : 72,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -95,7 +102,8 @@
"lineNumber" : 81,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -107,7 +115,8 @@
"lineNumber" : 87,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -119,7 +128,8 @@
"lineNumber" : 93,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -269,7 +279,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -279,7 +289,8 @@
"lineNumber" : 30,
"polymorphicEvents" : [ "OrderEvent.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -306,7 +317,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -316,7 +327,8 @@
"lineNumber" : 37,
"polymorphicEvents" : [ "OrderEvent.SHIP" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -343,7 +355,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.submitDocument", "click.kamil.enterprise.web.StateMachineDispatcher.submitDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -353,7 +365,8 @@
"lineNumber" : 44,
"polymorphicEvents" : [ "DocumentEvent.SUBMIT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -376,7 +389,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.approveDocument", "click.kamil.enterprise.web.StateMachineDispatcher.approveDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -386,7 +399,8 @@
"lineNumber" : 51,
"polymorphicEvents" : [ "DocumentEvent.APPROVE" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -409,7 +423,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.rejectDocument", "click.kamil.enterprise.web.StateMachineDispatcher.rejectDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -419,7 +433,8 @@
"lineNumber" : 58,
"polymorphicEvents" : [ "DocumentEvent.REJECT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -442,7 +457,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.verifyUser", "click.kamil.enterprise.web.StateMachineDispatcher.verifyUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -452,7 +467,8 @@
"lineNumber" : 65,
"polymorphicEvents" : [ "UserEvent.VERIFY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -475,7 +491,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.suspendUser", "click.kamil.enterprise.web.StateMachineDispatcher.suspendUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -485,7 +501,8 @@
"lineNumber" : 72,
"polymorphicEvents" : [ "UserEvent.SUSPEND" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -522,60 +539,12 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "ORDER",
"lineNumber" : 81,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
},
"contextMachineId" : null,
"matchedTransitions" : [ {
"sourceState" : "OrderState.NEW",
"targetState" : "OrderState.PENDING",
"event" : "OrderEvent.PAY"
}, {
"sourceState" : "OrderState.PENDING",
"targetState" : "OrderState.SHIPPED",
"event" : "OrderEvent.SHIP"
} ]
}, {
"entryPoint" : {
"type" : "REST",
"name" : "POST /api/machine/{machineType}/transition/{event}",
"className" : "click.kamil.enterprise.web.StateMachineController",
"methodName" : "transition",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java",
"metadata" : {
"path" : "/api/machine/{machineType}/transition/{event}",
"verb" : "POST"
},
"parameters" : [ {
"name" : "machineType",
"type" : "String",
"annotations" : [ "PathVariable" ]
}, {
"name" : "event",
"type" : "String",
"annotations" : [ "PathVariable" ]
}, {
"name" : "userId",
"type" : "String",
"annotations" : [ "RequestParam" ]
} ]
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.transition", "click.kamil.enterprise.web.StateMachineDispatcher.dispatch" ],
"triggerPoint" : {
"event" : "true ? OrderEvent.valueOf(eventString.toUpperCase()) : true ? DocumentEvent.valueOf(eventString.toUpperCase()) : UserEvent.valueOf(eventString.toUpperCase())",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "dispatch",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"lineNumber" : 87,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -612,11 +581,54 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "DOCUMENT",
"lineNumber" : 87,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
}, {
"entryPoint" : {
"type" : "REST",
"name" : "POST /api/machine/{machineType}/transition/{event}",
"className" : "click.kamil.enterprise.web.StateMachineController",
"methodName" : "transition",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineController.java",
"metadata" : {
"path" : "/api/machine/{machineType}/transition/{event}",
"verb" : "POST"
},
"parameters" : [ {
"name" : "machineType",
"type" : "String",
"annotations" : [ "PathVariable" ]
}, {
"name" : "event",
"type" : "String",
"annotations" : [ "PathVariable" ]
}, {
"name" : "userId",
"type" : "String",
"annotations" : [ "RequestParam" ]
} ]
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.transition", "click.kamil.enterprise.web.StateMachineDispatcher.dispatch" ],
"triggerPoint" : {
"event" : "true ? OrderEvent.valueOf(eventString.toUpperCase()) : true ? DocumentEvent.valueOf(eventString.toUpperCase()) : UserEvent.valueOf(eventString.toUpperCase())",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "dispatch",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : "USER",
"lineNumber" : 93,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -642,7 +654,7 @@
"rawName" : "OrderEvent.PAY",
"fullIdentifier" : "OrderEvent.PAY"
},
"guard" : null,
"guards" : [ ],
"actions" : [ {
"expression" : "context -> System.out.println(\"Payment processed.\")",
"isLambda" : true,
@@ -666,7 +678,7 @@
"rawName" : "OrderEvent.SHIP",
"fullIdentifier" : "OrderEvent.SHIP"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
} ],

View File

@@ -11,7 +11,8 @@
"lineNumber" : 13,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "payload",
"className" : "click.kamil.examples.statemachine.polymorphic.OrderService",
@@ -23,7 +24,8 @@
"lineNumber" : 17,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.examples.statemachine.polymorphic.OrderService",
@@ -35,7 +37,8 @@
"lineNumber" : 21,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -199,7 +202,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -232,7 +236,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.FULFILL" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -265,7 +270,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.CANCEL" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -298,7 +304,8 @@
"lineNumber" : 17,
"polymorphicEvents" : [ "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -331,7 +338,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -364,7 +372,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -401,7 +410,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY", "OrderEvents.CANCEL" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -438,7 +448,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -471,7 +482,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.FULFILL" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -504,7 +516,8 @@
"lineNumber" : 13,
"polymorphicEvents" : [ "OrderEvents.CANCEL" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -537,7 +550,8 @@
"lineNumber" : 21,
"polymorphicEvents" : [ "OrderEvents.ABCD" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -570,7 +584,8 @@
"lineNumber" : 21,
"polymorphicEvents" : [ "OrderEvents.ABCD", "OrderEvents.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -11,7 +11,8 @@
"lineNumber" : 25,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
}, {
"event" : "eventProvider",
"className" : "click.kamil.service.StateMachineServiceImpl",
@@ -23,7 +24,8 @@
"lineNumber" : 50,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "event != null"
"constraint" : "event != null",
"ambiguous" : false
}, {
"event" : "customMessage",
"className" : "click.kamil.service.StateMachineServiceImpl",
@@ -35,7 +37,8 @@
"lineNumber" : 78,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -152,7 +155,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "OrderEvent.PROCESS" ],
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -185,7 +189,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "OrderEvent.COMPLETE" ],
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -218,7 +223,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "OrderEvent.CANCEL" ],
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -255,7 +261,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "OrderEvent.COMPLETE" ],
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -292,7 +299,8 @@
"lineNumber" : 78,
"polymorphicEvents" : [ ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -325,7 +333,8 @@
"lineNumber" : 25,
"polymorphicEvents" : [ "OrderEvent.PROCESS" ],
"external" : false,
"constraint" : "event instanceof OrderEvent"
"constraint" : "event instanceof OrderEvent",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -362,7 +371,8 @@
"lineNumber" : 50,
"polymorphicEvents" : [ "OrderEvent.CANCEL" ],
"external" : false,
"constraint" : "event != null"
"constraint" : "event != null",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {

View File

@@ -1,7 +1,7 @@
{
"metadata" : {
"triggers" : [ {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -11,9 +11,10 @@
"lineNumber" : 30,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -23,9 +24,10 @@
"lineNumber" : 37,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -35,9 +37,10 @@
"lineNumber" : 44,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -47,9 +50,10 @@
"lineNumber" : 51,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -59,9 +63,10 @@
"lineNumber" : 58,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -71,9 +76,10 @@
"lineNumber" : 65,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -83,7 +89,8 @@
"lineNumber" : 72,
"polymorphicEvents" : null,
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -95,7 +102,8 @@
"lineNumber" : 81,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -107,7 +115,8 @@
"lineNumber" : 87,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
}, {
"event" : "event",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
@@ -119,7 +128,8 @@
"lineNumber" : 93,
"polymorphicEvents" : null,
"external" : false,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
} ],
"entryPoints" : [ {
"type" : "REST",
@@ -269,7 +279,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.payOrder", "click.kamil.enterprise.web.StateMachineDispatcher.payOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.PAY",
"event" : "OrderEvent.PAY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "payOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -279,7 +289,8 @@
"lineNumber" : 30,
"polymorphicEvents" : [ "OrderEvent.PAY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -302,7 +313,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.shipOrder", "click.kamil.enterprise.web.StateMachineDispatcher.shipOrder" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.order.OrderEvent.SHIP",
"event" : "OrderEvent.SHIP",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "shipOrder",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -312,7 +323,8 @@
"lineNumber" : 37,
"polymorphicEvents" : [ "OrderEvent.SHIP" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -335,7 +347,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.submitDocument", "click.kamil.enterprise.web.StateMachineDispatcher.submitDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.SUBMIT",
"event" : "DocumentEvent.SUBMIT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "submitDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -345,7 +357,8 @@
"lineNumber" : 44,
"polymorphicEvents" : [ "DocumentEvent.SUBMIT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -368,7 +381,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.approveDocument", "click.kamil.enterprise.web.StateMachineDispatcher.approveDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.APPROVE",
"event" : "DocumentEvent.APPROVE",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "approveDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -378,7 +391,8 @@
"lineNumber" : 51,
"polymorphicEvents" : [ "DocumentEvent.APPROVE" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -401,7 +415,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.rejectDocument", "click.kamil.enterprise.web.StateMachineDispatcher.rejectDocument" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.document.DocumentEvent.REJECT",
"event" : "DocumentEvent.REJECT",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "rejectDocument",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -411,7 +425,8 @@
"lineNumber" : 58,
"polymorphicEvents" : [ "DocumentEvent.REJECT" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -434,7 +449,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.verifyUser", "click.kamil.enterprise.web.StateMachineDispatcher.verifyUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.VERIFY",
"event" : "UserEvent.VERIFY",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "verifyUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -444,7 +459,8 @@
"lineNumber" : 65,
"polymorphicEvents" : [ "UserEvent.VERIFY" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
@@ -471,7 +487,7 @@
},
"methodChain" : [ "click.kamil.enterprise.web.StateMachineController.suspendUser", "click.kamil.enterprise.web.StateMachineDispatcher.suspendUser" ],
"triggerPoint" : {
"event" : "click.kamil.enterprise.machines.user.UserEvent.SUSPEND",
"event" : "UserEvent.SUSPEND",
"className" : "click.kamil.enterprise.web.StateMachineDispatcher",
"methodName" : "suspendUser",
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
@@ -481,7 +497,8 @@
"lineNumber" : 72,
"polymorphicEvents" : [ "UserEvent.SUSPEND" ],
"external" : false,
"constraint" : null
"constraint" : null,
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -518,11 +535,12 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "ORDER",
"lineNumber" : 81,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)"
"constraint" : "\"ORDER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -559,11 +577,12 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "DOCUMENT",
"lineNumber" : 87,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && \"DOCUMENT\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : null
@@ -600,22 +619,15 @@
"sourceFile" : "src/main/java/click/kamil/enterprise/web/StateMachineDispatcher.java",
"sourceModule" : null,
"stateMachineId" : null,
"sourceState" : null,
"sourceState" : "USER",
"lineNumber" : 93,
"polymorphicEvents" : [ "<SYMBOLIC: OrderEvent.*>", "<SYMBOLIC: DocumentEvent.*>", "<SYMBOLIC: UserEvent.*>" ],
"external" : true,
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)"
"constraint" : "!(\"ORDER\".equalsIgnoreCase(machineType)) && !(\"DOCUMENT\".equalsIgnoreCase(machineType)) && \"USER\".equalsIgnoreCase(machineType)",
"ambiguous" : false
},
"contextMachineId" : null,
"matchedTransitions" : [ {
"sourceState" : "UserState.GUEST",
"targetState" : "UserState.REGISTERED",
"event" : "UserEvent.REGISTER"
}, {
"sourceState" : "UserState.REGISTERED",
"targetState" : "UserState.VERIFIED",
"event" : "UserEvent.VERIFY"
} ]
"matchedTransitions" : null
} ],
"properties" : {
"default" : { }
@@ -638,7 +650,7 @@
"rawName" : "UserEvent.REGISTER",
"fullIdentifier" : "UserEvent.REGISTER"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
}, {
@@ -655,7 +667,7 @@
"rawName" : "UserEvent.VERIFY",
"fullIdentifier" : "UserEvent.VERIFY"
},
"guard" : null,
"guards" : [ ],
"actions" : [ ],
"order" : null
} ],