Add new tests for Choice exit

- New test for choice exit scenario which
  I thought was broken.
- Add new spring-statemachine-build-tests project to
  ease testing so that we can mix everything. This
  project is a topdog which can depend on all other
  modules.
- Relates to #203
This commit is contained in:
Janne Valkealahti
2016-04-19 19:20:06 +01:00
parent 510a796288
commit 50d32c2c26
7 changed files with 458 additions and 1 deletions

View File

@@ -249,6 +249,19 @@ project('spring-statemachine-uml') {
}
}
project('spring-statemachine-build-tests') {
description = "Spring State Machine Build Tests"
dependencies {
testCompile project(":spring-statemachine-uml")
testCompile project(":spring-statemachine-test")
testCompile "org.springframework:spring-test:$springVersion"
testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile "junit:junit:$junitVersion"
}
}
configure(recipeProjects()) {
dependencies {
compile project(":spring-statemachine-recipes-common")

View File

@@ -7,7 +7,7 @@ include 'spring-statemachine-zookeeper'
include 'spring-statemachine-redis'
include 'spring-statemachine-cluster'
include 'spring-statemachine-uml'
include 'spring-statemachine-build-tests'
include 'spring-statemachine-recipes'
include 'spring-statemachine-samples'

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.statemachine.buildtests;
import org.junit.After;
import org.junit.Before;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public abstract class AbstractBuildTests {
protected AnnotationConfigApplicationContext context;
@Before
public void setup() {
context = buildContext();
}
@After
public void clean() {
if (context != null) {
context.close();
}
context = null;
}
/**
* Builds the context.
*
* @return the annotation config application context
*/
protected AnnotationConfigApplicationContext buildContext() {
return null;
}
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.statemachine.buildtests;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.statemachine.StateMachine;
import org.springframework.statemachine.config.EnableStateMachine;
import org.springframework.statemachine.config.StateMachineConfigurerAdapter;
import org.springframework.statemachine.config.builders.StateMachineModelConfigurer;
import org.springframework.statemachine.config.model.StateMachineModelFactory;
import org.springframework.statemachine.guard.Guard;
import org.springframework.statemachine.test.StateMachineTestPlan;
import org.springframework.statemachine.test.StateMachineTestPlanBuilder;
import org.springframework.statemachine.uml.UmlStateMachineModelFactory;
public class ChoiceExitTests extends AbstractBuildTests {
@Test
@SuppressWarnings("unchecked")
public void testChoiceExitViaError() throws Exception {
context.register(Config1.class);
context.refresh();
StateMachine<String, String> stateMachine = context.getBean(StateMachine.class);
StateMachineTestPlan<String, String> plan =
StateMachineTestPlanBuilder.<String, String>builder()
.stateMachine(stateMachine)
.step().expectState("READY").and()
.step().sendEvent("E1").expectStateChanged(2).expectStates("DOSTUFF", "START").and()
.step().sendEvent("E2").expectStateChanged(2).expectState("READY").and()
.build();
plan.test();
}
@Test
@SuppressWarnings("unchecked")
public void testChoiceExitNotViaError() throws Exception {
context.register(Config2.class);
context.refresh();
StateMachine<String, String> stateMachine = context.getBean(StateMachine.class);
StateMachineTestPlan<String, String> plan =
StateMachineTestPlanBuilder.<String, String>builder()
.stateMachine(stateMachine)
.step().expectState("READY").and()
.step().sendEvent("E1").expectStateChanged(2).expectStates("DOSTUFF", "START").and()
.step().sendEvent("E2").expectStateChanged(1).expectState("READY").and()
.build();
plan.test();
}
@Configuration
@EnableStateMachine
public static class Config1 extends StateMachineConfigurerAdapter<String, String> {
@Override
public void configure(StateMachineModelConfigurer<String, String> model) throws Exception {
model
.withModel()
.factory(modelFactory());
}
@Bean
public StateMachineModelFactory<String, String> modelFactory() {
return new UmlStateMachineModelFactory("classpath:org/springframework/statemachine/buildtests/choice-exit.uml");
}
@Bean
public Guard<String, String> exitGuard() {
return (context) -> {
return true;
};
}
}
@Configuration
@EnableStateMachine
public static class Config2 extends StateMachineConfigurerAdapter<String, String> {
@Override
public void configure(StateMachineModelConfigurer<String, String> model) throws Exception {
model
.withModel()
.factory(modelFactory());
}
@Bean
public StateMachineModelFactory<String, String> modelFactory() {
return new UmlStateMachineModelFactory("classpath:org/springframework/statemachine/buildtests/choice-exit.uml");
}
@Bean
public Guard<String, String> exitGuard() {
return (context) -> {
return false;
};
}
}
@Override
protected AnnotationConfigApplicationContext buildContext() {
return new AnnotationConfigApplicationContext();
}
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>

View File

@@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AtQnYAZPEeayEI1yTJhWhg" type="PapyrusUMLStateMachineDiagram" name="StateMachine Diagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_AtQnYQZPEeayEI1yTJhWhg" type="2000">
<children xmi:type="notation:DecorationNode" xmi:id="_AtQnYgZPEeayEI1yTJhWhg" type="2001">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AtQnYwZPEeayEI1yTJhWhg" width="791" height="23"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_AtQnZAZPEeayEI1yTJhWhg" type="2002">
<children xmi:type="notation:Shape" xmi:id="_AtQnZQZPEeayEI1yTJhWhg" type="3000">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AtQnZgZPEeayEI1yTJhWhg" source="RegionAnnotationKey">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AtQnZwZPEeayEI1yTJhWhg" key="RegionZoneKey" value=""/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_AtQnaAZPEeayEI1yTJhWhg" type="3002">
<children xmi:type="notation:Shape" xmi:id="_Gn_gcAZPEeayEI1yTJhWhg" type="6000">
<children xmi:type="notation:DecorationNode" xmi:id="_Gn_gcgZPEeayEI1yTJhWhg" type="6001">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_gwqScAZPEeayEI1yTJhWhg" width="81"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_Gn_gcwZPEeayEI1yTJhWhg" type="19003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_GoAHgAZPEeayEI1yTJhWhg" x="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_GoAHgQZPEeayEI1yTJhWhg" type="6002">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_GoAHggZPEeayEI1yTJhWhg" y="-1" width="81"/>
</children>
<element xmi:type="uml:State" href="choice-exit.uml#_Gn8dIAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Gn_gcQZPEeayEI1yTJhWhg" x="110" y="87" width="81"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_JXLqkAZPEeayEI1yTJhWhg" type="6000">
<children xmi:type="notation:DecorationNode" xmi:id="_JXMRoAZPEeayEI1yTJhWhg" type="6001">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_gwprYAZPEeayEI1yTJhWhg" width="81"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_JXMRoQZPEeayEI1yTJhWhg" type="19003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_JXMRogZPEeayEI1yTJhWhg" x="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_JXMRowZPEeayEI1yTJhWhg" type="6002">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_JXMRpAZPEeayEI1yTJhWhg" y="-1" width="81"/>
</children>
<element xmi:type="uml:State" href="choice-exit.uml#_JXInQAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_JXLqkQZPEeayEI1yTJhWhg" x="110" y="187" width="81"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_Kqo2gAZPEeayEI1yTJhWhg" type="6000">
<children xmi:type="notation:DecorationNode" xmi:id="_KqpdkAZPEeayEI1yTJhWhg" type="6001">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_N1ELIAZPEeayEI1yTJhWhg" width="361" height="23"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_KqpdkQZPEeayEI1yTJhWhg" type="19003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_KqpdkgZPEeayEI1yTJhWhg" x="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_KqpdkwZPEeayEI1yTJhWhg" type="6002">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Qa3vwAZPEeayEI1yTJhWhg" source="PapyrusCSSForceValue">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Qa4W0AZPEeayEI1yTJhWhg" key="visible" value="true"/>
</eAnnotations>
<children xmi:type="notation:Shape" xmi:id="_Qa5k8AZPEeayEI1yTJhWhg" type="3000">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Qa6MAgZPEeayEI1yTJhWhg" source="RegionAnnotationKey">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Qa6MAwZPEeayEI1yTJhWhg" key="RegionZoneKey" value=""/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_Qa6MAAZPEeayEI1yTJhWhg" type="3002">
<children xmi:type="notation:Shape" xmi:id="_Qa6zEAZPEeayEI1yTJhWhg" type="6000">
<children xmi:type="notation:DecorationNode" xmi:id="_Qa6zEgZPEeayEI1yTJhWhg" type="6001">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_f310EAZPEeayEI1yTJhWhg" width="81"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_Qa6zEwZPEeayEI1yTJhWhg" type="19003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_Qa6zFAZPEeayEI1yTJhWhg" x="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_Qa6zFQZPEeayEI1yTJhWhg" type="6002">
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qa6zFgZPEeayEI1yTJhWhg" y="-1" width="81"/>
</children>
<element xmi:type="uml:State" href="choice-exit.uml#_Qa6MBAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qa6zEQZPEeayEI1yTJhWhg" x="120" y="17" width="81"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_Ydjz0AZPEeayEI1yTJhWhg" type="11000">
<children xmi:type="notation:DecorationNode" xmi:id="_Ydjz0gZPEeayEI1yTJhWhg" type="11001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_Ydjz0wZPEeayEI1yTJhWhg" x="50" y="3"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_Ydjz1AZPEeayEI1yTJhWhg" type="11002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_Ydjz1QZPEeayEI1yTJhWhg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Pseudostate" href="choice-exit.uml#_YddGIAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ydjz0QZPEeayEI1yTJhWhg" x="111" y="115"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_l4E4MAZPEeayEI1yTJhWhg" type="8000">
<children xmi:type="notation:DecorationNode" xmi:id="_l4E4MgZPEeayEI1yTJhWhg" type="8001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_l4E4MwZPEeayEI1yTJhWhg" x="25" y="3"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_l4E4NAZPEeayEI1yTJhWhg" type="8002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_l4E4NQZPEeayEI1yTJhWhg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Pseudostate" href="choice-exit.uml#_l37HMAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_l4E4MQZPEeayEI1yTJhWhg" x="20" y="17"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qa6MAQZPEeayEI1yTJhWhg"/>
</children>
<element xmi:type="uml:Region" href="choice-exit.uml#_Qa4W0QZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qa5k8QZPEeayEI1yTJhWhg" width="361" height="198"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_KqpdlAZPEeayEI1yTJhWhg" y="23" width="361" height="198"/>
</children>
<element xmi:type="uml:State" href="choice-exit.uml#_KqlMIAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Kqo2gQZPEeayEI1yTJhWhg" x="310" y="27" width="361" height="221"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_ho2esAZPEeayEI1yTJhWhg" type="8000">
<children xmi:type="notation:DecorationNode" xmi:id="_ho2esgZPEeayEI1yTJhWhg" type="8001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_ho2eswZPEeayEI1yTJhWhg" x="25" y="3"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_ho2etAZPEeayEI1yTJhWhg" type="8002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_ho2etQZPEeayEI1yTJhWhg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Pseudostate" href="choice-exit.uml#_houi4AZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_ho2esQZPEeayEI1yTJhWhg" x="30" y="87"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AtQnaQZPEeayEI1yTJhWhg"/>
</children>
<element xmi:type="uml:Region" href="choice-exit.uml#_AtQAUAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AtQnagZPEeayEI1yTJhWhg" width="791" height="348"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AtQnawZPEeayEI1yTJhWhg" y="23" width="791" height="348"/>
</children>
<element xmi:type="uml:StateMachine" href="choice-exit.uml#_AtPZQAZPEeayEI1yTJhWhg"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AtQnbAZPEeayEI1yTJhWhg" x="30" y="30" width="791" height="371"/>
</children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_AtQnbQZPEeayEI1yTJhWhg" name="diagram_compatibility_version" stringValue="1.1.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_AtQnbgZPEeayEI1yTJhWhg"/>
<styles xmi:type="style:PapyrusViewStyle" xmi:id="_AtQnbwZPEeayEI1yTJhWhg">
<owner xmi:type="uml:Model" href="choice-exit.uml#_AtOLIAZPEeayEI1yTJhWhg"/>
</styles>
<element xmi:type="uml:StateMachine" href="choice-exit.uml#_AtPZQAZPEeayEI1yTJhWhg"/>
<edges xmi:type="notation:Connector" xmi:id="_kOjVoAZPEeayEI1yTJhWhg" type="7000" source="_ho2esAZPEeayEI1yTJhWhg" target="_Gn_gcAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_kOjVowZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_kOjVpAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_kOjVpQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_kOjVpgZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_kOjVpwZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_kOjVqAZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_kOjVoQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_kOZkoAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_kOjVogZPEeayEI1yTJhWhg" points="[8, -4, -105, 0]$[113, -10, 0, -6]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kO8XMAZPEeayEI1yTJhWhg" id="(1.0,0.4)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kO8XMQZPEeayEI1yTJhWhg" id="(0.0,0.14893617021276595)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_nkogoAZPEeayEI1yTJhWhg" type="7000" source="_l4E4MAZPEeayEI1yTJhWhg" target="_Qa6zEAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_nkogowZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_nkogpAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_nkogpQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_nkogpgZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_nkogpwZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_nkogqAZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_nkogoQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_nkc6cAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nkogogZPEeayEI1yTJhWhg" points="[8, -1, -97, 0]$[93, -8, -12, -7]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nlI28AZPEeayEI1yTJhWhg" id="(1.0,0.5)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nlI28QZPEeayEI1yTJhWhg" id="(0.0,0.19148936170212766)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_sV3bAAZPEeayEI1yTJhWhg" type="7000" source="_Gn_gcAZPEeayEI1yTJhWhg" target="_Kqo2gAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_sV3bAwZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_sV3bBAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_sV3bBQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_sV3bBgZPEeayEI1yTJhWhg" x="-12" y="-10"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_sV3bBwZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_sV3bCAZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_sV3bAQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_sVrNwAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sV3bAgZPEeayEI1yTJhWhg" points="[13, -1, -122, 0]$[132, -2, -3, -1]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sWa0oAZPEeayEI1yTJhWhg" id="(1.0,0.40425531914893614)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sWa0oQZPEeayEI1yTJhWhg" id="(0.0,0.3574660633484163)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_vTnlkAZPEeayEI1yTJhWhg" type="7000" source="_Qa6zEAZPEeayEI1yTJhWhg" target="_Ydjz0AZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_vToMoAZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_vToMoQZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_vToMogZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_vToMowZPEeayEI1yTJhWhg" x="-8" y="-23"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_vToMpAZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_vToMpQZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_vTnlkQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_vTbYUAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vTnlkgZPEeayEI1yTJhWhg" points="[-2, 8, 11, -55]$[-14, 60, -1, -3]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vUJxEAZPEeayEI1yTJhWhg" id="(0.37037037037037035,1.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vUJxEQZPEeayEI1yTJhWhg" id="(0.4666666666666667,0.0)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_w9LkYAZPEeayEI1yTJhWhg" type="7000" source="_Ydjz0AZPEeayEI1yTJhWhg" target="_Gn_gcAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_w9LkYwZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_w9LkZAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_w9LkZQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_w9LkZgZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_w9LkZwZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_w9LkaAZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_w9LkYQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_w8_XIAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_w9LkYgZPEeayEI1yTJhWhg" points="[-19, -4, 260, 51]$[-261, -47, 18, 8]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_w9uW8AZPEeayEI1yTJhWhg" id="(0.0,0.3)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_w9uW8QZPEeayEI1yTJhWhg" id="(1.0,0.7659574468085106)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_x1CZcAZPEeayEI1yTJhWhg" type="7000" source="_Ydjz0AZPEeayEI1yTJhWhg" target="_JXLqkAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_x1CZcwZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_x1CZdAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_x1CZdQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_x1CZdgZPEeayEI1yTJhWhg" x="53" y="27"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_x1DAgAZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_x1DAgQZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_x1CZcQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_x00-EAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_x1CZcgZPEeayEI1yTJhWhg" points="[-21, 3, 320, -9]$[-262, 54, 79, 42]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_x1oPUAZPEeayEI1yTJhWhg" id="(0.0,0.7)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_x1o2YAZPEeayEI1yTJhWhg" id="(1.0,0.5957446808510638)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_zN3NkAZPEeayEI1yTJhWhg" type="7000" source="_JXLqkAZPEeayEI1yTJhWhg" target="_Gn_gcAZPEeayEI1yTJhWhg">
<children xmi:type="notation:DecorationNode" xmi:id="_zN3NkwZPEeayEI1yTJhWhg" type="7001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_zN3NlAZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_zN3NlQZPEeayEI1yTJhWhg" type="7002">
<layoutConstraint xmi:type="notation:Location" xmi:id="_zN3NlgZPEeayEI1yTJhWhg"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_zN3NlwZPEeayEI1yTJhWhg" type="7003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_zN3NmAZPEeayEI1yTJhWhg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_zN3NkQZPEeayEI1yTJhWhg"/>
<element xmi:type="uml:Transition" href="choice-exit.uml#_zNpyMAZPEeayEI1yTJhWhg"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zN3NkgZPEeayEI1yTJhWhg" points="[40, 0, -1, 61]$[41, -53, 0, 8]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zObOQAZPEeayEI1yTJhWhg" id="(0.5061728395061729,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zObOQQZPEeayEI1yTJhWhg" id="(0.5061728395061729,1.0)"/>
</edges>
</notation:Diagram>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AtOLIAZPEeayEI1yTJhWhg" name="RootElement">
<packagedElement xmi:type="uml:StateMachine" xmi:id="_AtPZQAZPEeayEI1yTJhWhg" name="StateMachine">
<region xmi:type="uml:Region" xmi:id="_AtQAUAZPEeayEI1yTJhWhg" name="Region1">
<transition xmi:type="uml:Transition" xmi:id="_kOZkoAZPEeayEI1yTJhWhg" source="_houi4AZPEeayEI1yTJhWhg" target="_Gn8dIAZPEeayEI1yTJhWhg"/>
<transition xmi:type="uml:Transition" xmi:id="_sVrNwAZPEeayEI1yTJhWhg" source="_Gn8dIAZPEeayEI1yTJhWhg" target="_KqlMIAZPEeayEI1yTJhWhg">
<trigger xmi:type="uml:Trigger" xmi:id="_GdhgYAZQEeayEI1yTJhWhg" event="_8Ob2MAZPEeayEI1yTJhWhg"/>
</transition>
<transition xmi:type="uml:Transition" xmi:id="_zNpyMAZPEeayEI1yTJhWhg" source="_JXInQAZPEeayEI1yTJhWhg" target="_Gn8dIAZPEeayEI1yTJhWhg"/>
<subvertex xmi:type="uml:State" xmi:id="_Gn8dIAZPEeayEI1yTJhWhg" name="READY"/>
<subvertex xmi:type="uml:State" xmi:id="_JXInQAZPEeayEI1yTJhWhg" name="ERROR"/>
<subvertex xmi:type="uml:State" xmi:id="_KqlMIAZPEeayEI1yTJhWhg" name="DOSTUFF">
<region xmi:type="uml:Region" xmi:id="_Qa4W0QZPEeayEI1yTJhWhg" name="Region1">
<transition xmi:type="uml:Transition" xmi:id="_nkc6cAZPEeayEI1yTJhWhg" source="_l37HMAZPEeayEI1yTJhWhg" target="_Qa6MBAZPEeayEI1yTJhWhg"/>
<transition xmi:type="uml:Transition" xmi:id="_vTbYUAZPEeayEI1yTJhWhg" source="_Qa6MBAZPEeayEI1yTJhWhg" target="_YddGIAZPEeayEI1yTJhWhg">
<trigger xmi:type="uml:Trigger" xmi:id="_IQ47cAZQEeayEI1yTJhWhg" event="_-aPmcAZPEeayEI1yTJhWhg"/>
</transition>
<transition xmi:type="uml:Transition" xmi:id="_w8_XIAZPEeayEI1yTJhWhg" source="_YddGIAZPEeayEI1yTJhWhg" target="_Gn8dIAZPEeayEI1yTJhWhg"/>
<transition xmi:type="uml:Transition" xmi:id="_x00-EAZPEeayEI1yTJhWhg" guard="_cQ00oAZQEeayEI1yTJhWhg" source="_YddGIAZPEeayEI1yTJhWhg" target="_JXInQAZPEeayEI1yTJhWhg">
<ownedRule xmi:type="uml:Constraint" xmi:id="_cQ00oAZQEeayEI1yTJhWhg">
<specification xmi:type="uml:OpaqueExpression" xmi:id="_cQ00oQZQEeayEI1yTJhWhg">
<language>bean</language>
<body>exitGuard</body>
</specification>
</ownedRule>
</transition>
<subvertex xmi:type="uml:State" xmi:id="_Qa6MBAZPEeayEI1yTJhWhg" name="START"/>
<subvertex xmi:type="uml:Pseudostate" xmi:id="_YddGIAZPEeayEI1yTJhWhg" name="CHOICE" kind="choice"/>
<subvertex xmi:type="uml:Pseudostate" xmi:id="_l37HMAZPEeayEI1yTJhWhg" name=""/>
</region>
</subvertex>
<subvertex xmi:type="uml:Pseudostate" xmi:id="_houi4AZPEeayEI1yTJhWhg"/>
</region>
</packagedElement>
<packagedElement xmi:type="uml:Signal" xmi:id="_5WbHQAZPEeayEI1yTJhWhg" name="E1"/>
<packagedElement xmi:type="uml:Signal" xmi:id="_6njX8AZPEeayEI1yTJhWhg" name="E2"/>
<packagedElement xmi:type="uml:SignalEvent" xmi:id="_8Ob2MAZPEeayEI1yTJhWhg" name="SignalEventE1" signal="_5WbHQAZPEeayEI1yTJhWhg"/>
<packagedElement xmi:type="uml:SignalEvent" xmi:id="_-aPmcAZPEeayEI1yTJhWhg" name="SignalEventE2" signal="_6njX8AZPEeayEI1yTJhWhg"/>
</uml:Model>