Corda Flow参与者如何添加和添加去掉 [英] Corda Flow Participants How To Add & Remove

查看:35
本文介绍了Corda Flow参与者如何添加和添加去掉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 如果原始交易没有参与者,我们是否可以在后续交易中添加/删除参与者.

  1. Can we add/remove participant in the subsequent transaction if the original transaction does not have it.

我有甲方,甲方创建了一个事务并添加了参与者乙方.在事务中创建的状态与乙方共享.状态属性有名字,姓氏和状态.乙方将状态更改为绿色,然后交易完成并记录到乙方和甲方的保险库中.

I have party A which has created one transaction and added a participant Party B. The state created in the transaction is shared with Party B. There are state properties like FirstName, LastName and Status. Party B changes the status to green and then the transaction is completed and recorded to vault of Party B and Party A.

甲方和丙方遵循相同的过程.甲方与丙方之间遵循相同的过程.------乙方/甲方/-------丙方\------ D方

The same process is followed between Party A and Party C. The same process is followed between Party A and Party D. ------Party B / Party A /-------Party C \ ------Party D

我有一个用例,其中乙方,丙方,丁方可以将状态更改为绿色.所有状态变为绿色后,我要在甲方启动流程.

I have a use case wherein Party B, Party C, Party D can change the status in the state to Green. As soon as all the status becomes green, I want to initiate a flow at Party A.

在Corda中实现此功能的最佳方法是什么?

What is the best way to implement this in Corda?

推荐答案

1)是的,您可以通过将参与者放置在参与者列表中来添加或删除,您可以在开始时将其以null开头,只记得发送向状态/交易中涉及的每个人> flowSession .但是,通过执行此操作,请注意,交易链(沿链)仍将适用,因此新添加的参与者将能够查看状态的历史记录,因此,如果需要特定方的敏感信息,则它将暴露给该州的所有参与者.

1) Yes you can add or remove by placing the participant inside the participant list you could initailize them as null at the start, just remember to send the flowSession to everyone that is involved in the state/transaction. However by performing this action do take note that the chain of transactions ( walk the chain ) will still apply hence the newly added participant would be able to view the history of the state so if there is a requirement for sensitive information to specific party it would be exposed to all participants for the state.

2)是的,您也可以这样做,对于 @InitiatingFlow @InitiatedBy (响应者)流,有两个部分,您可以在此处添加逻辑查询您的保管库以进行相关交易并进行逻辑操作

2) Yes you could do that also, there are two sections for the flow the @InitiatingFlow and the @InitiatedBy ( Responder ) flow you could put a logic here to query your vault for related transactions and do your logic operations

这篇关于Corda Flow参与者如何添加和添加去掉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆