I have the following series of flows:
Initiator
, my initiating flowAliceFlow
, which one counterparty uses to respond toInitiator
BobFlow
, which the other counterparty uses to respond toInitiator
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
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")
来源:https://stackoverflow.com/questions/48790458/how-can-i-test-two-different-responder-flows-in-the-same-cordapp