com.r3corda.core.protocols / ProtocolLogic / subProtocol

subProtocol

fun <R> subProtocol(subLogic: ProtocolLogic<R>, inheritParentSessions: Boolean = false): R

Invokes the given subprotocol by simply passing through this ProtocolLogics reference to the ProtocolStateMachine and then calling the call method.

Parameters

inheritParentSessions - In certain situations the subprotocol needs to inherit and use the same open sessions of the parent. However in most cases this is not desirable as it prevents the subprotocol from communicating with the same party on a different topic. For this reason the default value is false.