rename GameBoardActionFlow to GameBoardCommandFlow
This commit is contained in:
parent
9a49e68a1f
commit
fdfcd711a7
@ -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();
|
||||
|
@ -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"
|
||||
|
@ -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);
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user