Add information on why state machine was removed from StateMachineManager (#570)

* Add information on why state machine was removed from StateMachineManager.
There are two cases: normal end of flow or error.

Return flow result as part of state machine remove data.

Make Change a sealed class with Add and Remove.

fiber.actionOnEnd takes ErrorOr<R> parameter.

* Remove unnecessary fields from StateMachineManager.Change.
This commit is contained in:
Katarzyna Streich
2017-04-25 14:34:45 +01:00
committed by GitHub
parent b597f05bd4
commit f92949d3b5
10 changed files with 39 additions and 37 deletions

View File

@ -1,6 +1,7 @@
package net.corda.core.messaging
import com.google.common.util.concurrent.ListenableFuture
import net.corda.core.ErrorOr
import net.corda.core.contracts.Amount
import net.corda.core.contracts.ContractState
import net.corda.core.contracts.StateAndRef
@ -41,7 +42,7 @@ sealed class StateMachineUpdate {
override val id: StateMachineRunId get() = stateMachineInfo.id
}
data class Removed(override val id: StateMachineRunId) : StateMachineUpdate()
data class Removed(override val id: StateMachineRunId, val result: ErrorOr<*>) : StateMachineUpdate()
}
/**