corda / net.corda.core.flows / NotaryChangeFlow

NotaryChangeFlow

@InitiatingFlow class NotaryChangeFlow<out T : ContractState> : Instigator<T, T, Party>

A flow to be used for changing a state's Notary. This is required since all input states to a transaction must point to the same notary.

This assembles the transaction for notary replacement and sends out change proposals to all participants of that state. If participants agree to the proposed change, they each sign the transaction. Finally, the transaction containing all signatures is sent back to each participant so they can record it and use the new updated state for future transactions.

Constructors

<init>

A flow to be used for changing a state's Notary. This is required since all input states to a transaction must point to the same notary.

NotaryChangeFlow(originalState: StateAndRef<T>, newNotary: Party, progressTracker: ProgressTracker = AbstractStateReplacementFlow.Instigator.tracker())

Functions

assembleTx

Build the upgrade transaction.

fun assembleTx(): UpgradeTx

Extension Functions

receiveAll

Suspends until a message has been received for each session in the specified sessions.

fun FlowLogic<*>.receiveAll(session: Pair<FlowSession, Class<out Any>>, vararg sessions: Pair<FlowSession, Class<out Any>>): Map<FlowSession, UntrustworthyData<Any>>
fun <R : Any> FlowLogic<*>.receiveAll(receiveType: Class<R>, session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>
fun <R : Any> FlowLogic<*>.receiveAll(session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>