Joel
Joel

Reputation: 23140

How can I test two different responder flows in the same CorDapp?

I have the following series of flows:

Normally, the two response flows would be defined in separate CorDapps. However, for testing purposes, I have defined them in the same file.

When I run flow tests, I get the error below. How can I fix this?

java.lang.IllegalArgumentException: com.template.Initiator has been specified as the initiating flow by both com.template.BobResponder and com.template.AliceResponder

Upvotes: -1

Views: 260

Answers (1)

Joel
Joel

Reputation: 23140

You need to define your responders in different packages. For example, if AliceFlow is defined in com.template, BobFlow could be defined in com.template2.

Then, in your flows, register both packages:

setCordappPackages("com.template", "com.template2")

Upvotes: 1

Related Questions