diff --git a/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java b/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java index b581008..b022588 100644 --- a/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java +++ b/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java @@ -129,7 +129,7 @@ public class CordaClient { ) { final RequestBody requestBody = new RequestBody( "gp.reject-" +UUID.randomUUID(), - "djmil.cordacheckers.gameproposal.ActionFlow", + "djmil.cordacheckers.gameproposal.CommandFlow", new GameProposalActionReq( gameProposalUuid.toString(), Command.REJECT @@ -143,8 +143,8 @@ public class CordaClient { ); if (actionResult.failureStatus() != null) { - System.out.println("GameProposal.ActionFlow failed: " + actionResult.failureStatus()); - throw new RuntimeException("GameProsal: ActionFlow execution has failed"); + System.out.println("GameProposal.CommandFlow failed: " + actionResult.failureStatus()); + throw new RuntimeException("GameProsal: CommandFlow execution has failed"); } return actionResult.successStatus(); @@ -156,7 +156,7 @@ public class CordaClient { ) { final RequestBody requestBody = new RequestBody( "gp.accept-" +UUID.randomUUID(), - "djmil.cordacheckers.gameproposal.ActionFlow", + "djmil.cordacheckers.gameproposal.CommandFlow", new GameProposalActionReq( gameProposalUuid.toString(), Command.ACCEPT @@ -170,8 +170,8 @@ public class CordaClient { ); if (actionResult.failureStatus() != null) { - System.out.println("GameProposal.ActionFlow failed: " + actionResult.failureStatus()); - throw new RuntimeException("GameProsal: ActionFlow execution has failed"); + System.out.println("GameProposal.CommandFlow failed: " + actionResult.failureStatus()); + throw new RuntimeException("GameProsal: CommandFlow execution has failed"); } return actionResult.successStatus(); diff --git a/corda/build.gradle b/corda/build.gradle index c4e9019..b0b4caa 100644 --- a/corda/build.gradle +++ b/corda/build.gradle @@ -20,7 +20,7 @@ allprojects { cordaClusterURL = "https://localhost:8888" networkConfigFile = "$rootDir/config/static-network-config.json" r3RootCertFile = "config/r3-ca-key.pem" - corDappCpiName = "MyCorDapp" + corDappCpiName = "CordaCheckers" notaryCpiName = "NotaryServer" cordaRpcUser = "admin" cordaRpcPasswd ="admin" diff --git a/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlow.java b/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlow.java similarity index 94% rename from corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlow.java rename to corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlow.java index 5d96b1a..4ed511b 100644 --- a/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlow.java +++ b/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlow.java @@ -24,9 +24,9 @@ import net.corda.v5.ledger.utxo.transaction.UtxoTransactionBuilder; import java.time.Duration; import java.time.Instant; -public class ActionFlow implements ClientStartableFlow { +public class CommandFlow implements ClientStartableFlow { - private final static Logger log = LoggerFactory.getLogger(ActionFlow.class); + private final static Logger log = LoggerFactory.getLogger(CommandFlow.class); @CordaInject public JsonMarshallingService jsonMarshallingService; @@ -41,7 +41,7 @@ public class ActionFlow implements ClientStartableFlow { @Suspendable public String call(ClientRequestBody requestBody) { try { - final ActionFlowArgs args = requestBody.getRequestBodyAs(jsonMarshallingService, ActionFlowArgs.class); + final CommandFlowArgs args = requestBody.getRequestBodyAs(jsonMarshallingService, CommandFlowArgs.class); final GameProposalCommand command = args.getCommand(); System.out.println("Game Proposal command" + command); diff --git a/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlowArgs.java b/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlowArgs.java similarity index 89% rename from corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlowArgs.java rename to corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlowArgs.java index 1210f6f..e3fc351 100644 --- a/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/ActionFlowArgs.java +++ b/corda/workflows/src/main/java/djmil/cordacheckers/gameproposal/CommandFlowArgs.java @@ -4,12 +4,12 @@ import java.util.UUID; import djmil.cordacheckers.contracts.GameProposalCommand; -public class ActionFlowArgs { +public class CommandFlowArgs { private UUID gameProposalUuid; private String command; // Serialisation service requires a default constructor - public ActionFlowArgs() { + public CommandFlowArgs() { this.gameProposalUuid = null; this.command = null; }