0

How can I show Event notification in the UI ? I am able to subscribe to the event in my API, but I dont know how to display the same in the UI. The following code I used in my API to subscribe the event emitted from Hyperledger-composer

.then(function(){
    bizConn.on("event",evt =>{
    console.log('---Event Received---');
    temperature = evt.temperature;
    console.log('Temperature : ', temperature)  
})

This event is emitted when a particular transaction associated with this event is triggered. How can I distinguish between the normal transaction output and the event?

Let me know if I need to be more specific.

Ankit Jayaswal
  • 5,549
  • 3
  • 16
  • 36
Lalith
  • 3
  • 1
  • hi, see an example of consuming events in this sample (code: https://github.com/IBM/BlockchainEvents-CompositeJourney/blob/master/Web/public/scripts/events.js video: https://developer.ibm.com/patterns/automate-business-processes-via-blockchain-events/ - its using websockets / Composer REST server to consume events in the node based web UI app. – Paul O'Mahony Oct 17 '18 at 09:05
  • Possible duplicate of [How to get notifications in user applications?](https://stackoverflow.com/questions/52987236/how-to-get-notifications-in-user-applications) – Monarth Sarvaiya Oct 25 '18 at 11:51
  • 1
    Already answered here, check out the link below: https://stackoverflow.com/a/52987696/10529091 – Isha Padalia Oct 25 '18 at 11:53

0 Answers0