net.corda.core.flows / FlowLogic / subFlow

# subFlow

`fun <R> subFlow(subLogic: FlowLogic<R>, shareParentSessions: Boolean = false): R`

Invokes the given subflow by simply passing through this FlowLogics reference to the FlowStateMachine and then calling the call method.

### Parameters

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