是否可以通过某种方式通知缔约方流程已完成?

问题描述 投票:0回答:2

[以Corda文档中描述的流程为例(请参见here),Bob如何在不轮询自己的保管库的情况下接收到刚刚签署的交易已完成的通知?是否存在特定的回调?

我需要在Bob节点上运行的CorDapp实时将另一个事务的状态传达给另一个系统

非常感谢

corda
2个回答
1
投票
您可以通过两种方式实现这一目标:

1。使用客户端订阅更新]]cordaRPCOPS.vaultTrack(<YourState>.class).getUpdates().subscribe( update -> { update.getProduced().forEach(stateAndRef -> { // Action to be Performed on State Update }); });

2。使用CordaService订阅更新:

getServiceHub().getVaultService().trackBy(<YourState>.class).getUpdates().subscribe( update -> { update.getProduced().forEach(stateAndRef -> { // Action to be Performed on State Update }); });

0
投票
除了Ashutosh的答案,
© www.soinside.com 2019 - 2024. All rights reserved.