mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
NOTICK Fix KilledFlowTransition
after merge
This commit is contained in:
@ -25,10 +25,11 @@ class KilledFlowTransition(
|
|||||||
val killedFlowErrorMessage = createErrorMessageFromError(killedFlowError)
|
val killedFlowErrorMessage = createErrorMessageFromError(killedFlowError)
|
||||||
val errorMessages = listOf(killedFlowErrorMessage)
|
val errorMessages = listOf(killedFlowErrorMessage)
|
||||||
|
|
||||||
val (initiatedSessions, newSessions) = bufferErrorMessagesInInitiatingSessions(startingState.checkpoint.sessions, errorMessages)
|
val (initiatedSessions, newSessions) = bufferErrorMessagesInInitiatingSessions(
|
||||||
val newCheckpoint = startingState.checkpoint.copy(
|
startingState.checkpoint.checkpointState.sessions,
|
||||||
sessions = newSessions
|
errorMessages
|
||||||
)
|
)
|
||||||
|
val newCheckpoint = startingState.checkpoint.setSessions(sessions = newSessions)
|
||||||
currentState = currentState.copy(checkpoint = newCheckpoint)
|
currentState = currentState.copy(checkpoint = newCheckpoint)
|
||||||
actions.add(
|
actions.add(
|
||||||
Action.PropagateErrors(
|
Action.PropagateErrors(
|
||||||
@ -42,7 +43,7 @@ class KilledFlowTransition(
|
|||||||
actions.add(Action.CreateTransaction)
|
actions.add(Action.CreateTransaction)
|
||||||
}
|
}
|
||||||
// The checkpoint and soft locks are also removed directly in [StateMachineManager.killFlow]
|
// The checkpoint and soft locks are also removed directly in [StateMachineManager.killFlow]
|
||||||
if(startingState.isAnyCheckpointPersisted) {
|
if (startingState.isAnyCheckpointPersisted) {
|
||||||
actions.add(Action.RemoveCheckpoint(context.id))
|
actions.add(Action.RemoveCheckpoint(context.id))
|
||||||
}
|
}
|
||||||
actions.addAll(
|
actions.addAll(
|
||||||
@ -51,7 +52,7 @@ class KilledFlowTransition(
|
|||||||
Action.ReleaseSoftLocks(context.id.uuid),
|
Action.ReleaseSoftLocks(context.id.uuid),
|
||||||
Action.CommitTransaction,
|
Action.CommitTransaction,
|
||||||
Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers),
|
Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers),
|
||||||
Action.RemoveSessionBindings(currentState.checkpoint.sessions.keys)
|
Action.RemoveSessionBindings(currentState.checkpoint.checkpointState.sessions.keys)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user