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(
|
final RequestBody requestBody = new RequestBody(
|
||||||
"gp.reject-" +UUID.randomUUID(),
|
"gp.reject-" +UUID.randomUUID(),
|
||||||
"djmil.cordacheckers.gameproposal.ActionFlow",
|
"djmil.cordacheckers.gameproposal.CommandFlow",
|
||||||
new GameProposalActionReq(
|
new GameProposalActionReq(
|
||||||
gameProposalUuid.toString(),
|
gameProposalUuid.toString(),
|
||||||
Command.REJECT
|
Command.REJECT
|
||||||
@ -143,8 +143,8 @@ public class CordaClient {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (actionResult.failureStatus() != null) {
|
if (actionResult.failureStatus() != null) {
|
||||||
System.out.println("GameProposal.ActionFlow failed: " + actionResult.failureStatus());
|
System.out.println("GameProposal.CommandFlow failed: " + actionResult.failureStatus());
|
||||||
throw new RuntimeException("GameProsal: ActionFlow execution has failed");
|
throw new RuntimeException("GameProsal: CommandFlow execution has failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return actionResult.successStatus();
|
return actionResult.successStatus();
|
||||||
@ -156,7 +156,7 @@ public class CordaClient {
|
|||||||
) {
|
) {
|
||||||
final RequestBody requestBody = new RequestBody(
|
final RequestBody requestBody = new RequestBody(
|
||||||
"gp.accept-" +UUID.randomUUID(),
|
"gp.accept-" +UUID.randomUUID(),
|
||||||
"djmil.cordacheckers.gameproposal.ActionFlow",
|
"djmil.cordacheckers.gameproposal.CommandFlow",
|
||||||
new GameProposalActionReq(
|
new GameProposalActionReq(
|
||||||
gameProposalUuid.toString(),
|
gameProposalUuid.toString(),
|
||||||
Command.ACCEPT
|
Command.ACCEPT
|
||||||
@ -170,8 +170,8 @@ public class CordaClient {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (actionResult.failureStatus() != null) {
|
if (actionResult.failureStatus() != null) {
|
||||||
System.out.println("GameProposal.ActionFlow failed: " + actionResult.failureStatus());
|
System.out.println("GameProposal.CommandFlow failed: " + actionResult.failureStatus());
|
||||||
throw new RuntimeException("GameProsal: ActionFlow execution has failed");
|
throw new RuntimeException("GameProsal: CommandFlow execution has failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return actionResult.successStatus();
|
return actionResult.successStatus();
|
||||||
|
@ -20,7 +20,7 @@ allprojects {
|
|||||||
cordaClusterURL = "https://localhost:8888"
|
cordaClusterURL = "https://localhost:8888"
|
||||||
networkConfigFile = "$rootDir/config/static-network-config.json"
|
networkConfigFile = "$rootDir/config/static-network-config.json"
|
||||||
r3RootCertFile = "config/r3-ca-key.pem"
|
r3RootCertFile = "config/r3-ca-key.pem"
|
||||||
corDappCpiName = "MyCorDapp"
|
corDappCpiName = "CordaCheckers"
|
||||||
notaryCpiName = "NotaryServer"
|
notaryCpiName = "NotaryServer"
|
||||||
cordaRpcUser = "admin"
|
cordaRpcUser = "admin"
|
||||||
cordaRpcPasswd ="admin"
|
cordaRpcPasswd ="admin"
|
||||||
|
@ -24,9 +24,9 @@ import net.corda.v5.ledger.utxo.transaction.UtxoTransactionBuilder;
|
|||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
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
|
@CordaInject
|
||||||
public JsonMarshallingService jsonMarshallingService;
|
public JsonMarshallingService jsonMarshallingService;
|
||||||
@ -41,7 +41,7 @@ public class ActionFlow implements ClientStartableFlow {
|
|||||||
@Suspendable
|
@Suspendable
|
||||||
public String call(ClientRequestBody requestBody) {
|
public String call(ClientRequestBody requestBody) {
|
||||||
try {
|
try {
|
||||||
final ActionFlowArgs args = requestBody.getRequestBodyAs(jsonMarshallingService, ActionFlowArgs.class);
|
final CommandFlowArgs args = requestBody.getRequestBodyAs(jsonMarshallingService, CommandFlowArgs.class);
|
||||||
final GameProposalCommand command = args.getCommand();
|
final GameProposalCommand command = args.getCommand();
|
||||||
|
|
||||||
System.out.println("Game Proposal command" + command);
|
System.out.println("Game Proposal command" + command);
|
@ -4,12 +4,12 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import djmil.cordacheckers.contracts.GameProposalCommand;
|
import djmil.cordacheckers.contracts.GameProposalCommand;
|
||||||
|
|
||||||
public class ActionFlowArgs {
|
public class CommandFlowArgs {
|
||||||
private UUID gameProposalUuid;
|
private UUID gameProposalUuid;
|
||||||
private String command;
|
private String command;
|
||||||
|
|
||||||
// Serialisation service requires a default constructor
|
// Serialisation service requires a default constructor
|
||||||
public ActionFlowArgs() {
|
public CommandFlowArgs() {
|
||||||
this.gameProposalUuid = null;
|
this.gameProposalUuid = null;
|
||||||
this.command = null;
|
this.command = null;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user