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, 861🔥, 1💬
Popular Posts:
Where to find tutorials on EPUB file format? I want to know how to create EPUB books. Here is a larg...
How to use the "set-body" Policy Statement for an Azure API service operation? The "set-body" Policy...
How to run PowerShell Commands in Dockerfile to change Windows Docker images? When building a new Wi...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...
How to reinstall npm with a node version manager? I am getting permission errors with the current ve...