corda / net.corda.core.flows / AbstractStateReplacementFlow

AbstractStateReplacementFlow

abstract class AbstractStateReplacementFlow

Abstract flow to be used for replacing one state with another, for example when changing the notary of a state. Notably this requires a one to one replacement of states, states cannot be split, merged or issued as part of these flows.

Types

Acceptor

abstract class Acceptor<in T> : FlowLogic<Void?>

Instigator

abstract class Instigator<out S : ContractState, out T : ContractState, out M> : FlowLogic<StateAndRef<T>>

The Instigator assembles the transaction for state replacement and sends out change proposals to all participants (Acceptor) of that state. If participants agree to the proposed change, they each sign the transaction. Finally, Instigator sends the transaction containing all participants' signatures to the notary for signature, and then back to each participant so they can record it and use the new updated state for future transactions.

Proposal

data class Proposal<out M>

The Proposal contains the details of proposed state modification. This is the message sent by the Instigator to all participants(Acceptor) during the state replacement process.

UpgradeTx

data class UpgradeTx

The assembled transaction for upgrading a contract.

Constructors

<init>

AbstractStateReplacementFlow()

Abstract flow to be used for replacing one state with another, for example when changing the notary of a state. Notably this requires a one to one replacement of states, states cannot be split, merged or issued as part of these flows.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.