Using Concepts In Your Hyperledger Composer Model File (.cto)
#1
Following from our previous tutorial, I will now be showing you how to further define your participant using concepts. We will be needing more information about our guest than just their guestId. Managers and other staff also need to know their first name, last name, and driver's license number.

Step 1: Open our existing model file
This is what your participant model file should look like.
[Image: attachment.php?aid=45]

Step 2: Creating our concept
Now let's start our concept following our example below.
[Image: attachment.php?aid=46]

Step 3: Define our concept
Defining a concept is much like defining an asset or participant. We need to define the type followed by a name. For this example, we will be adding a first name, last name, and driver's license number. All of the type "String".
[Image: attachment.php?aid=47]

Step 4; Connecting our concept
Okay great, our concept is created. Now let's add it to our participant.
[Image: attachment.php?aid=48]

You're done! Congratulations, you've now added a concept to your model file.


Attached Files Thumbnail(s)
               
Reply