From 7c1dde2e9d92998b9f99a162449ba22dd6ad9c18 Mon Sep 17 00:00:00 2001 From: mattbradburyr3 Date: Mon, 20 Mar 2023 16:48:26 +0000 Subject: [PATCH 1/2] typos in comments --- .../csdetemplate/flowexample/workflows/MyFirstFlow.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java index d8b6752..254bc8a 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java @@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory; // MyFirstFlow is an initiating flow, it's corresponding responder flow is called MyFirstFlowResponder (defined below) // to link the two sides of the flow together they need to have the same protocol. @InitiatingFlow(protocol = "my-first-flow") -// MyFirstFlow should inherit from RPCStartableFlow, which tells Corda it can be started via an RPC call +// MyFirstFlow should inherit from ClientStartableFlow, which tells Corda it can be started via an RPC call public class MyFirstFlow implements ClientStartableFlow { // Log messages from the flows for debugging. @@ -79,8 +79,7 @@ public class MyFirstFlow implements ClientStartableFlow { Message response = session.receive(Message.class); // The return value of a RPCStartableFlow must always be a String. This will be passed - // back as the REST RPC response when the status of the flow is queried on Corda, or as the return - // value from the flow when testing using the simulator. + // back as the REST RPC response when the status of the flow is queried on Corda. return response.getMessage(); } } @@ -90,7 +89,7 @@ RequestBody for triggering the flow via http-rpc: { "clientRequestId": "r1", "flowClassName": "com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlow", - "requestData": { + "requestBody": { "otherMember":"CN=Bob, OU=Test Dept, O=R3, L=London, C=GB" } } From 4451b7cfb0e330dd66eb0b78cc3b9933c82f29f5 Mon Sep 17 00:00:00 2001 From: mattbradburyr3 Date: Tue, 21 Mar 2023 10:35:34 +0000 Subject: [PATCH 2/2] update comments --- .../flowexample/workflows/MyFirstFlow.java | 10 +++++----- .../flowexample/workflows/MyFirstFlowResponder.java | 4 ++-- .../utxoexample/workflows/CreateNewChatFlow.java | 2 +- .../utxoexample/workflows/GetChatFlow.java | 2 +- .../utxoexample/workflows/ListChatsFlow.java | 2 +- .../utxoexample/workflows/UpdateChatFlow.java | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java index 254bc8a..4e7b368 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlow.java @@ -11,10 +11,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -// MyFirstFlow is an initiating flow, it's corresponding responder flow is called MyFirstFlowResponder (defined below) +// MyFirstFlow is an initiating flow, its corresponding responder flow is called MyFirstFlowResponder (defined below) // to link the two sides of the flow together they need to have the same protocol. @InitiatingFlow(protocol = "my-first-flow") -// MyFirstFlow should inherit from ClientStartableFlow, which tells Corda it can be started via an RPC call +// MyFirstFlow should inherit from ClientStartableFlow, which tells Corda it can be started via an REST call public class MyFirstFlow implements ClientStartableFlow { // Log messages from the flows for debugging. @@ -78,14 +78,14 @@ public class MyFirstFlow implements ClientStartableFlow { // Receive a response from the responder flow. Message response = session.receive(Message.class); - // The return value of a RPCStartableFlow must always be a String. This will be passed - // back as the REST RPC response when the status of the flow is queried on Corda. + // The return value of a ClientStartableFlow must always be a String. This will be passed + // back as the REST response when the status of the flow is queried on Corda. return response.getMessage(); } } /* -RequestBody for triggering the flow via http-rpc: +RequestBody for triggering the flow via REST: { "clientRequestId": "r1", "flowClassName": "com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlow", diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlowResponder.java b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlowResponder.java index a41fc13..7e7eb74 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlowResponder.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/flowexample/workflows/MyFirstFlowResponder.java @@ -29,9 +29,9 @@ public class MyFirstFlowResponder implements ResponderFlow { // Responder flows are invoked when an initiating flow makes a call via a session set up with the virtual // node hosting the responder flow. When a responder flow is invoked its call() method is called. - // Call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait + // call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait // for a response from the other flows and services. - // The Call method has the flow session passed in as a parameter by Corda so the session is available to + // The call() method has the flow session passed in as a parameter by Corda so the session is available to // responder flow code, you don't need to inject the FlowMessaging service. @Suspendable @Override diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java index c10dec5..9a8e11c 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java @@ -120,7 +120,7 @@ public class CreateNewChatFlow implements ClientStartableFlow { } /* -RequestBody for triggering the flow via http-rpc: +RequestBody for triggering the flow via REST: { "clientRequestId": "create-1", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.CreateNewChatFlow", diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlow.java index 8f9a2c1..6f192ea 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlow.java @@ -106,7 +106,7 @@ public class GetChatFlow implements ClientStartableFlow { } /* -RequestBody for triggering the flow via http-rpc: +RequestBody for triggering the flow via REST: { "clientRequestId": "get-1", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java index 5a928e7..1416b7c 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java @@ -49,7 +49,7 @@ public class ListChatsFlow implements ClientStartableFlow { } /* -RequestBody for triggering the flow via http-rpc: +RequestBody for triggering the flow via REST: { "clientRequestId": "list-1", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java index 044d1d0..79d9609 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java @@ -108,7 +108,7 @@ public class UpdateChatFlow implements ClientStartableFlow { } /* -RequestBody for triggering the flow via http-rpc: +RequestBody for triggering the flow via REST: { "clientRequestId": "update-1", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow",