CordaRPCOps.startFlowDynamicWithClientId - corda

corda / net.corda.core.messaging / CordaRPCOps / startFlowDynamicWithClientId

# startFlowDynamicWithClientId

`@RPCReturnsObservables abstract fun <T> startFlowDynamicWithClientId(clientId: String, logicType: Class<out FlowLogic<T>>, vararg args: Any?): FlowHandleWithClientId<T>`

Start the given flow with the given arguments and a clientId.

The flow's result/ exception will be available for the client to re-connect and retrieve even after the flow's lifetime, by re-calling startFlowDynamicWithClientId with the same clientId. The logicType and args will be ignored if the clientId matches an existing flow. If you don't have the original values, consider using reattachFlowWithClientId.

Upon calling removeClientId, the node's resources holding the result/ exception will be freed and the result/ exception will no longer be available.

logicType must be annotated with net.corda.core.flows.StartableByRPC.

### Parameters

`clientId` - The client id to relate the flow to (or is already related to if the flow already exists)

`logicType` - The FlowLogic to start

`args` - The arguments to pass to the flow