Implement named transitions

- Backport #850
- Fixes #988
Co-authored-by: Niels Hoppe <niels.hoppe@fokus.fraunhofer.de>
This commit is contained in:
Niels
2021-07-11 09:49:56 +02:00
committed by Janne Valkealahti
parent 9bd7275837
commit b0fdab2c44
20 changed files with 252 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 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.
@@ -864,7 +864,7 @@ public abstract class AbstractStateMachineFactory<S, E> extends LifecycleObjectS
}
DefaultExternalTransition<S, E> transition = new DefaultExternalTransition<S, E>(stateMap.get(source),
stateMap.get(target), transitionData.getActions(), event, transitionData.getGuard(), trigger,
transitionData.getSecurityRule());
transitionData.getSecurityRule(), transitionData.getName());
transitions.add(transition);
} else if (transitionData.getKind() == TransitionKind.LOCAL) {
@@ -874,12 +874,12 @@ public abstract class AbstractStateMachineFactory<S, E> extends LifecycleObjectS
}
DefaultLocalTransition<S, E> transition = new DefaultLocalTransition<S, E>(stateMap.get(source),
stateMap.get(target), transitionData.getActions(), event, transitionData.getGuard(), trigger,
transitionData.getSecurityRule());
transitionData.getSecurityRule(), transitionData.getName());
transitions.add(transition);
} else if (transitionData.getKind() == TransitionKind.INTERNAL) {
DefaultInternalTransition<S, E> transition = new DefaultInternalTransition<S, E>(stateMap.get(source),
transitionData.getActions(), event, transitionData.getGuard(), trigger,
transitionData.getSecurityRule());
transitionData.getSecurityRule(), transitionData.getName());
transitions.add(transition);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -176,17 +176,19 @@ public class StateMachineTransitionBuilder<S, E>
* @param guard the guard
* @param kind the kind
* @param securityRule the security rule
* @param name the name
*/
public void addTransition(S source, S target, S state, E event, Long period, Integer count,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, SecurityRule securityRule) {
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, SecurityRule securityRule,
String name) {
// if rule not given, get it from global
if (securityRule == null) {
@SuppressWarnings("unchecked")
ConfigurationData<S, E> config = getSharedObject(ConfigurationData.class);
securityRule = config.getTransitionSecurityRule();
}
transitionData.add(new TransitionData<>(source, target, state, event, period, count, actions, guard, kind, securityRule));
transitionData.add(new TransitionData<>(source, target, state, event, period, count, actions, guard, kind, securityRule, name));
}
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -53,6 +53,7 @@ public abstract class AbstractTransitionConfigurer<S, E> extends
private final Collection<Function<StateContext<S, E>, Mono<Void>>> actions = new ArrayList<>();
private Function<StateContext<S, E>, Mono<Boolean>> guard;
private SecurityRule securityRule;
private String name;
protected S getSource() {
return source;
@@ -94,6 +95,10 @@ public abstract class AbstractTransitionConfigurer<S, E> extends
return securityRule;
}
protected String getName() {
return name;
}
protected void setSource(S source) {
this.source = source;
}
@@ -156,4 +161,8 @@ public abstract class AbstractTransitionConfigurer<S, E> extends
securityRule.setExpression(expression);
}
protected void setName(String name) {
this.name = name;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -44,7 +44,7 @@ public class DefaultExternalTransitionConfigurer<S, E> extends AbstractTransitio
@Override
public void configure(StateMachineTransitionBuilder<S, E> builder) throws Exception {
builder.addTransition(getSource(), getTarget(), getState(), getEvent(), getPeriod(), getCount(), getActions(), getGuard(), TransitionKind.EXTERNAL,
getSecurityRule());
getSecurityRule(), getName());
}
@Override
@@ -127,4 +127,10 @@ public class DefaultExternalTransitionConfigurer<S, E> extends AbstractTransitio
return this;
}
@Override
public ExternalTransitionConfigurer<S, E> name(String name) {
setName(name);
return this;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -44,7 +44,7 @@ public class DefaultInternalTransitionConfigurer<S, E> extends AbstractTransitio
@Override
public void configure(StateMachineTransitionBuilder<S, E> builder) throws Exception {
builder.addTransition(getSource(), getTarget(), getState(), getEvent(), getPeriod(), getCount(), getActions(), getGuard(), TransitionKind.INTERNAL,
getSecurityRule());
getSecurityRule(), getName());
}
@Override
@@ -121,4 +121,10 @@ public class DefaultInternalTransitionConfigurer<S, E> extends AbstractTransitio
return this;
}
@Override
public InternalTransitionConfigurer<S, E> name(String name) {
setName(name);
return this;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -43,7 +43,7 @@ public class DefaultLocalTransitionConfigurer<S, E> extends AbstractTransitionCo
@Override
public void configure(StateMachineTransitionBuilder<S, E> builder) throws Exception {
builder.addTransition(getSource(), getTarget(), getState(), getEvent(), getPeriod(), getCount(), getActions(), getGuard(), TransitionKind.LOCAL,
getSecurityRule());
getSecurityRule(), getName());
}
@Override
@@ -126,4 +126,10 @@ public class DefaultLocalTransitionConfigurer<S, E> extends AbstractTransitionCo
return this;
}
@Override
public LocalTransitionConfigurer<S, E> name(String name) {
setName(name);
return this;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -138,4 +138,13 @@ public interface TransitionConfigurer<T, S, E> extends
*/
T secured(String expression);
/**
* Specify a name for this {@link Transition}.
*
* @param name the name
* @return configurer for chaining
* @param name
* @return
*/
T name(String name);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -41,6 +41,7 @@ public class TransitionData<S, E> {
private final Function<StateContext<S, E>, Mono<Boolean>> guard;
private final TransitionKind kind;
private final SecurityRule securityRule;
private final String name;
/**
* Instantiates a new transition data.
@@ -50,7 +51,7 @@ public class TransitionData<S, E> {
* @param event the event
*/
public TransitionData(S source, S target, E event) {
this(source, target, null, event, null, null, null, null, TransitionKind.EXTERNAL, null);
this(source, target, null, event, null, null, null, null, TransitionKind.EXTERNAL, null, null);
}
/**
@@ -65,7 +66,23 @@ public class TransitionData<S, E> {
*/
public TransitionData(S source, S target, E event, Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind) {
this(source, target, null, event, null, null, actions, guard, kind, null);
this(source, target, null, event, null, null, actions, guard, kind, null, null);
}
/**
* Instantiates a new transition data.
*
* @param source the source
* @param target the target
* @param event the event
* @param actions the actions
* @param guard the guard
* @param kind the kind
* @param name the name
*/
public TransitionData(S source, S target, E event, Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, String name) {
this(source, target, null, event, null, null, actions, guard, kind, null, name);
}
/**
@@ -82,7 +99,25 @@ public class TransitionData<S, E> {
public TransitionData(S source, S target, Long period, Integer count,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind) {
this(source, target, null, null, period, count, actions, guard, kind, null);
this(source, target, null, null, period, count, actions, guard, kind, null, null);
}
/**
* Instantiates a new transition data.
*
* @param source the source
* @param target the target
* @param period the period
* @param count the count
* @param actions the actions
* @param guard the guard
* @param kind the kind
* @param name the name
*/
public TransitionData(S source, S target, Long period, Integer count,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, String name) {
this(source, target, null, null, period, count, actions, guard, kind, null, name);
}
/**
@@ -98,10 +133,11 @@ public class TransitionData<S, E> {
* @param guard the guard
* @param kind the kind
* @param securityRule the security rule
* @param name the name
*/
public TransitionData(S source, S target, S state, E event, Long period, Integer count,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, SecurityRule securityRule) {
Function<StateContext<S, E>, Mono<Boolean>> guard, TransitionKind kind, SecurityRule securityRule, String name) {
this.source = source;
this.target = target;
this.state = state;
@@ -112,6 +148,7 @@ public class TransitionData<S, E> {
this.guard = guard;
this.kind = kind;
this.securityRule = securityRule;
this.name = (name == null) ? "" : name;
}
/**
@@ -203,4 +240,13 @@ public class TransitionData<S, E> {
public SecurityRule getSecurityRule() {
return securityRule;
}
/**
* Gets the name,
*
* @return the name
*/
public String getName() {
return name;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 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.
@@ -27,6 +27,24 @@ import reactor.core.publisher.Mono;
public abstract class AbstractExternalTransition<S, E> extends AbstractTransition<S, E> {
/**
* Instantiates a new abstract external transition.
*
* @param source the source
* @param target the target
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public AbstractExternalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule, String name) {
super(source, target, actions, event, TransitionKind.EXTERNAL, guard, trigger, securityRule, name);
}
/**
* Instantiates a new abstract external transition.
*
@@ -41,7 +59,7 @@ public abstract class AbstractExternalTransition<S, E> extends AbstractTransitio
public AbstractExternalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule) {
super(source, target, actions, event, TransitionKind.EXTERNAL, guard, trigger, securityRule);
super(source, target, actions, event, TransitionKind.EXTERNAL, guard, trigger, securityRule, null);
}
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 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.
@@ -54,6 +54,23 @@ public class AbstractInternalTransition<S, E> extends AbstractTransition<S, E> {
public AbstractInternalTransition(State<S, E> source, Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
E event, Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger,
SecurityRule securityRule) {
super(source, source, actions, event, TransitionKind.INTERNAL, guard, trigger, securityRule);
super(source, source, actions, event, TransitionKind.INTERNAL, guard, trigger, securityRule, null);
}
/**
* Instantiates a new abstract internal transition.
*
* @param source the source
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public AbstractInternalTransition(State<S, E> source, Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
E event, Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger,
SecurityRule securityRule, String name) {
super(source, source, actions, event, TransitionKind.INTERNAL, guard, trigger, securityRule, name);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 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.
@@ -57,6 +57,24 @@ public class AbstractLocalTransition<S, E> extends AbstractTransition<S, E> {
public AbstractLocalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule) {
super(source, target, actions, event, TransitionKind.LOCAL, guard, trigger, securityRule);
super(source, target, actions, event, TransitionKind.LOCAL, guard, trigger, securityRule, null);
}
/**
* Instantiates a new abstract local transition.
*
* @param source the source
* @param target the target
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public AbstractLocalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule, String name) {
super(source, target, actions, event, TransitionKind.LOCAL, guard, trigger, securityRule, name);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -49,6 +49,7 @@ public abstract class AbstractTransition<S, E> implements Transition<S, E> {
private final Function<StateContext<S, E>, Mono<Boolean>> guard;
private final Trigger<S, E> trigger;
private final SecurityRule securityRule;
private final String name;
private CompositeActionListener<S, E> actionListener;
/**
@@ -65,7 +66,7 @@ public abstract class AbstractTransition<S, E> implements Transition<S, E> {
public AbstractTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event, TransitionKind kind,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger) {
this(source, target, actions, event, kind, guard, trigger, null);
this(source, target, actions, event, kind, guard, trigger, null, null);
}
/**
@@ -82,7 +83,7 @@ public abstract class AbstractTransition<S, E> implements Transition<S, E> {
*/
public AbstractTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event, TransitionKind kind,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule) {
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule, String name) {
Assert.notNull(kind, "Transition type must be set");
this.source = source;
this.target = target;
@@ -91,6 +92,7 @@ public abstract class AbstractTransition<S, E> implements Transition<S, E> {
this.guard = guard;
this.trigger = trigger;
this.securityRule = securityRule;
this.name = (name == null) ? "" : name;
}
@Override
@@ -135,6 +137,11 @@ public abstract class AbstractTransition<S, E> implements Transition<S, E> {
return target;
}
@Override
public String getName() {
return name;
}
@Override
public Collection<Function<StateContext<S, E>, Mono<Void>>> getActions() {
return actions;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -59,4 +59,22 @@ public class DefaultExternalTransition<S, E> extends AbstractExternalTransition<
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule) {
super(source, target, actions, event, guard, trigger, securityRule);
}
/**
* Instantiates a new default external transition.
*
* @param source the source
* @param target the target
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public DefaultExternalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule, String name) {
super(source, target, actions, event, guard, trigger, securityRule, name);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -56,4 +56,21 @@ public class DefaultInternalTransition<S, E> extends AbstractInternalTransition<
SecurityRule securityRule) {
super(source, actions, event, guard, trigger, securityRule);
}
/**
* Instantiates a new default internal transition.
*
* @param source the source
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public DefaultInternalTransition(State<S, E> source, Collection<Function<StateContext<S, E>, Mono<Void>>> actions,
E event, Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger,
SecurityRule securityRule, String name) {
super(source, actions, event, guard, trigger, securityRule, name);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -60,6 +60,24 @@ public class DefaultLocalTransition<S, E> extends AbstractLocalTransition<S, E>
super(source, target, actions, event, guard, trigger, securityRule);
}
/**
* Instantiates a new default local transition.
*
* @param source the source
* @param target the target
* @param actions the actions
* @param event the event
* @param guard the guard
* @param trigger the trigger
* @param securityRule the security rule
* @param name the name
*/
public DefaultLocalTransition(State<S, E> source, State<S, E> target,
Collection<Function<StateContext<S, E>, Mono<Void>>> actions, E event,
Function<StateContext<S, E>, Mono<Boolean>> guard, Trigger<S, E> trigger, SecurityRule securityRule, String name) {
super(source, target, actions, event, guard, trigger, securityRule, name);
}
@Override
public String toString() {
return "DefaultLocalTransition [getSource()=" + getSource() + ", getTarget()=" + getTarget() + "]";

View File

@@ -40,7 +40,7 @@ public class InitialTransition<S, E> extends AbstractTransition<S, E> {
* @param target the target
*/
public InitialTransition(State<S, E> target) {
super(null, target, null, null, TransitionKind.INITIAL, null, null, null);
super(null, target, null, null, TransitionKind.INITIAL, null, null, null, null);
}
/**
@@ -51,7 +51,7 @@ public class InitialTransition<S, E> extends AbstractTransition<S, E> {
*/
public InitialTransition(State<S, E> target, Function<StateContext<S, E>, Mono<Void>> action) {
super(null, target, action != null ? Collections.singleton(action) : null, null, TransitionKind.INITIAL, null,
null, null);
null, null, null);
}
/**
@@ -61,7 +61,7 @@ public class InitialTransition<S, E> extends AbstractTransition<S, E> {
* @param actions the actions
*/
public InitialTransition(State<S, E> target, Collection<Function<StateContext<S, E>, Mono<Void>>> actions) {
super(null, target, actions, null, TransitionKind.INITIAL, null, null, null);
super(null, target, actions, null, TransitionKind.INITIAL, null, null, null, null);
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -102,6 +102,13 @@ public interface Transition<S, E> {
*/
SecurityRule getSecurityRule();
/**
* Gets the name.
*
* @return the name
*/
String getName();
/**
* Adds the action listener.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -67,7 +67,7 @@ public class StateMachineModelTests {
Collection<TransitionData<String, String>> transitions = new ArrayList<>();
TransitionData<String, String> transitionData1 = new TransitionData<String, String>("S1", "S2", null, "E1", null, null, null, null, TransitionKind.EXTERNAL, null);
TransitionData<String, String> transitionData1 = new TransitionData<String, String>("S1", "S2", null, "E1", null, null, null, null, TransitionKind.EXTERNAL, null, "");
transitions.add(transitionData1);
Map<String, List<ChoiceData<String, String>>> choices = new HashMap<>();
Map<String, List<JunctionData<String, String>>> junctions = new HashMap<>();

View File

@@ -155,6 +155,11 @@ public class StateContextExpressionMethodsTests {
@Override
public void removeActionListener(ActionListener<SpelStates, SpelEvents> listener) {
}
@Override
public String getName() {
return "";
}
}
private static class MockStatemachine implements StateMachine<SpelStates, SpelEvents> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -432,13 +432,13 @@ public class UmlModelParser {
addTransitionData(new TransitionData<String, String>(resolveName(transition.getSource()),
cprentries.get(0).getName(), signal.getName(),
UmlUtils.resolveTransitionActionFunctions(transition, resolver), Guards.from(guard),
UmlUtils.mapUmlTransitionType(transition)));
UmlUtils.mapUmlTransitionType(transition), transition.getName()));
}
} else {
addTransitionData(new TransitionData<String, String>(resolveName(transition.getSource()),
resolveName(transition.getTarget()), signal.getName(),
UmlUtils.resolveTransitionActionFunctions(transition, resolver), Guards.from(guard),
UmlUtils.mapUmlTransitionType(transition)));
UmlUtils.mapUmlTransitionType(transition), transition.getName()));
}
}
} else if (event instanceof TimeEvent) {
@@ -451,7 +451,7 @@ public class UmlModelParser {
}
addTransitionData(new TransitionData<String, String>(resolveName(transition.getSource()),
resolveName(transition.getTarget()), period, count, UmlUtils.resolveTransitionActionFunctions(transition, resolver),
Guards.from(guard), UmlUtils.mapUmlTransitionType(transition)));
Guards.from(guard), UmlUtils.mapUmlTransitionType(transition), transition.getName()));
}
}
}
@@ -461,7 +461,7 @@ public class UmlModelParser {
addTransitionData(new TransitionData<String, String>(resolveName(transition.getSource()),
resolveName(transition.getTarget()), null,
UmlUtils.resolveTransitionActionFunctions(transition, resolver),
Guards.from(resolveGuard(transition)), UmlUtils.mapUmlTransitionType(transition)));
Guards.from(resolveGuard(transition)), UmlUtils.mapUmlTransitionType(transition), transition.getName()));
}
}
}