net.corda.core.protocols / ProtocolLogic / subProtocol

subProtocol

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

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

Parameters

shareParentSessions - In certain situations the need arises to use the same sessions the parent protocol has already established. However this also prevents the subprotocol from creating new sessions with those parties. For this reason the default value is false.