corda / net.corda.core.flows / ReceiveFinalityFlow


class ReceiveFinalityFlow : FlowLogic<SignedTransaction>

The receiving counterpart to FinalityFlow.

All parties who are receiving a finalised transaction from a sender flow must subcall this flow in their own flows.

It's typical to have already signed the transaction proposal in the same workflow using SignTransactionFlow. If so then the transaction ID can be passed in as an extra check to ensure the finalised transaction is the one that was signed before it's committed to the vault.


otherSideSession - The session which is providing the transaction to record.

expectedTxId - Expected ID of the transaction that's about to be received. This is typically retrieved from SignTransactionFlow. Setting it to null disables the expected transaction ID check.

statesToRecord - Which states to commit to the vault. Defaults to StatesToRecord.ONLY_RELEVANT.



The receiving counterpart to FinalityFlow.

ReceiveFinalityFlow(otherSideSession: FlowSession, expectedTxId: SecureHash? = null, statesToRecord: StatesToRecord = ONLY_RELEVANT)



This is where you fill out your business logic.

fun call(): SignedTransaction

Extension Functions


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>>