Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Update TODOs #19
Browse files Browse the repository at this point in the history
  • Loading branch information
tdauth committed Apr 16, 2019
1 parent 9eb2682 commit 7f4e165
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ object Example extends App {

val startState = stateMachine.getState(startSutState)
val numberOfOutgoingActionTransitions = startState.getOutgoingActionTransitions.size
println(s"Number of outgoing action transitions: $numberOfOutgoingActionTransitions") // TODO #19 No outgoing actions.
println(s"Number of outgoing action transitions: $numberOfOutgoingActionTransitions")

val endState = stateMachine.getState(endSutState)
val numberOfIncomingActionTransitions = endState.getIncomingActionTransitions.size
println(s"Number of incoming action transitions: $numberOfOutgoingActionTransitions") // TODO #19 No incoming actions.
println(s"Number of incoming action transitions: $numberOfOutgoingActionTransitions")

println(s"All states after executing action0: ${stateMachine.getAllStates.size}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class GuiStateMachineApiNeo4J extends GuiStateMachineApi {

override def removeStateMachine(name: String): Boolean = stateMachines.remove(name) match {
case Some(stateMachine) =>
// TODO #19 Should we remove the state machine from the disk?
stateMachine.clear()
val uri = getUri(name)
Neo4jSessionFactory.getSessionFactoryEmbedded(uri).close()
Expand All @@ -35,7 +36,7 @@ class GuiStateMachineApiNeo4J extends GuiStateMachineApi {

override def clear(): Unit = stateMachines.keySet foreach { name => // TODO #19 keys can be modified concurrently. So we might not remove all state machines?
removeStateMachine(name)
} // TODO #19 Removes from disk?
}

private def getUri(name: String): String = new File(name).toURI.toString
}

0 comments on commit 7f4e165

Please sign in to comment.