mirror of
https://github.com/corda/corda.git
synced 2025-04-16 07:27:17 +00:00
CORDA-3597 add missed data to checkpoint class (#5995)
* Add extra fields to StateMachineState * Move structures into checkpoint as this is a more natural place.
This commit is contained in:
parent
8d1b6cf499
commit
9d4d128f4e
@ -7,6 +7,7 @@ import net.corda.core.utilities.ProgressTracker
|
||||
import net.corda.core.utilities.debug
|
||||
import net.corda.node.services.api.CheckpointStorage
|
||||
import net.corda.node.services.statemachine.Checkpoint
|
||||
import net.corda.node.services.statemachine.Checkpoint.FlowStatus
|
||||
import net.corda.nodeapi.internal.persistence.NODE_DATABASE_PREFIX
|
||||
import net.corda.nodeapi.internal.persistence.currentDBSession
|
||||
import org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY
|
||||
@ -33,15 +34,6 @@ import javax.persistence.OneToOne
|
||||
class DBCheckpointStorage : CheckpointStorage {
|
||||
val log: Logger = LoggerFactory.getLogger(this::class.java)
|
||||
|
||||
enum class FlowStatus {
|
||||
RUNNABLE,
|
||||
FAILED,
|
||||
COMPLETED,
|
||||
HOSPITALIZED,
|
||||
KILLED,
|
||||
PAUSED
|
||||
}
|
||||
|
||||
enum class StartReason {
|
||||
RPC, FLOW, SERVICE, SCHEDULED, INITIATED
|
||||
}
|
||||
|
@ -54,8 +54,20 @@ data class Checkpoint(
|
||||
val checkpointState: CheckpointState,
|
||||
val flowState: FlowState,
|
||||
val errorState: ErrorState,
|
||||
val result: Any? = null
|
||||
val result: Any? = null,
|
||||
val status: FlowStatus = FlowStatus.RUNNABLE,
|
||||
val progressStep: String? = null,
|
||||
val flowIoRequest: FlowIORequest<*>? = null,
|
||||
val compatible: Boolean = true
|
||||
) {
|
||||
enum class FlowStatus {
|
||||
RUNNABLE,
|
||||
FAILED,
|
||||
COMPLETED,
|
||||
HOSPITALIZED,
|
||||
KILLED,
|
||||
PAUSED
|
||||
}
|
||||
|
||||
val timestamp: Instant = Instant.now() // This will get updated every time a Checkpoint object is created/ created by copy.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user