我使用node-red和local composer over fabric部署了我的业务网络 . 我想听节点红色的事件 . 我能够成功提交事务但无法在node-red的调试控制台上看到事件在同一事务中发出的通知 .
作曲家节点是最新的,Composer是0.16v . 事件网址是7053.我在下面附上了两张图片 .
交易已提交 - 已收到货件 . 当为此事务执行事务处理器函数时,将发出事件,如下所述:
var basicEvent=getFactory().newEvent('org.acme.shipping.perishable','ShipmentNotification');
basicEvent.shipmentStatus = shipment.status;
emit(basicEvent);
模型文件:
event ShipmentNotification{
o String shipmentStatus
}
1 回答
见https://medium.com/@CazChurchUk/integrate-your-blockchain-with-anything-using-hyperledger-composer-and-nodered-4226676f7e54
需要更新它以在NodeRed节点窗口小部件/流中使用“业务网卡”而不是“配置文件”,但同样的原则适用于订阅事件的情况 .