spring-statemachine icon indicating copy to clipboard operation
spring-statemachine copied to clipboard

Fix join dosen't enter when fork a substate

Open 924060929 opened this issue 8 years ago • 6 comments

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

924060929 avatar Apr 05 '17 03:04 924060929

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

924060929 avatar Apr 05 '17 03:04 924060929

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.

jvalkeal avatar Apr 05 '17 08:04 jvalkeal

hmm, actually there seem to be something wrong in boot snapshots.

jvalkeal avatar Apr 06 '17 12:04 jvalkeal

Fixed a master build per #342

jvalkeal avatar Apr 06 '17 12:04 jvalkeal

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

924060929 avatar Apr 16 '17 12:04 924060929

Yes, those were caused by boot, fixed in #350

jvalkeal avatar Apr 19 '17 18:04 jvalkeal