Fix join dosen't enter when fork a substate
#337
@jvalkeal
Add this code at org.springframework.statemachine.config.AbstractStateMachineFactory to fix the problem
} else if (ss1 instanceof StateMachineState) {
Collection<State<S, E>> subStates = ((StateMachineState) ss1).getSubmachine().getStates();
for (State<S, E> subState : subStates) {
if (subState.getPseudoState() != null && subState.getPseudoState().getKind() == PseudoStateKind.END) {
joins.add(subState);
}
}
}
Run gradle build and have a error:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/travis/build/spring-projects/spring-statemachine/build.gradle' line: 437
* What went wrong:
A problem occurred evaluating root project 'spring-statemachine'.
> Failed to apply plugin [id 'org.springframework.boot']
> Could not create task of type 'BootJar'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.067 secs
Failed to apply plugin [id 'org.springframework.boot']
is caused by older boot version where plugin name used to be spring-boot. Master is on boot 2.x snapshots and branch 1.2.x is on boot 1.4 using older plugin.
I'd recommend to work with 1.2.x branch as that's the stable version. 2.x anyway will wait boot 2.x which will not come out until end of this year.
hmm, actually there seem to be something wrong in boot snapshots.
Fixed a master build per #342
new master build error:
:spring-statemachine-samples-common:spring-statemachine-samples-monitoring:test
demo.monitoring.MonitoringTests > testTrace FAILED
java.lang.AssertionError at MonitoringTests.java:93
Caused by: java.lang.IllegalArgumentException at MonitoringTests.java:93
demo.monitoring.MonitoringTests > testMetrics FAILED
java.lang.AssertionError at MonitoringTests.java:83
Caused by: java.lang.IllegalArgumentException at MonitoringTests.java:83
> Building 82% > :spring-statemachine-samples-common:spring-statemachine-samples-monitoring:test > 4 tests completed, 2 failed
5 tests completed, 2 failed
:spring-statemachine-samples-common:spring-statemachine-samples-monitoring:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-statemachine-samples-common:spring-statemachine-samples-monitoring:test'.
> There were failing tests. See the report at: file:///D:/statemachine/spring-statemachine/spring-statemachine-samples/monitoring/build/reports/tests/test/index.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12 mins 54.707 secs
Yes, those were caused by boot, fixed in #350