Add repository config transition type
- Add transition type to RepositoryTransition - Relates to #262
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user