Nihhaar
Nihhaar

Reputation: 199

Starting a flow using Corda RPC

By reading the docs, it is clear that the only way to interact with corda is via RPC. If you want to interact via http, then we have to write a web server exposing specific endpoints.

I am trying to write a rpc client to start a flow in the cordapp without webserver.

rpcOps.startTrackedFlowDynamic(ExampleFlow.Initiator.class, iouValue, otherParty)

I couldn't understand properly here. Should I duplicate the ExampleFlow class both on client end and in the cordapp? What is the structure of rpcclient and cordapp in this case of not having a web server?

tl;dr Write a client to start a flow on already running corda node without webserver? Thanks

Upvotes: 1

Views: 343

Answers (1)

Joel
Joel

Reputation: 23140

Yes - currently, the client must depend on ExampleFlow.Initiator and have it available on the classpath. This is true whether it's a webserver or a regular command line client.

Upvotes: 2

Related Questions