Redefining EDI, using Hyperledger
Blockchain technology has received much hype in recent times. Companies like IBM are investing into building Blockchain technologies which have the ability to reshape and transform industries such as finance, healthcare, government, manufacturing, and supply chain.
Blockchain reached the “peak” of the Garter Hype Cycle for Emerging Technologies in 2016, and partnerships such as the one between IBM and Maersk have made headlines for being pioneers and early adoptions of blockchain – reinventing the ways in which business has been done.
B2B Integration & EDI
From a supply chain perspective, much of the hype surrounding blockchain lays within its promise and ability to relieve many of the problems of traditional B2B Integration and EDI.
Electronic Data Interchange (EDI) made transaction processing digital and automated. EDI replaced manual, paper based business documents. It has been the gold standard for integration between businesses and exchange business documents such as purchase orders, invoices, and shipping notices.
However, EDI has been plagued by the ever-growing number of standards and ways of doing business. Document formats such as: EDIFACT, ANSII X12, CSV, and XML, and communication protocols such as: SFTP, Connect:Direct, HTTP, and AS2 – have become a plethora of “standards” which are inconvenient and time consuming for organizations to maintain. It is costly and complex to build systems which can transform data from Company A’s format to Company B’s.
Blockchain however, has the ability to provide a single standard, framework, and database – which will provide one single view of transactions, simplifying:
- Dispute resolution
Whilst the blockchain could replace the need for traditional EDI in the long term, for the near future, blockchains are most likely to run concurrently alongside traditional B2B Integration technologies, such as IBM Sterling B2B Integrator.
We call this a Shadow Chain – where the Blockchain doesn’t replace the current business process, but instead is used to enrich that business process. It becomes a central and distributed record of key events across the supply chain process, helping avoid disputes and costly transaction processing.
This blog demonstrates integration of existing Supply Chain & B2B commerce technologies with the blockchain. The blockchain serves as the primary source of truth, with each company maintaining their own leger in a legacy System of Record/
Blockchain For Business
Enterprise blockchain applications, also known as “blockchain for business” are typically private business networks, where all participants on the network are known and permissioned.
These business networks are based on mutual consensus and trust, polar opposites to the pseudo-anonymous, public Blockchain implementations we so often hear about. (Think Bitcoin.)
However, this blog is not an overview of blockchain and its use cases. For that overview, head over to John Hawkins’ Blockchain 101.
This blog is technical, exploring how to connect blockchain for business to existing systems of record, via integration middleware such as IBM Sterling B2B Integrator.
The Hyperledger project, started in December 2015 by the Linux Foundation, is an umbrella, covering projects which develop tools for collaborative development of Blockchain-based distributed ledgers and related tools.
Whilst there are many Hyperledger projects, all contributing great work to Blockchain development and adaption, the two technologies we will use for this integration are Hyperledger Fabric, and Hyperledger Composer.
Hyperledger Fabric – Distributed processing system that governs how blockchain apps are run
Hyperledger Composer – A layer of abstraction, which enables enterprise blockchain applications to be described (and codified), in terms of assets, participants, and transactions
Composer’s components run on Fabrics distributed processing system. For Integration with existing systems of record, we will leverage Composers Loopback support, which provides REST API’s as a simple method of connection
The Hyperledger Composer Developer Guide details instructions for getting a blockchain up and running locally on your machine, then exposing that Blockchain via REST API.
Assuming this guide has been followed successfully, a blockchain is now running, and the Composer-REST-Server allows the deployed business network to be integrated with via REST API.
In this demonstration, IBM Sterling B2B Integrator will be used to interact with this blockchain via this REST API.
Whilst there are several ways to create assets and participants onto the blockchain, in this example, POST and GET statements are written directly to the Hyperledger Composer REST API.
Two abstract assets were created for this demonstration
- GOLD – a 25g gold bar, on the “Euronext” exchange
- SILVER – a 17.5g silver bar, on the “FTSE” exchange
Integration with IBM Sterling B2B Integrator
The “Middleware” we will use for integrating with existing systems of record is IBM Sterling B2B Integrator.
IBM Sterling Integrator is a B2B integration platform. It helps organisations transact business documents – such as purchase orders, shipping notices, and invoices – with their suppliers and partners.
Typical ESBs such as IBM Integration Bus are designed primarily to integrate an organisations various internal applications together (EAI Integration). B2B gateways such as Sterling, however are designed primarily for external integration with the back-end systems of a company’s trading partners, such as suppliers and customers (B2B Integration).
Sterling Integrators business processes extend beyond and organisations four walls. This example shows a business process, for connecting to a blockchain.
The screenshot above shows the graphical outline for connecting to the blockchain. As we will be connecting via REST APIs, we use Sterling Integrators built in HTTP Adapters.
Once the end-to-end process has been defined with Sterling’s Graphical Process Modeller, you can then edit the underlying BPML (XML) to ensure the HTTP adapters point to the correct resources within blockchain.
You must provide
- IP Address – IP Address of the node running Blockchain (Hyperledger Composer Rest Server)
- Port Number – Port number exposed for
- URI – This will change per business process, based on what you wish to do. I.e. whether you wish to Create / Read:
In this example – we wish to Read the list of Transactions from the Blockchain.
In this example – we wish to Read the list of Transactions from the blockchain.
Once the business process has been configured, saved, and checked into Sterling Integrator, you can execute the business process. This will run through each of the steps in the business process as seen in the Graphical Process Modeller above.
Clicking an icon in the “Document” column will show the raw JSON data returned back from the blockchain, and a response code 200 – indicating the connection was successful
We can see in this written file – that the list of transaction was successfully read from the blockchain.
- GOLD – was transferred from TRADER1 to TRADER2
- SILVER – was transferred from TRADER3 to TRADER4
To keep this demo simple, the Sterling Integrator simply wrote the transactions to the file system (as system of record).
In summary, in this demonstration, we have used IBM Sterling B2B Integrator to connect out to the blockchain, to read a list of transactions.
This has been accomplished by
- Creating a blockchain using Hyperledger Fabric, and Hyperledger Composer
- Exposing the blockchain via REST API – using Hyperledger Composer
- Creating a business process in Sterling Integrator, to read transactions from the Blockchain
- Writing that list of transactions out to a system of record (file system) as a text file
As mentioned in the summary, in this demonstration, Sterling B2B integrator was used to read a list of transactions from the blockchain.
Next steps will involve getting Sterling B2B Integrator to:
- Create assets on the blockchain
- Respond to “Events” that take place on the blockchain
For example, if a transaction should take place on the blockchain, automatically kick off a business process. This could be to send an invoice for a transaction
About The Author
Jonathan Sinclair has a combined total of 4 years’ experience working for IBM and IBM Business Partners. His primary role is to develop Proof of Concepts and Demonstrations which help clients understand how they can apply enterprise software to solve real world problems. Primary expertise are in Supply Chain technologies, Blockchain, and Data Science where he has completed PoC projects for companies in the pharmaceutical, telecommunications, and software industries.
At the time of writing, he is employed by IBM, on a secondment to IBM Business Partner Lightwell Inc, where he works to build first of a kind Blockchain assets, to demonstrate to customers.
You can contact Jonathan Sinclair on Twitter @_J_Sinclair, or via email at email@example.com
For assistance developing Blockchain technologies, contact Lightwell Inc.
Or visit the IBM Blockchain homepage