corda / net.corda.core.messaging / startFlow

startFlow

inline fun <T : Any, reified R : FlowLogic<T>> CordaRPCOps.startFlow(flowConstructor: () -> R): FlowHandle<T>

These allow type safe invocations of flows from Kotlin, e.g.:

val rpc: CordaRPCOps = (..) rpc.startFlow(::ResolveTransactionsFlow, setOf(), aliceIdentity)

Note that the passed in constructor function is only used for unification of other type parameters and reification of the Class instance of the flow. This could be changed to use the constructor function directly.

inline fun <T : Any, A, reified R : FlowLogic<T>> CordaRPCOps.startFlow(flowConstructor: (A) -> R, arg0: A): FlowHandle<T>
inline fun <T : Any, A, B, reified R : FlowLogic<T>> CordaRPCOps.startFlow(flowConstructor: (A, B) -> R, arg0: A, arg1: B): FlowHandle<T>
inline fun <T : Any, A, B, C, reified R : FlowLogic<T>> CordaRPCOps.startFlow(flowConstructor: (A, B, C) -> R, arg0: A, arg1: B, arg2: C): FlowHandle<T>
inline fun <T : Any, A, B, C, D, reified R : FlowLogic<T>> CordaRPCOps.startFlow(flowConstructor: (A, B, C, D) -> R, arg0: A, arg1: B, arg2: C, arg3: D): FlowHandle<T>