Tools, FAQ, Tutorials:
CTO Language Statements
What are Business Network Model CTO Language Statements?
✍: FYIcenter.com
Business Network Model CTO language supports 8 types of statements.
namespace - The "namespace" statement declares a namespace as the prefix for all data types defined in this CTO file.
The "namespace" statement has the same syntax as the "namespace" statement in "C#" or "package" Java language. For example:
namespace com.fyicenter.hyperledger
import - The "import" statement imports data types defined in other CTO source code files.
The "import" statement has similar syntax as the "import" statement in Java language. For example:
import com.fyicenter.common
participant - The "participant" statement declares a participant data type to represent someone who can interact with the business network under access control rules.
The "participant" statement has similar syntax as the "struct" statement in the C language. For example:
participant Customer identified by customerId { o String customerId o String firstName o String lastName --> Address address }
asset - The "asset" statement declares a generic data type to represent primary data entities that can be referenced with their unique IDs.
The "asset" statement has similar syntax as the "struct" statement in the C language. For example:
asset Car identified by vin { o String vin o String maker o String model o Double value o Currency currency --> Customer owner }
transaction - The "transaction" statement declares the input message structure of a transaction type, which can be submitted to the business network for processing.
The "transaction" statement has similar syntax as the "struct" statement in the C language. For example:
transaction Trasfer { --> Car car --> Customer newOwner }
event - The "event" statement declares the output message structure of an event type, which can be emitted from the business network for external systems to consume.
The "event" statement has similar syntax as the "struct" statement in the C language. For example:
event CarOwnerChanged { --> Car car --> Customer newOwner --> Customer oldOwner }
concept - The "concept" statement declares a generic data type to represent secondary data entities to support primary data entities.
The "concept" statement has similar syntax as the "struct" statement in the C language. For example:
concept Address { o String street o String city o String state }
enum - The "enum" statement declares an enumeration data type to represent data values with predefined options.
The "enum" statement has similar syntax as the "enum" statement in the C language. For example:
enum Currency { o USD o CAN o EUR }
Â
⇒ "participant" CTO Statement Syntax
⇠What Is CTO Modeling Language
2021-08-04, 1112🔥, 1💬
Popular Posts:
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
Where Is the Submitted Form Data Stored in PHP? When a user submit a form on your Web server, user e...