Fix parent state ref
- For RepositoryState, its parent state is now defined as RepositoryState as well allowing to reference from a json files. - Relates to #262
This commit is contained in:
@@ -30,7 +30,7 @@ public abstract class RepositoryState extends BaseRepositoryEntity {
|
||||
*
|
||||
* @return the parent state
|
||||
*/
|
||||
public abstract String getParentState();
|
||||
public abstract RepositoryState getParentState();
|
||||
|
||||
/**
|
||||
* Gets the machine id.
|
||||
|
||||
@@ -132,7 +132,9 @@ public class RepositoryStateMachineModelFactory extends AbstractStateMachineMode
|
||||
}
|
||||
}
|
||||
|
||||
StateData<String,String> stateData = new StateData<String, String>(s.getParentState(), null, s.getState(), s.isInitial());
|
||||
RepositoryState parentState = s.getParentState();
|
||||
StateData<String, String> stateData = new StateData<String, String>(parentState != null ? parentState.getState() : null, null,
|
||||
s.getState(), s.isInitial());
|
||||
stateData.setStateActions(stateActions);
|
||||
stateData.setEntryActions(entryActions);
|
||||
stateData.setExitActions(exitActions);
|
||||
|
||||
Reference in New Issue
Block a user