How to pass in a list of Partys for invocation of a flow from the Node shell

给你一囗甜甜゛ 提交于 2021-01-29 13:36:34

问题


How to pass in a list of Partys for invocation of a flow from the Node shell?

I had tried multiple ways such as passing in as a string (with multiple ways). Do i need to pass in a Json? or what is the format?


回答1:


thanks for your question. The syntax for passing in lists of elements in the Corda CRaSH shell is:

flow start fabFlow parties: ["party1", "party2"]

The syntax for creating complicated objects can be found here but in essence is just a simple wrapping with curly braces to provide arguments to appropriate invocation params:

data class Campaign(val name: String, val target: Int)

newCampaign: { name: Roger, target: 1000 }



来源:https://stackoverflow.com/questions/60891101/how-to-pass-in-a-list-of-partys-for-invocation-of-a-flow-from-the-node-shell

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!