问题描述
flow start TransactionRecoveryFlow report: {O=PartyB,L=New York,C=US=LedgerSyncFindings(missingAtRequester=[24DC1B1C6D8743988C5F4DE6725C64D4354B713D78F27E60CF03398B32657D57,FD3F0A5D8E03A9E8B79229B8271DCEDA691AE106A99F38E5F9F0408FB1F1BAFA,A997737DC3359FE7F3D15CB06E12EF347DA149328F263D2B35F99DA8F363EFCB],missingAtRequestee=[])}
我正在尝试通过命令行传递报告参数,命令行是“ Map
exception: while parsing a flow mapping in 'reader',line 1,column 11: { report: {O=PartyB,C=US=Ledg ... ^ expected ',' or '}',but got [ in 'reader',column 77: ... SyncFindings(missingAtRequester=[24DC1B1C6D8743988C5F4DE6725C64D ... ^ at [Source: (StringReader); line: 1,column: 77] - while parsing a flow mapping in 'reader',column 77: ... SyncFindings(missingAtRequester=[24DC1B1C6D8743988C5F4DE6725C64D ... ^ [errorCode=1eyuahe,moreinformationAt=https://errors.corda.net/OS/4.5/1eyuahe]
解决方法
根据this answer,像这样传递list
:
flow start MyFlow listParam: [value1,value2]
按照上述方法,应像这样传递map
:
flow start MyFlow mapParam: [key1:value1,key2:value2]
在代码示例中,您丢失了地图周围的括号[ ]
和键/值对之间的冒号:
。
另外,请注意如何在外壳中传递对象(请参见here)。