corda / net.corda.core.flows / SendTransactionFlow

SendTransactionFlow

open class SendTransactionFlow : DataVendingFlow

The SendTransactionFlow should be used to send a transaction to another peer that wishes to verify that transaction's integrity by resolving and checking the dependencies as well. The other side should invoke ReceiveTransactionFlow at the right point in the conversation to receive the sent transaction and perform the resolution back-and-forth required to check the dependencies and download any missing attachments.

Parameters

stx - the SignedTransaction being sent to the otherSessions.

participantSessions - the target parties which are participants to the transaction.

observerSessions - the target parties which are observers to the transaction.

senderStatesToRecord - the StatesToRecord relevancy information of the sender.

recordMetaDataEvenIfNotFullySigned - whether to store recovery metadata when a txn is not fully signed.

Constructors

<init>

SendTransactionFlow(otherSide: FlowSession, stx: SignedTransaction)

The SendTransactionFlow should be used to send a transaction to another peer that wishes to verify that transaction's integrity by resolving and checking the dependencies as well. The other side should invoke ReceiveTransactionFlow at the right point in the conversation to receive the sent transaction and perform the resolution back-and-forth required to check the dependencies and download any missing attachments.

SendTransactionFlow(stx: SignedTransaction, participantSessions: Set<FlowSession>, observerSessions: Set<FlowSession>, senderStatesToRecord: StatesToRecord, recordMetaDataEvenIfNotFullySigned: Boolean = false)

Properties

observerSessions

the target parties which are observers to the transaction.

val observerSessions: Set<FlowSession>

participantSessions

the target parties which are participants to the transaction.

val participantSessions: Set<FlowSession>

senderStatesToRecord

the StatesToRecord relevancy information of the sender.

val senderStatesToRecord: StatesToRecord

stx

the SignedTransaction being sent to the otherSessions.

val stx: SignedTransaction

Companion Object Properties

DUMMY_PARTICIPANT_NAME

val DUMMY_PARTICIPANT_NAME: CordaX500Name

Companion Object Functions

makeMetaData

fun makeMetaData(stx: SignedTransaction, recordMetaDataEvenIfNotFullySigned: Boolean, senderStatesToRecord: StatesToRecord, participantSessions: Set<FlowSession>, observerSessions: Set<FlowSession>): TransactionMetadata?

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