Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Extending and overriding Flows - Overriding a base Responder Flow
@InitiatedBy(SendMessageFlow::class)
class OverridingResponder(private val session: FlowSession) :
FlowLogic<Unit>() {
@Suspendable
override fun call() {
val stx = subFlow(object : SignTransactionFlow(session) {
override fun checkTransaction(stx: SignedTransaction) {}
})
logger.info("Screw the original responder. I'll build my own responder... with blackjack and hookers!")
subFlow(
ReceiveFinalityFlow(
otherSideSession = session,
expectedTxId = stx.id
)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.