Я недавно воссоздал демо-трейдер на Java. По какой-то причине транзакция не работает и выдается сообщение об ошибке: «java.lang.IllegalArgumentException: Не выполнено требование». Без дополнительной информации (обычно я ожидаю увидеть, какое требование не выполнено). Код выполняется до тех пор, пока не вызовет TwoPartyTradeFlow.Seller.
Это мой код в потоке. Поток вызывается из API, который передает «количество» и «другие части». Я получаю коммерческий документ, который я выпустил в другом потоке, который затем принадлежит продавцу, который хочет обменять его со стороной покупателя.
public Seller(int amount, Party otherParty) {
this.buyerParty = otherParty;
this.amount = amount;
}
@Suspendable
@Override
public SignedTransaction call() throws FlowException {
ServiceHub serviceHub = getServiceHub();
Logger logger = getLogger();
FlowSession otherPartySession = initiateFlow(buyerParty);
StateAndRef<CommercialPaper.State> cp = serviceHub.getVaultService().queryBy(CommercialPaper.State.class).getStates().stream().findFirst().get();
Amount<Currency> amountWithCurr = new Amount<>(amount, CHF);
PartyAndCertificate cpOwner = serviceHub.getKeyManagementService().freshKeyAndCert(getOurIdentityAndCert(), false);
final OpaqueBytes ref = OpaqueBytes.of((byte) 0x01);
PartyAndReference partyAndReference = new PartyAndReference(cpOwner.getParty(), ref);
progressTracker.setCurrentStep(RECEIVING_CASH);
otherPartySession.send(amount);
progressTracker.setCurrentStep(TRADING);
TwoPartyTradeFlow.Seller seller = new TwoPartyTradeFlow.Seller(
otherPartySession, cp, amountWithCurr, cpOwner, progressTracker.getChildProgressTracker(TRADING)
);
return subFlow(seller);
}
}
Это Stacktrace:
[1;31mE 13:59:46+0200 [qtp527148155-115] template.DVPApi.throwException -
java.lang.IllegalArgumentException: Failed requirement.
[m java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Failed requirement.
at java.util.concurrent.CompletableFuture.reportGet(Unknown Source) ~[?:1.8.0_161]
at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:1.8.0_161]
at net.corda.core.internal.concurrent.CordaFutureImpl.get(CordaFutureImpl.kt) ~[corda-core-2.0.0.jar:?]
at com.template.DVPApi.createDVP(DVPApi.java:152) [cordapp-0.1.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.25.jar:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.25.jar:?]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [jersey-container-servlet-core-2.25.jar:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [jersey-container-servlet-core-2.25.jar:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [jersey-container-servlet-core-2.25.jar:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [jersey-container-servlet-core-2.25.jar:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [jersey-container-servlet-core-2.25.jar:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) [jetty-servlet-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) [jetty-servlet-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [jetty-servlet-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.Server.handle(Server.java:561) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [jetty-server-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) [jetty-io-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104) [jetty-io-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) [jetty-io-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679) [jetty-util-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597) [jetty-util-9.4.7.v20170914.jar:9.4.7.v20170914]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
Caused by: java.lang.IllegalArgumentException: Failed requirement.
А вот код потока выпуска CommercialPaper в случае, если он неправильно выдает CommercialPaper и вызывает сбой TwoPartyTradeFlow.
public CommercialPaperIssueFlow(CordaX500Name recipientName, CordaX500Name issuerName, Amount<Currency> price) {
this.recipientName = recipientName;
this.issuerName = issuerName;
this.price = price;
}
@Suspendable
@Override
public SignedTransaction call() throws FlowException {
ServiceHub serviceHub = getServiceHub();
final Party notary = serviceHub.getNetworkMapCache().getNotaryIdentities().get(0);
final Party recipient = serviceHub.getNetworkMapCache().getPeerByLegalName(recipientName);
final Party issuer = serviceHub.getNetworkMapCache().getPeerByLegalName(issuerName);
CommercialPaper abstractCP = new CommercialPaper();
PartyAndReference partyAndReference = new PartyAndReference(issuer, ref);
Instant maturityDate = Instant.MAX;
final Amount<Issued<Currency>> faceValue = new Amount<Issued<Currency>>(price.getQuantity(),
price.getDisplayTokenSize(),
new Issued<Currency>(partyAndReference,
price.getToken()));
TransactionBuilder cpBuilder = abstractCP.generateIssue(partyAndReference,
faceValue, maturityDate, notary);
progressTracker.setCurrentStep(ISSUING_CP);
cpBuilder.setTimeWindow(Instant.now(), Duration.ofSeconds(100));
SignedTransaction partiallySignedCP = serviceHub.signInitialTransaction(cpBuilder);
SignedTransaction signedCP = subFlow(new FinalityFlow(partiallySignedCP));
progressTracker.setCurrentStep(MOVING_CP);
// Make transaction to move it to a new key
TransactionBuilder transactionBuilder = new TransactionBuilder(notary);
abstractCP.generateMove(transactionBuilder, signedCP.getTx().outRef(0), recipient);
SignedTransaction partiallySignedMoveCP = serviceHub.signInitialTransaction(transactionBuilder);
return subFlow(new FinalityFlow(partiallySignedMoveCP));
}
Заранее спасибо за любую предоставленную помощь, потому что я действительно не знаю, почему происходит эта ошибка.
Edit:
Вот Stacktrace из файла журнала:
[WARN ] 2018-05-09T17:09:12,893Z [Node thread] utilities.AppendOnlyPersistentMap.set - Double insert in net.corda.node.utilities.AppendOnlyPersistentMap for entity class class net.corda.node.services.identity.PersistentIdentityService$PersistentIdentityNames key C=US,L=New York,O=JonesBank, not inserting the second time
[WARN ] 2018-05-09T17:09:13,133Z [Node thread] flow.[13b767a6-8cd1-4747-867e-7ffe04ed99cb].run - Terminated by unexpected exception
java.lang.IllegalArgumentException: Failed requirement.
at net.corda.core.utilities.ProgressTracker.setCurrentStep(ProgressTracker.kt:108) ~[corda-core-2.0.0.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:91) ~[cordapp-0.1.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:26) ~[cordapp-0.1.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:41) [corda-node-2.0.0.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:69) [corda-node-2.0.0.jar:?]
[WARN ] 2018-05-09T17:09:13,543Z [Node thread] statemachine.StateMachineManager.onExistingSessionMessage - Received a session message for unknown session: SessionReject(initiatorSessionId=2776640309751674301, errorMessage=Unable to establish session), from C=GB,L=London,O=CreditSuisse
[INFO ] 2018-05-09T17:12:41,044Z [Node thread] vault.NodeVaultService._queryBy - Vault Query for contract type: class net.corda.finance.contracts.CommercialPaper$State, criteria: VaultQueryCriteria(status=UNCONSUMED, contractStateTypes=null, stateRefs=null, notary=null, softLockingCondition=null, timeCondition=null), pagination: PageSpecification(pageNumber=-1, pageSize=200), sorting: Sort(columns=[])
[WARN ] 2018-05-09T17:12:41,174Z [Node thread] utilities.AppendOnlyPersistentMap.set - Double insert in net.corda.node.utilities.AppendOnlyPersistentMap for entity class class net.corda.node.services.identity.PersistentIdentityService$PersistentIdentityNames key C=US,L=New York,O=JonesBank, not inserting the second time
[WARN ] 2018-05-09T17:12:41,265Z [Node thread] flow.[71832083-4910-416e-abb6-34a0cacfa7a5].run - Terminated by unexpected exception
java.lang.IllegalArgumentException: Failed requirement.
at net.corda.core.utilities.ProgressTracker.setCurrentStep(ProgressTracker.kt:108) ~[corda-core-2.0.0.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:91) ~[cordapp-0.1.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:26) ~[cordapp-0.1.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:41) [corda-node-2.0.0.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:69) [corda-node-2.0.0.jar:?]
[WARN ] 2018-05-09T17:12:41,368Z [Node thread] statemachine.StateMachineManager.onExistingSessionMessage - Received a session message for unknown session: SessionReject(initiatorSessionId=7653034215696783817, errorMessage=Unable to establish session), from C=GB,L=London,O=CreditSuisse
часть:
at net.corda.core.utilities.ProgressTracker.setCurrentStep(ProgressTracker.kt:108) ~[corda-core-2.0.0.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:91) ~[cordapp-0.1.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:26) ~[cordapp-0.1.jar:?]
Это важная часть, я думаю. Это происходит при вызове progressTracker.setCurrentStep (TRADING) в потоке.
Я инициализировал этот шаг так:
private final ProgressTracker.Step TRADING = new ProgressTracker.Step("Starting the trade flow") {
@Override public ProgressTracker childProgressTracker() {
return TwoPartyTradeFlow.Seller.Companion.tracker();
}
};
Редактировать 2:
Теперь, так как я избавился от этого исключения, есть еще одна ошибка, которая не позволяет совершить сделку. Контрагент отклоняет запрос сеанса с этим исключением: net.corda.core.flows.UnexpectedFlowEndException: Party C=GB,L=London,O=CreditSuisse rejected session request: Unable to establish session
.
Вот новейшая Stacktrace:
[INFO ] 2018-05-13T12:53:08,723Z [Node thread] flow.[5b805998-3822-49b3-b12f-4bb306cbbc49].call - successfully instantiated seller, now invoking
[WARN ] 2018-05-13T12:53:08,997Z [Node thread] flow.[5b805998-3822-49b3-b12f-4bb306cbbc49].run - Terminated by unexpected exception
net.corda.core.flows.UnexpectedFlowEndException: Party C=GB,L=London,O=CreditSuisse rejected session request: Unable to establish session
at net.corda.node.services.statemachine.FlowStateMachineImpl.waitForConfirmation(FlowStateMachineImpl.kt:309) ~[corda-node-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.getConfirmedSessionIfPresent(FlowStateMachineImpl.kt:344) ~[corda-node-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.sendAndReceive(FlowStateMachineImpl.kt:182) ~[corda-node-2.0.0.jar:?]
at net.corda.core.internal.FlowStateMachine$DefaultImpls.sendAndReceive$default(FlowStateMachine.kt:28) ~[corda-core-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowSessionImpl.sendAndReceive(FlowSessionImpl.kt:22) ~[corda-node-2.0.0.jar:?]
at net.corda.core.flows.DataVendingFlow.sendPayloadAndReceiveDataRequest(SendTransactionFlow.kt:70) ~[corda-core-2.0.0.jar:?]
at net.corda.core.flows.DataVendingFlow.call(SendTransactionFlow.kt:48) ~[corda-core-2.0.0.jar:?]
at net.corda.core.flows.DataVendingFlow.call(SendTransactionFlow.kt:31) ~[corda-core-2.0.0.jar:?]
at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:243) ~[corda-core-2.0.0.jar:?]
at net.corda.finance.flows.TwoPartyTradeFlow$Seller.call(TwoPartyTradeFlow.kt:84) ~[corda-finance-2.0.0.jar:?]
at net.corda.finance.flows.TwoPartyTradeFlow$Seller.call(TwoPartyTradeFlow.kt:58) ~[corda-finance-2.0.0.jar:?]
at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:243) ~[corda-core-2.0.0.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:83) ~[cordapp-0.1.jar:?]
at com.template.TxInitiatorFlow$Seller.call(TxInitiatorFlow.java:25) ~[cordapp-0.1.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-2.0.0.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:41) [corda-node-2.0.0.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:69) [corda-node-2.0.0.jar:?]
Ошибка выдается продавцу в потоке при звонке return subFlow(seller);
А для полноты вот поток контрагента:
@InitiatedBy(Seller.class)
public static class Buyer extends FlowLogic<SignedTransaction> {
private FlowSession otherPartyFlow;
private Logger logger = getLogger();
public Buyer(FlowSession otherPartyFlow) {
this.otherPartyFlow = otherPartyFlow;
}
private final ProgressTracker.Step SENDING_CASH = new ProgressTracker.Step("Sending Cash");
private final ProgressTracker progressTracker = new ProgressTracker(SENDING_CASH);
@Suspendable
@Override
public SignedTransaction call() throws FlowException{
ServiceHub serviceHub = getServiceHub();
progressTracker.setCurrentStep(SENDING_CASH);
Amount<Currency> amount = otherPartyFlow.receive(Amount.class).unwrap(data -> data);
Party notary = serviceHub.getNetworkMapCache().getNotaryIdentities().get(0);
TwoPartyTradeFlow.Buyer buyer = new TwoPartyTradeFlow.Buyer(
otherPartyFlow, notary, amount, CommercialPaper.State.class
);
SignedTransaction tradeTX = subFlow(buyer);
return tradeTX;
}
}
Что не так с моей сессией?