From e8d2e062e33981bf46cbaa35afcfdf5c2c9c0284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Sch=C3=B6nenberg?= Date: Wed, 14 Feb 2024 19:39:15 +0100 Subject: [PATCH] fix: add more TransferStates and add field for LogMessage of TransferState --- build.gradle.kts | 2 +- .../truzzt/extension/logginghouse/client/LogMessageSender.java | 2 ++ .../logginghouse/client/LoggingHouseClientExtension.java | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 614e88f..e368e93 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,7 +62,7 @@ subprojects { maven { name = "GitHubPackages" url = uri("https://maven.pkg.github.com/truzzt/mds-ap3") - version = "0.2.7" + version = "0.2.8" credentials { username = System.getenv("USERNAME") password = System.getenv("TOKEN") diff --git a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LogMessageSender.java b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LogMessageSender.java index 3fbb1d5..9153478 100644 --- a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LogMessageSender.java +++ b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LogMessageSender.java @@ -89,6 +89,8 @@ private String buildContractAgreementPayload(ContractAgreement contractAgreement private String buildTransferProcessPayload(TransferProcess transferProcess) { var jo = new JSONObject(); jo.put("transferProcessId", transferProcess.getId()); + jo.put("transferState", transferProcess.stateAsString()); + var dataRequest = transferProcess.getDataRequest(); jo.put("contractId", dataRequest.getContractId()); jo.put("connectorId", dataRequest.getConnectorId()); diff --git a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java index 383fb1d..ee0f230 100644 --- a/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java +++ b/logging-house-client/src/main/java/com/truzzt/extension/logginghouse/client/LoggingHouseClientExtension.java @@ -135,9 +135,10 @@ private void registerEventSubscriber(ServiceExtensionContext context) { eventRouter.registerSync(ContractNegotiationFinalized.class, eventSubscriber); eventRouter.registerSync(ContractNegotiationAgreed.class, eventSubscriber); eventRouter.registerSync(ContractNegotiationAccepted.class, eventSubscriber); - eventRouter.registerSync(TransferProcessCompleted.class, eventSubscriber); + eventRouter.registerSync(TransferProcessRequested.class, eventSubscriber); eventRouter.registerSync(TransferProcessInitiated.class, eventSubscriber); eventRouter.registerSync(TransferProcessStarted.class, eventSubscriber); + eventRouter.registerSync(TransferProcessCompleted.class, eventSubscriber); eventRouter.registerSync(TransferProcessFailed.class, eventSubscriber); eventRouter.registerSync(TransferProcessTerminated.class, eventSubscriber); context.registerService(IdsClearingHouseServiceImpl.class, eventSubscriber);