Fix missing guards in uml model
- Add defined guards to normal transitions. - Fixes #212
This commit is contained in:
@@ -219,15 +219,7 @@ public class UmlModelParser {
|
||||
list = new LinkedList<ChoiceData<String, String>>();
|
||||
choices.put(transition.getSource().getName(), list);
|
||||
}
|
||||
Guard<String, String> guard = null;
|
||||
for (Constraint c : transition.getOwnedRules()) {
|
||||
if (c.getSpecification() instanceof OpaqueExpression) {
|
||||
String beanId = UmlUtils.resolveBodyByLanguage(LANGUAGE_BEAN, (OpaqueExpression)c.getSpecification());
|
||||
if (StringUtils.hasText(beanId)) {
|
||||
guard = resolver.resolveGuard(beanId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Guard<String, String> guard = resolveGuard(transition);
|
||||
// we want null guards to be at the end
|
||||
if (guard == null) {
|
||||
list.addLast(new ChoiceData<String, String>(transition.getSource().getName(), transition.getTarget().getName(), guard));
|
||||
@@ -240,15 +232,7 @@ public class UmlModelParser {
|
||||
list = new LinkedList<JunctionData<String, String>>();
|
||||
junctions.put(transition.getSource().getName(), list);
|
||||
}
|
||||
Guard<String, String> guard = null;
|
||||
for (Constraint c : transition.getOwnedRules()) {
|
||||
if (c.getSpecification() instanceof OpaqueExpression) {
|
||||
String beanId = UmlUtils.resolveBodyByLanguage(LANGUAGE_BEAN, (OpaqueExpression)c.getSpecification());
|
||||
if (StringUtils.hasText(beanId)) {
|
||||
guard = resolver.resolveGuard(beanId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Guard<String, String> guard = resolveGuard(transition);
|
||||
// we want null guards to be at the end
|
||||
if (guard == null) {
|
||||
list.addLast(new JunctionData<String, String>(transition.getSource().getName(), transition.getTarget().getName(), guard));
|
||||
@@ -282,12 +266,13 @@ public class UmlModelParser {
|
||||
// go through all triggers and create transition
|
||||
// from signals, or transitions from timers
|
||||
for (Trigger trigger : transition.getTriggers()) {
|
||||
Guard<String, String> guard = resolveGuard(transition);
|
||||
Event event = trigger.getEvent();
|
||||
if (event instanceof SignalEvent) {
|
||||
Signal signal = ((SignalEvent)event).getSignal();
|
||||
if (signal != null) {
|
||||
transitionDatas.add(new TransitionData<String, String>(transition.getSource().getName(),
|
||||
transition.getTarget().getName(), signal.getName(), resolveTransitionActions(transition), null,
|
||||
transition.getTarget().getName(), signal.getName(), resolveTransitionActions(transition), guard,
|
||||
UmlUtils.mapUmlTransitionType(transition)));
|
||||
}
|
||||
} else if (event instanceof TimeEvent) {
|
||||
@@ -299,7 +284,7 @@ public class UmlModelParser {
|
||||
count = 1;
|
||||
}
|
||||
transitionDatas.add(new TransitionData<String, String>(transition.getSource().getName(),
|
||||
transition.getTarget().getName(), period, count, resolveTransitionActions(transition), null,
|
||||
transition.getTarget().getName(), period, count, resolveTransitionActions(transition), guard,
|
||||
UmlUtils.mapUmlTransitionType(transition)));
|
||||
}
|
||||
}
|
||||
@@ -308,11 +293,24 @@ public class UmlModelParser {
|
||||
// create anonymous transition if needed
|
||||
if (shouldCreateAnonymousTransition(transition)) {
|
||||
transitionDatas.add(new TransitionData<String, String>(transition.getSource().getName(), transition.getTarget().getName(),
|
||||
null, resolveTransitionActions(transition), null, UmlUtils.mapUmlTransitionType(transition)));
|
||||
null, resolveTransitionActions(transition), resolveGuard(transition), UmlUtils.mapUmlTransitionType(transition)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Guard<String, String> resolveGuard(Transition transition) {
|
||||
Guard<String, String> guard = null;
|
||||
for (Constraint c : transition.getOwnedRules()) {
|
||||
if (c.getSpecification() instanceof OpaqueExpression) {
|
||||
String beanId = UmlUtils.resolveBodyByLanguage(LANGUAGE_BEAN, (OpaqueExpression)c.getSpecification());
|
||||
if (StringUtils.hasText(beanId)) {
|
||||
guard = resolver.resolveGuard(beanId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return guard;
|
||||
}
|
||||
|
||||
private Long getTimePeriod(TimeEvent event) {
|
||||
try {
|
||||
return Long.valueOf(event.getWhen().getExpr().integerValue());
|
||||
|
||||
@@ -502,6 +502,30 @@ public class UmlStateMachineModelFactoryTests extends AbstractUmlTests {
|
||||
assertThat(stateMachine.getState().getIds(), containsInAnyOrder("S5"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testSimpleGuardsDeny1() throws Exception {
|
||||
context.register(Config14.class);
|
||||
context.refresh();
|
||||
StateMachine<String, String> stateMachine = context.getBean(StateMachine.class);
|
||||
stateMachine.start();
|
||||
assertThat(stateMachine.getState().getIds(), containsInAnyOrder("S1"));
|
||||
stateMachine.sendEvent("E1");
|
||||
assertThat(stateMachine.getState().getIds(), containsInAnyOrder("S1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testSimpleGuardsDeny2() throws Exception {
|
||||
context.register(Config14.class);
|
||||
context.refresh();
|
||||
StateMachine<String, String> stateMachine = context.getBean(StateMachine.class);
|
||||
stateMachine.start();
|
||||
assertThat(stateMachine.getState().getIds(), containsInAnyOrder("S1"));
|
||||
stateMachine.sendEvent("E2");
|
||||
assertThat(stateMachine.getState().getIds(), containsInAnyOrder("S3"));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableStateMachine
|
||||
public static class Config2 extends StateMachineConfigurerAdapter<String, String> {
|
||||
@@ -765,6 +789,28 @@ public class UmlStateMachineModelFactoryTests extends AbstractUmlTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableStateMachine
|
||||
public static class Config14 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/uml/simple-guards.uml");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SimpleGuard denyGuard() {
|
||||
return new SimpleGuard(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LatchAction implements Action<String, String> {
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
@Override
|
||||
@@ -787,6 +833,21 @@ public class UmlStateMachineModelFactoryTests extends AbstractUmlTests {
|
||||
}
|
||||
}
|
||||
|
||||
private static class SimpleGuard implements Guard<String, String> {
|
||||
|
||||
private final boolean deny;
|
||||
|
||||
public SimpleGuard(boolean deny) {
|
||||
this.deny = deny;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean evaluate(StateContext<String, String> context) {
|
||||
return deny;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class JunctionGuard implements Guard<String, String> {
|
||||
|
||||
private final String match;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
|
||||
@@ -0,0 +1,147 @@
|
||||
<?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="_TfyF0A6gEeaxyZlCCSfciw" type="PapyrusUMLStateMachineDiagram" name="StateMachine Diagram" measurementUnit="Pixel">
|
||||
<children xmi:type="notation:Shape" xmi:id="_TfyF0Q6gEeaxyZlCCSfciw" type="2000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_TfyF0g6gEeaxyZlCCSfciw" type="2001">
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TfyF0w6gEeaxyZlCCSfciw" width="700" height="23"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_TfyF1A6gEeaxyZlCCSfciw" type="2002">
|
||||
<children xmi:type="notation:Shape" xmi:id="_TfyF1Q6gEeaxyZlCCSfciw" type="3000">
|
||||
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TfyF1g6gEeaxyZlCCSfciw" source="RegionAnnotationKey">
|
||||
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TfyF1w6gEeaxyZlCCSfciw" key="RegionZoneKey" value=""/>
|
||||
</eAnnotations>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_TfyF2A6gEeaxyZlCCSfciw" type="3002">
|
||||
<children xmi:type="notation:Shape" xmi:id="_1RYYEA6gEeaxyZlCCSfciw" type="6000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_1RY_IA6gEeaxyZlCCSfciw" type="6001"/>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_1RY_IQ6gEeaxyZlCCSfciw" type="19003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_1RY_Ig6gEeaxyZlCCSfciw" x="40"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_1RY_Iw6gEeaxyZlCCSfciw" type="6002">
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_1RY_JA6gEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<element xmi:type="uml:State" href="simple-guards.uml#_1RUGoA6gEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_1RYYEQ6gEeaxyZlCCSfciw" x="117" y="55"/>
|
||||
</children>
|
||||
<children xmi:type="notation:Shape" xmi:id="_2Nn94A6gEeaxyZlCCSfciw" type="6000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_2Nok8A6gEeaxyZlCCSfciw" type="6001"/>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_2Nok8Q6gEeaxyZlCCSfciw" type="19003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_2Nok8g6gEeaxyZlCCSfciw" x="40"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_2Nok8w6gEeaxyZlCCSfciw" type="6002">
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_2Nok9A6gEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<element xmi:type="uml:State" href="simple-guards.uml#_2NkTgA6gEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_2Nn94Q6gEeaxyZlCCSfciw" x="327" y="54"/>
|
||||
</children>
|
||||
<children xmi:type="notation:Shape" xmi:id="_-gdWwA6gEeaxyZlCCSfciw" type="8000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_-gdWwg6gEeaxyZlCCSfciw" type="8001">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_-gdWww6gEeaxyZlCCSfciw" x="25" y="3"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_-gdWxA6gEeaxyZlCCSfciw" type="8002">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_-gdWxQ6gEeaxyZlCCSfciw" x="25" y="-10"/>
|
||||
</children>
|
||||
<element xmi:type="uml:Pseudostate" href="simple-guards.uml#_-gXQIA6gEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_-gdWwQ6gEeaxyZlCCSfciw" x="27" y="66"/>
|
||||
</children>
|
||||
<children xmi:type="notation:Shape" xmi:id="_AmgLUA6jEeaxyZlCCSfciw" type="6000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_AmgyYA6jEeaxyZlCCSfciw" type="6001"/>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_AmgyYQ6jEeaxyZlCCSfciw" type="19003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_AmgyYg6jEeaxyZlCCSfciw" x="40"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_AmgyYw6jEeaxyZlCCSfciw" type="6002">
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AmgyZA6jEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<element xmi:type="uml:State" href="simple-guards.uml#_AmWaUA6jEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_AmgLUQ6jEeaxyZlCCSfciw" x="118" y="177"/>
|
||||
</children>
|
||||
<children xmi:type="notation:Shape" xmi:id="_DNGaIA6jEeaxyZlCCSfciw" type="6000">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_DNHBMA6jEeaxyZlCCSfciw" type="6001"/>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_DNHBMQ6jEeaxyZlCCSfciw" type="19003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_DNHBMg6jEeaxyZlCCSfciw" x="40"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_DNHBMw6jEeaxyZlCCSfciw" type="6002">
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNHBNA6jEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<element xmi:type="uml:State" href="simple-guards.uml#_DM93QA6jEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNGaIQ6jEeaxyZlCCSfciw" x="327" y="176"/>
|
||||
</children>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TfyF2Q6gEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<element xmi:type="uml:Region" href="simple-guards.uml#_TfxewA6gEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TfyF2g6gEeaxyZlCCSfciw" width="700" height="287"/>
|
||||
</children>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TfyF2w6gEeaxyZlCCSfciw" y="23" width="700" height="287"/>
|
||||
</children>
|
||||
<element xmi:type="uml:StateMachine" href="simple-guards.uml#_TfubcA6gEeaxyZlCCSfciw"/>
|
||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TfyF3A6gEeaxyZlCCSfciw" x="30" y="30" width="700" height="310"/>
|
||||
</children>
|
||||
<styles xmi:type="notation:StringValueStyle" xmi:id="_TfyF3Q6gEeaxyZlCCSfciw" name="diagram_compatibility_version" stringValue="1.1.0"/>
|
||||
<styles xmi:type="notation:DiagramStyle" xmi:id="_TfyF3g6gEeaxyZlCCSfciw"/>
|
||||
<styles xmi:type="style:PapyrusViewStyle" xmi:id="_TfyF3w6gEeaxyZlCCSfciw">
|
||||
<owner xmi:type="uml:Model" href="simple-guards.uml#_TfoU0A6gEeaxyZlCCSfciw"/>
|
||||
</styles>
|
||||
<element xmi:type="uml:StateMachine" href="simple-guards.uml#_TfubcA6gEeaxyZlCCSfciw"/>
|
||||
<edges xmi:type="notation:Connector" xmi:id="___37EA6gEeaxyZlCCSfciw" type="7000" source="_-gdWwA6gEeaxyZlCCSfciw" target="_1RYYEA6gEeaxyZlCCSfciw">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="___4iIA6gEeaxyZlCCSfciw" type="7001">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="___4iIQ6gEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="___4iIg6gEeaxyZlCCSfciw" type="7002">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="___4iIw6gEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="___4iJA6gEeaxyZlCCSfciw" type="7003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="___4iJQ6gEeaxyZlCCSfciw" y="60"/>
|
||||
</children>
|
||||
<styles xmi:type="notation:FontStyle" xmi:id="___37EQ6gEeaxyZlCCSfciw"/>
|
||||
<element xmi:type="uml:Transition" href="simple-guards.uml#___vYMA6gEeaxyZlCCSfciw"/>
|
||||
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="___37Eg6gEeaxyZlCCSfciw" points="[8, -2, -110, 0]$[120, -3, 2, -1]"/>
|
||||
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_AAN5UA6hEeaxyZlCCSfciw" id="(1.0,0.35)"/>
|
||||
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_AAN5UQ6hEeaxyZlCCSfciw" id="(0.0,0.3829787234042553)"/>
|
||||
</edges>
|
||||
<edges xmi:type="notation:Connector" xmi:id="_Ar-zIA6hEeaxyZlCCSfciw" type="7000" source="_1RYYEA6gEeaxyZlCCSfciw" target="_2Nn94A6gEeaxyZlCCSfciw">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_Ar-zIw6hEeaxyZlCCSfciw" type="7001">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_Ar-zJA6hEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_Ar-zJQ6hEeaxyZlCCSfciw" type="7002">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_Ar-zJg6hEeaxyZlCCSfciw" x="-8" y="-13"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_Ar-zJw6hEeaxyZlCCSfciw" type="7003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_Ar-zKA6hEeaxyZlCCSfciw" y="60"/>
|
||||
</children>
|
||||
<styles xmi:type="notation:FontStyle" xmi:id="_Ar-zIQ6hEeaxyZlCCSfciw"/>
|
||||
<element xmi:type="uml:Transition" href="simple-guards.uml#_Ar3eYA6hEeaxyZlCCSfciw"/>
|
||||
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ar-zIg6hEeaxyZlCCSfciw" points="[7, -1, -126, 0]$[131, -2, -2, -1]"/>
|
||||
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_AsUKUA6hEeaxyZlCCSfciw" id="(1.0,0.46808510638297873)"/>
|
||||
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_AsUKUQ6hEeaxyZlCCSfciw" id="(0.0,0.48936170212765956)"/>
|
||||
</edges>
|
||||
<edges xmi:type="notation:Connector" xmi:id="_OvWVUA6jEeaxyZlCCSfciw" type="7000" source="_1RYYEA6gEeaxyZlCCSfciw" target="_AmgLUA6jEeaxyZlCCSfciw">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_OvW8YA6jEeaxyZlCCSfciw" type="7001">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_OvW8YQ6jEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_OvW8Yg6jEeaxyZlCCSfciw" type="7002">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_OvW8Yw6jEeaxyZlCCSfciw" x="-1" y="-15"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_OvW8ZA6jEeaxyZlCCSfciw" type="7003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_OvW8ZQ6jEeaxyZlCCSfciw" y="60"/>
|
||||
</children>
|
||||
<styles xmi:type="notation:FontStyle" xmi:id="_OvWVUQ6jEeaxyZlCCSfciw"/>
|
||||
<element xmi:type="uml:Transition" href="simple-guards.uml#_OvI58A6jEeaxyZlCCSfciw"/>
|
||||
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OvWVUg6jEeaxyZlCCSfciw" points="[0, 8, 0, -85]$[-2, 83, -2, -10]"/>
|
||||
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OvyaMA6jEeaxyZlCCSfciw" id="(0.475,1.0)"/>
|
||||
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OvyaMQ6jEeaxyZlCCSfciw" id="(0.45,0.0)"/>
|
||||
</edges>
|
||||
<edges xmi:type="notation:Connector" xmi:id="_SbSbkA6jEeaxyZlCCSfciw" type="7000" source="_AmgLUA6jEeaxyZlCCSfciw" target="_DNGaIA6jEeaxyZlCCSfciw">
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_SbSbkw6jEeaxyZlCCSfciw" type="7001">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_SbSblA6jEeaxyZlCCSfciw"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_SbSblQ6jEeaxyZlCCSfciw" type="7002">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_SbSblg6jEeaxyZlCCSfciw" x="-2" y="-14"/>
|
||||
</children>
|
||||
<children xmi:type="notation:DecorationNode" xmi:id="_SbSblw6jEeaxyZlCCSfciw" type="7003">
|
||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_SbSbmA6jEeaxyZlCCSfciw" y="60"/>
|
||||
</children>
|
||||
<styles xmi:type="notation:FontStyle" xmi:id="_SbSbkQ6jEeaxyZlCCSfciw"/>
|
||||
<element xmi:type="uml:Transition" href="simple-guards.uml#_SbFAMA6jEeaxyZlCCSfciw"/>
|
||||
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_SbSbkg6jEeaxyZlCCSfciw" points="[37, 3, -172, 4]$[248, 36, 39, 37]"/>
|
||||
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_SbvukA6jEeaxyZlCCSfciw" id="(1.0,0.46808510638297873)"/>
|
||||
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_SbvukQ6jEeaxyZlCCSfciw" id="(0.0,0.5106382978723404)"/>
|
||||
</edges>
|
||||
</notation:Diagram>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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="_TfoU0A6gEeaxyZlCCSfciw" name="RootElement">
|
||||
<packagedElement xmi:type="uml:StateMachine" xmi:id="_TfubcA6gEeaxyZlCCSfciw" name="StateMachine">
|
||||
<region xmi:type="uml:Region" xmi:id="_TfxewA6gEeaxyZlCCSfciw" name="Region1">
|
||||
<transition xmi:type="uml:Transition" xmi:id="___vYMA6gEeaxyZlCCSfciw" source="_-gXQIA6gEeaxyZlCCSfciw" target="_1RUGoA6gEeaxyZlCCSfciw"/>
|
||||
<transition xmi:type="uml:Transition" xmi:id="_Ar3eYA6hEeaxyZlCCSfciw" guard="_IK-UQA6hEeaxyZlCCSfciw" source="_1RUGoA6gEeaxyZlCCSfciw" target="_2NkTgA6gEeaxyZlCCSfciw">
|
||||
<ownedRule xmi:type="uml:Constraint" xmi:id="_IK-UQA6hEeaxyZlCCSfciw">
|
||||
<specification xmi:type="uml:OpaqueExpression" xmi:id="_IK-UQQ6hEeaxyZlCCSfciw">
|
||||
<language>bean</language>
|
||||
<body>denyGuard</body>
|
||||
</specification>
|
||||
</ownedRule>
|
||||
<trigger xmi:type="uml:Trigger" xmi:id="_C6Tr4A6hEeaxyZlCCSfciw" event="_77ITQA6gEeaxyZlCCSfciw"/>
|
||||
</transition>
|
||||
<transition xmi:type="uml:Transition" xmi:id="_OvI58A6jEeaxyZlCCSfciw" source="_1RUGoA6gEeaxyZlCCSfciw" target="_AmWaUA6jEeaxyZlCCSfciw">
|
||||
<trigger xmi:type="uml:Trigger" xmi:id="_QjlTEA6jEeaxyZlCCSfciw" event="_LBKzYA6jEeaxyZlCCSfciw"/>
|
||||
</transition>
|
||||
<transition xmi:type="uml:Transition" xmi:id="_SbFAMA6jEeaxyZlCCSfciw" guard="_ipVXgA6jEeaxyZlCCSfciw" source="_AmWaUA6jEeaxyZlCCSfciw" target="_DM93QA6jEeaxyZlCCSfciw">
|
||||
<ownedRule xmi:type="uml:Constraint" xmi:id="_ipVXgA6jEeaxyZlCCSfciw">
|
||||
<specification xmi:type="uml:OpaqueExpression" xmi:id="_ipVXgQ6jEeaxyZlCCSfciw">
|
||||
<language>bean</language>
|
||||
<body>denyGuard</body>
|
||||
</specification>
|
||||
</ownedRule>
|
||||
</transition>
|
||||
<subvertex xmi:type="uml:State" xmi:id="_1RUGoA6gEeaxyZlCCSfciw" name="S1"/>
|
||||
<subvertex xmi:type="uml:State" xmi:id="_2NkTgA6gEeaxyZlCCSfciw" name="S2"/>
|
||||
<subvertex xmi:type="uml:Pseudostate" xmi:id="_-gXQIA6gEeaxyZlCCSfciw" name=""/>
|
||||
<subvertex xmi:type="uml:State" xmi:id="_AmWaUA6jEeaxyZlCCSfciw" name="S3"/>
|
||||
<subvertex xmi:type="uml:State" xmi:id="_DM93QA6jEeaxyZlCCSfciw" name="S4"/>
|
||||
</region>
|
||||
</packagedElement>
|
||||
<packagedElement xmi:type="uml:Signal" xmi:id="_52looA6gEeaxyZlCCSfciw" name="E1"/>
|
||||
<packagedElement xmi:type="uml:SignalEvent" xmi:id="_77ITQA6gEeaxyZlCCSfciw" name="SignalEventE1" signal="_52looA6gEeaxyZlCCSfciw"/>
|
||||
<packagedElement xmi:type="uml:Signal" xmi:id="_I8jQQA6jEeaxyZlCCSfciw" name="E2"/>
|
||||
<packagedElement xmi:type="uml:SignalEvent" xmi:id="_LBKzYA6jEeaxyZlCCSfciw" name="SignalEventE2" signal="_I8jQQA6jEeaxyZlCCSfciw"/>
|
||||
</uml:Model>
|
||||
Reference in New Issue
Block a user