Add repository config transition type

- Add transition type to RepositoryTransition
- Relates to #262
This commit is contained in:
Janne Valkealahti
2016-10-02 15:30:01 +01:00
parent 0b6f67ece4
commit ddf81c78a0
7 changed files with 39 additions and 4 deletions

View File

@@ -160,7 +160,8 @@ public class RepositoryStateMachineModelFactory extends AbstractStateMachineMode
}
}
transitionData.add(new TransitionData<>(t.getSource(), t.getTarget(), t.getEvent(), actions, null, TransitionKind.EXTERNAL));
TransitionKind kind = t.getKind();
transitionData.add(new TransitionData<>(t.getSource(), t.getTarget(), t.getEvent(), actions, null, kind != null ? kind : TransitionKind.EXTERNAL));
}
TransitionsData<String, String> transitionsData = new TransitionsData<>(transitionData);

View File

@@ -17,6 +17,8 @@ package org.springframework.statemachine.data;
import java.util.Set;
import org.springframework.statemachine.transition.TransitionKind;
/**
* Generic interface representing transition entity.
*
@@ -59,4 +61,11 @@ public interface RepositoryTransition {
* @return the actions
*/
Set<? extends RepositoryAction> getActions();
/**
* Gets the transition kind.
*
* @return the transition kind
*/
TransitionKind getKind();
}