You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added new corda-all-in-one image for flow-database-access sample
Modified Corda main-server image to allow calls to invoke without
executing any transaction.
Modified Corda InvokeContractV1Response to add the new flowId
field to return the flow handle id instead of use the callOutput
field, which now is used for the data returned by the flow. The
transactionId is not required because we can call invoke without
executing any transaction.
Resolveshyperledger-cacti#1493
Signed-off-by: Elena Izaguirre <[email protected]>
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ApiPluginLedgerConnectorCordaServiceImpl.kt
+44-1
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,49 @@ class ApiPluginLedgerConnectorCordaServiceImpl(
78
78
val returnValue = flowHandle.returnValue.get(timeoutMs, TimeUnit.MILLISECONDS)
79
79
val id = flowHandle.id
80
80
81
+
// allow returnValue to be something different to SignedTransaction
82
+
var callOutput: kotlin.Any=""
83
+
var transactionId: kotlin.String?=null
84
+
85
+
if (returnValue isSignedTransaction) {
86
+
logger.trace("returnValue is SignedTransaction - using returnValue.id.toString() ...");
87
+
transactionId = returnValue.id.toString();
88
+
89
+
callOutput =mapOf(
90
+
"tx" to mapOf(
91
+
"id" to returnValue.tx.id,
92
+
"notary" to returnValue.tx.notary,
93
+
"requiredSigningKeys" to returnValue.tx.requiredSigningKeys,
94
+
"merkleTree" to returnValue.tx.merkleTree,
95
+
"privacySalt" to returnValue.tx.privacySalt,
96
+
"attachments" to returnValue.tx.attachments,
97
+
"commands" to returnValue.tx.commands,
98
+
// "digestService" to returnValue.tx.digestService,
99
+
"inputs" to returnValue.tx.inputs,
100
+
"networkParametersHash" to returnValue.tx.networkParametersHash,
101
+
"references" to returnValue.tx.references,
102
+
"timeWindow" to returnValue.tx.timeWindow
103
+
),
104
+
"id" to returnValue.id,
105
+
"inputs" to returnValue.inputs,
106
+
"networkParametersHash" to returnValue.networkParametersHash,
107
+
"notary" to returnValue.notary,
108
+
"references" to returnValue.references,
109
+
"requiredSigningKeys" to returnValue.requiredSigningKeys,
110
+
"sigs" to returnValue.sigs
111
+
);
112
+
113
+
} elseif (returnValue !=null) {
114
+
callOutput =try {
115
+
val returnValueJson = writer.writeValueAsString(returnValue);
116
+
logger.trace("returnValue JSON serialized OK, using returnValue ...");
117
+
returnValueJson;
118
+
} catch (ex:Exception) {
119
+
logger.trace("returnValue JSON serialized failed, using returnValue.toString() ...");
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt
+5-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ import javax.validation.Valid
14
14
/**
15
15
*
16
16
* @param success
17
-
* @param callOutput
17
+
* @param callOutput Data returned from the JVM when no transaction is running
18
+
* @param flowId The id for the flow handle
18
19
* @param transactionId The net.corda.core.flows.StateMachineRunId value returned by the flow execution.
19
20
* @param progress An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty.
20
21
*/
@@ -25,8 +26,10 @@ data class InvokeContractV1Response(
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts
* An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty.
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => {
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => {
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => {
Copy file name to clipboardExpand all lines: packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts
+1-3
Original file line number
Diff line number
Diff line change
@@ -106,9 +106,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => {
0 commit comments