Chaincode can also post events to notify a subscribing application to process further client actions. For example, after purchase orders, invoices, and delivery records have been matched by chaincode, it can post an event so that a subscribing application can process related payments and update an internal ERP system.
OBP supports the following types of events, which can be subscribed via a REST proxy:
- transaction: Events for a transaction ID
- txOnChannel: Events for every new transaction on a channel
- txOnNetwork: Events for every new transaction in the entire network
- blockOnChannel: Events for every block on a particular channel
- blockOnNetwork: Events for the creation of a new block in the entire network
- chaincodeEvent: Custom events emitted by chaincode logic