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>

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

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.

Inherited Properties

modification

val modification: M

originalState

val originalState: StateAndRef<S>

progressTracker

open val progressTracker: ProgressTracker

Override this to provide a ProgressTracker. If one is provided and stepped, the framework will do something helpful with the progress reports e.g record to the audit service. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.

Functions

assembleTx

fun assembleTx(): UpgradeTx

Build the upgrade transaction.

Inherited Functions

call

open fun call(): StateAndRef<T>

This is where you fill out your business logic.

getParticipantSessions

open fun getParticipantSessions(): List<<ERROR CLASS><FlowSession, List<AbstractParty>>>

Initiate sessions with parties we want signatures from.

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

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

receiveAll

fun FlowLogic<*>.receiveAll(session: <ERROR CLASS><FlowSession, Class<out Any>>, vararg sessions: <ERROR CLASS><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>>

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