Digital Developer Conference: Hybrid Cloud 2021. On Sep 21, gain free hybrid cloud skills from experts and partners. Register now

Archived | Automate business processes via blockchain events

Archived content

Archive date: 2019-05-01

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.

Note: This pattern focuses on older technology (e.g. Hyperledger Fabric APIs prior to Fabric 1.4). Therefore, there is no support for this pattern and it will be archived on May 1, 2019. You are welcome to use up to that date, but we recommend that you begin working with the updated release.


Congrats! You’ve made it to the third in a series of code patterns that show you how to get started creating a blockchain application. In this pattern, you’ll learn how to emit events from the blockchain network so that external applications can subscribe to them and take action. As you’ve seen, blockchain’s trusted and immutable shared ledger is the foundation for innovative business solutions. Applications and external systems often need to know when something happens to the shared ledger. This pattern will show you how to programmatically generate and receive those notifications from the blockchain network.


Note: Updated to support Hyperledger Fabric V1.1 and Hyperledger Composer V0.19.

Note: This developer pattern is the third in a series of patterns designed to get you started with blockchain. For an overview of the series, see Build your first blockchain application.

Now that you know how to create a Hyperledger Fabric network and execute a smart contract on it (see Related content patterns), you’re ready to take on events!

Imagine that you’ve listed a car for sale in the product auction network and you’re dreading the effort of tracking the auction process for the car. Hyperledger Composer provides a novel approach to automate the manual task of tracking the auction process by emitting event notifications. Transactions within Composer can be written to emulate CRUD operations on your assets to emit events when required. In the car auction case, you could listen to the “OfferEvent” event to get notified about the offers for the car, and have a printer listen to the “PrintBillOfSale” event to print details of the sale.

This pattern is an extension of the pattern to create a smart contract among a set of participants in a product auction network (see Related pattern). In this pattern, you’ll learn how to emit events from a blockchain network and subscribe to them from external web applications.



  1. Start the Hyperledger Fabric network.
  2. Generate and deploy the Business Network Archive.
  3. Start and connect the Hyperledger Composer rest server to the deployed business network, and start the web application.


  1. Generate the Business Network Archive (BNA).
  2. Deploy the Business Network Archive on Hyperledger Composer running locally.
  3. Start the web UI.
  4. Perform the transactions, and emit and handle events.

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.