如何访问Hyperledger Fabric交易历史中的'eventEmitted'字段 [英] how to access the 'eventEmitted' field in transaction history of hyperledger fabric

查看:51
本文介绍了如何访问Hyperledger Fabric交易历史中的'eventEmitted'字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Hyperledger Fabric.我想访问Hyperledger Fabric交易历史中的"eventEmitted"字段.

I am working on hyperledger fabric.I want to access the 'eventEmitted' field in transaction history of hyperledger fabric.

 /*transaction history*/
  "transactionType": "com.acn.hps.aops.ims.addingEvidence",
 "eventsEmitted": [
  {
    "$class": "com.acn.hps.aops.ims.BasicEvent",
    "evidenceId": "100",
    "eventId": 
    "b66fd1c38754519339172905d916497376029ad9620ba5f19999fb73cf1d8b58#0",
    "timestamp": "2018-03-01T08:36:41.164Z"
  }
]

我能够查询交易类型并得到结果,但是现在可以访问eventEmitted中的证据ID字段,如果我传递_ $ evidenceId并与eventEmitted中的证据字段ID相匹配,查询将如何进行

I was able to query the Transaction type and got the result, but now to access the evidence id field in eventEmitted how the query will be if i pass _$evidenceId and it matches with the field evidenceId in eventEmitted

query showEvidenceAllHistorians {
description: "get all assetDoc transactions"
statement: SELECT org.hyperledger.composer.system.HistorianRecord
WHERE (transactionType == 'com.acn.hps.aops.ims.addingEvidence')
  }

推荐答案

我不知道CONTAINS不是您想要的答案吗?但是您可以尝试一下

I do not know CONTAINS is not the answer you want? But you can give it a try

这篇关于如何访问Hyperledger Fabric交易历史中的'eventEmitted'字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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