corda / net.corda.node / InteractiveShell / runFlowFromString

runFlowFromString

fun runFlowFromString(invoke: (FlowLogic<*>) -> FlowStateMachine<*>, inputData: String, clazz: Class<out FlowLogic<*>>, om: ObjectMapper = yamlInputMapper): FlowStateMachine<*>

Given a FlowLogic class and a string in one-line Yaml form, finds an applicable constructor and starts the flow, returning the created flow logic. Useful for lightweight invocation where text is preferable to statically typed, compiled code.

See the StringToMethodCallParser class to learn more about limitations and acceptable syntax.

Exceptions

NoApplicableConstructor - if no constructor could be found for the given set of types.