Tools, FAQ, Tutorials:
Modify Business Network in Playground
How to modify Business Network in Hyperledger Composer Playground?
✍: FYIcenter.com
You can follow this tutorial to modify a Business Network in
Hyperledger Composer Playground
and deploy it back to the Hyperledger Fabric simulator or server.
1. Open Hyperledger Composer Playground and go to Basic Sample Business Network home page, as shown in the previous tutorial.
2. Click "Define" tab. You see the development home page.
3. Click "Models/sample.cto" in the Model File section on the left. You see the model source code of Basic Sample Business Network.
4. Add a new attribute "name" to the SampleAsset object type:
...
asset SampleAsset identified by assetId {
o String assetId
--> SampleParticipant owner
o String value
o String name
}
...
5. Click "Deploy changes" button on the left bottom corner. The Basic Sample Business Network is deployed back to the Hyperledger Fabric simulator as version 0.2.6-deloy.1.
6. Click "Test" tab to create a SampleAsset object. This time you need to specify the "name" attribute:
{ "$class": "org.example.basic.SampleAsset",
"assetId": "3rd_Asset",
"owner": "resource:org.example.basic.SampleParticipant#Toby",
"value": "1000000.99",
"name": "Vacation House"
}
Â
⇒ Download Business Network from Playground
⇠Basic Sample Business Network - SampleEvent
2020-12-15, ∼1254🔥, 0💬
Popular Posts:
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
Where to get a real Atom XML example? You can follow this tutorial to get a real Atom XML example: 1...
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...
How to use the "forward-request" Policy Statement to call the backend service for an Azure API servi...