corda / net.corda.testing.node / StartedMockNode / registerInitiatedFlow

registerInitiatedFlow

fun <F : FlowLogic<*>> registerInitiatedFlow(initiatedFlowClass: Class<F>): Observable<F>

Manually register an initiating-responder flow pair based on the FlowLogic annotations.

NOTE: There is no need to call this method if the flow pair is defined in the CorDapp and the TestCordapp API is used.

Parameters

initiatedFlowClass - FlowLogic class which is annotated with InitiatedBy.

Return
An Observable which emits responder flows each time one is executed.

fun <F : FlowLogic<*>> registerInitiatedFlow(initiatingFlowClass: Class<out FlowLogic<*>>, initiatedFlowClass: Class<F>): Observable<F>

Register a custom relationship between initiating and receiving flow on a node-by-node basis. This is used when we want to manually specify that a particular initiating flow class will have a particular responder.

Note that this change affects only the node on which this method is called, and not the entire network.

Parameters

initiatingFlowClass - The FlowLogic-inheriting class to register a new responder for.

initiatedFlowClass - The class of the responder flow.

Return
An Observable which emits responder flows each time one is executed.