corda / net.corda.core.flows / ReceiveTransactionFlow


open class ReceiveTransactionFlow : FlowLogic<SignedTransaction>

The ReceiveTransactionFlow should be called in response to the SendTransactionFlow.

This flow is a combination of FlowSession.receive, resolve and SignedTransaction.verify. This flow will receive the SignedTransaction and perform the resolution back-and-forth required to check the dependencies and download any missing attachments. The flow will return the SignedTransaction after it is resolved and then verified using SignedTransaction.verify.

Please note that it will not store the transaction to the vault unless that is explicitly requested and checkSufficientSignatures is true. Setting statesToRecord to anything else when checkSufficientSignatures is false will not update the vault.

Attention: At the moment, this flow receives a SignedTransaction first thing and then proceeds by invoking a ResolveTransactionsFlow subflow. This is used as a criterion to identify cases, where a counterparty has failed notarising a transact



The ReceiveTransactionFlow should be called in response to the SendTransactionFlow.

ReceiveTransactionFlow(otherSideSession: FlowSession, checkSufficientSignatures: Boolean = true, statesToRecord: StatesToRecord = StatesToRecord.NONE)



This is where you fill out your business logic.

open fun call(): SignedTransaction


Hook to perform extra checks on the received transaction just before it's recorded. The transaction has already been resolved and verified at this point.

open fun checkBeforeRecording(stx: SignedTransaction): Unit

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