1. Introduction is an open source low-code/no-code application platform for faster, simpler digital transformation. In this article, we will look at using a no-code approach to integrating , specifically a network, into a full-fledged web application. Joget blockchain technology Hyperledger Fabric 1.1 Blockchain and Digital Ledger Technology (DLT) In recent times there have been many predictions on , transforming everything from banking to supply chains and even government. Even if you are not familiar with the term, you would probably have heard of the rise of cryptocurrency like which utilizes blockchain technology. So what exactly is a blockchain? blockchain technology revolutionizing the world Bitcoin To start, it’s best to understand a broader term called . DLT is simply a decentralized database, where data is stored by a network of computers with no central authority. is a specific type of DLT, where records in the network are linked using cryptography and cannot be changed. This lends itself to solving problems where there are issues with trust and inefficiencies due to centralized authorities. digital ledger technology (DLT) Blockchain There are many blockchain implementations, which are broadly categorized as either . Permissionless blockchain networks are essentially public so anyone can participate, while permissioned ones are for restricted private use. Permissionless networks work well for public areas such as cryptocurrencies, but in an enterprise environment and in many industries, private networks are essential. permissionless or permissioned Enterprise blockchain networks might typically span across multiple organizations across an entire industry. With the need for permissioned private networks and participation by multiple organizations, how would a blockchain solution gain enough adoption to succeed? This is where Hyperledger comes in. 1.2 Hyperledger and Hyperledger Fabric is a not a company, nor a specific product, but rather an umbrella of blockchain projects for enterprise use cases. Hosted by the with more than 250 participating organizations, the projects are divided into frameworks and tools. Frameworks are different implementations of blockchain technology, each of which has different strengths for different use cases. Tools, on the other hand, are utilities to help manage or complement the frameworks. Hyperledger open source Linux Foundation The most popular and mature framework currently is . Originally contributed by IBM, Fabric is emerging as the de-facto standard for enterprise blockchain platforms, with commercial implementations and support from major vendors including IBM, Oracle and SAP. Hyperledger Fabric 1.3 Hyperledger Fabric Concepts If you are new to blockchain technology, there are quite of lot concepts to learn and understand. For the purpose of this sample app, here are some of the more important terms that are used to configure the blockchain integration. is a journal of all transactions and data that are stored in a distributed network. Blockchain ledger are the network components where copies of the blockchain ledger are hosted. Peer nodes are organizations that are part of the blockchain network Members issues certificates to identify users that belong to an organization. Certificate Authority (CA) maps certificates to member organizations. Membership Services Provider (MSP) are requests to read or write data into the ledger Transactions are nodes that orders transactions into a block to be written into the ledger Ordering service are private communication mechanisms to keep confidentiality between members in the network. Channels (called chaincode in Fabric) are code within the blockchain network that are invoked to query or update the ledger Smart contracts The diagram provided by the Hyperledger Fabric project below shows how an application integrates with a blockchain network via smart contracts: More details are available in the . Hyperledger Fabric documentation 2. Overview of the App To demonstrate the incorporation of blockchain technology in an app, let’s design a Joget app that makes use of the provided by Hyperledger Fabric. The Fabcar sample is basically a minimal stripped-down Fabric network for learning purposes. sample Fabcar network To demonstrate reading from and writing to the blockchain network, the app supports the following use cases: Query and list of all records from the blockchain network Query and view a specific record from the blockchain network Write a new record into the blockchain network after an approval process With Joget, the blockchain app can be developed without coding. A form is visually designed, after which the App Generator is used to quickly create a full working app. The integration to the Hyperledger Fabric blockchain network is then accomplished by simply configuring a set of Joget Hyperledger Fabric plugins. To install and try out the final working app: Ensure that a Hyperledger Fabric sample Fabcar network is up and running. Ensure that an instance of is up and running. Joget Enterprise Edition Download the , and upload the downloaded jar file through under System Settings. Hyperledger Fabric Plugins JAR file Manage Plugins Download the and it. Joget jwa app import Configure the to point to the appropriate IP/hostname. fabric_host environment variable the app and access it from the . Publish App Center Here are some screenshots of the app in action: Welcome: Home page Fabcar Listing: List of all records from the blockchain network Fabcar Form: View specific record from the blockchain network Approval Process: Approve a creation of a new record The next few sections provide more detailed information to setup the sample Hyperledger Fabric network, as well as to develop and configure the app. 3. Install and Setup a Hyperledger Fabric Network To begin, install Hyperledger Fabric v1.3 and the Fabcar Network Sample. The summarized installation steps below were tested on Ubuntu 18.04. 3.1 Install Prerequisites ( ) https://hyperledger-fabric.readthedocs.io/en/release-1.3/prereqs.html Install cURL: sudo apt install -y curl Install Docker and Docker Compose (logout and login after the usermod command): sudo apt install -y docker.iosudo apt install -y docker-composesudo usermod -aG docker $USER# logout and login after the usermod command Install Go: sudo apt install -y golang Install NodeJS: sudo apt install -y nodejssudo apt install -y npm 3.2 Install Hyperledger Fabric Samples, Binaries and Docker Images ( ) https://hyperledger-fabric.readthedocs.io/en/release-1.3/install.html curl -sSL | bash -s 1.3.0 https://raw.githubusercontent.com/hyperledger/fabric/release-1.3/scripts/bootstrap.sh 3.3 Setup Sample Fabcar Network ( ) https://hyperledger-fabric.readthedocs.io/en/release-1.3/write_first_app.html cd fabric-samples/fabcarnpm install./startFabric.shnode enrollAdmin.jsnode registerUser.jsnode query.js Upon successful installation and execution of the last command, you should receive the query response from the blockchain network i.e. Query has completed, checking results Response is [{“Key”:”CAR0", “Record”:{“colour”:”blue”,”make”:”Toyota”,”model”:”Prius”,”owner”:”Tomoko”}},{“Key”:”CAR1", “Record”:{“colour”:”red”,”make”:”Ford”,”model”:”Mustang”,”owner”:”Brad”}},{“Key”:”CAR2", “Record”:{“colour”:”green”,”make”:”Hyundai”,”model”:”Tucson”,”owner”:”Jin Soo”}},{“Key”:”CAR3", “Record”:{“colour”:”yellow”,”make”:”Volkswagen”,”model”:”Passat”,”owner”:”Max”}},{“Key”:”CAR4", “Record”:{“colour”:”black”,”make”:”Tesla”,”model”:”S”,”owner”:”Adriana”}},{“Key”:”CAR5", “Record”:{“colour”:”purple”,”make”:”Peugeot”,”model”:”205",”owner”:”Michel”}},{“Key”:”CAR6", “Record”:{“colour”:”white”,”make”:”Chery”,”model”:”S22L”,”owner”:”Aarav”}},{“Key”:”CAR7", “Record”:{“colour”:”violet”,”make”:”Fiat”,”model”:”Punto”,”owner”:”Pari”}},{“Key”:”CAR8", “Record”:{“colour”:”indigo”,”make”:”Tata”,”model”:”Nano”,”owner”:”Valeria”}},{“Key”:”CAR9", “Record”:{“colour”:”brown”,”make”:”Holden”,”model”:”Barina”,”owner”:”Shotaro”}}] 4. Design Joget App Now that you have gotten the Fabcar network up and running, let’s start designing the Joget app that will query and update the records in the blockchain ledger. The Joget platform provides a modular to extend functionality. In this case, we will be using a set of Hyperledger Fabric plugins with . dynamic plugin architecture Joget Enterprise Edition 4.1 Design New App The first step is to . In the Joget , login as an administrator and click on the button. Key in the relevant details e.g. design a new Joget app App Center Design New App App ID: fabcar App Name: Hyperledger Fabric Fabcar Sample 4.2 Design Fabcar Form Using the Joget , design a form with fields matching the properties in a Fabcar record. Form Builder In this case create text fields with IDs that match a Fabcar record Key make model colour owner Click on the button to save the form. Save 4.3 Use App Generator to Create App Once the form has been saved, click on the button to use the . Check the options for , then . Generate App App Generator Generate Datalist, Generate CRUD and Generate Process — Approval Process Generate : The App Generator is a Joget Enterprise Edition feature, but you can manually create the list, process and UI in the Community Edition as well. NOTE 5. Configure Joget Hyperledger Fabric Plugins At this point, a full app to manage records, along with an approval process to create a new record has been created. These records are in the internal Joget database though, so now we will start configuring Hyperledger Fabric Plugins to directly integrate with the blockchain network. 5.1 Upload Joget Hyperledger Fabric Plugins Download the Hyperledger Fabric Plugins JAR file, and upload the downloaded jar file through under System Settings. Manage Plugins 5.2 Configure List to Query Hyperledger Fabric Ledger In the app, enable the so that you can view the editable elements. Browse to the Fabcar Listing and click on the quick edit link for the List to open the . Quick Edit Mode Datalist Builder Switch to the tab, select the then click on . In the plugin configuration, key in the relevant details. Source Hyperledger Fabric Datalist Binder Next The values shown here are suitable for the default Fabcar sample network, but change the to the correct hostname or IP in your environment: fabric_host If the configuration is correct, the tab will display the appropriate Fabcar columns to be used in the datalist. Add the columns to be displayed as required, then . Design Save 5.3 Configure Form to View Hyperledger Fabric Ledger Record In the Fabcar Listing and click on on a record. Click on the Fabcar Form quick edit link to open the Form Builder. View Switch to the tab, select the as the Load Binder then click on . Properties Hyperledger Fabric Form Binder Next In the plugin configuration, key in the relevant details. The Hyperledger Fabric User and Channel values are similar to the configuration used for the datalist binder earlier. Note: #requestParam.id# is a to represent the parameter in the URL. request parameter hash variable id Click on . Save 5.4 Configure Process to Update Hyperledger Fabric Ledger In the Design App > Processes screen, click on to launch the . Design Process Process Builder In the transition where the status is “ ”, add a Tool called . Approved Invoke Fabric Transaction In the page, select the for that Tool. In the plugin configuration, key in the relevant details. The Hyperledger Fabric User and Channel values are similar to the configuration used for the datalist binder earlier. Map Tools to Plugins Hyperledger Fabric Tool Note: #form.fabcar.field# is a that represents the form field value. form hash variable 6. What’s Next This example serves to demonstrate the simplicity of building a blockchain app using the Joget platform without coding. Download the , and get started with Hyperledger Fabric and Joget. app and plugin for this sample To get started on the digital transformation journey with Joget: or Download Joget Workflow Sign Up for Joget Cloud Learn more in the Knowledge Base Join the community in the Community Q&A Enquire about the Joget Workflow Enterprise Edition