"participant" CTO Statement Syntax

Q

What is the syntax of the "participant" CTO Statement

✍: FYIcenter.com

A

The "participant" CTO statement declares a participant data type to represent someone who can interact with the business network under access control rules. Here is the syntax of a "participant" statement:

[abstract] participant type_name [identified by id_name] | [extends super_type] {
  o|--> property_type property_name [optional] [default value] [validator]
  ...
  o|--> property_type[] property_name [optional]
  ...
} 

Syntax elements used in a "participant" CTO Statement:

  • "abstract" - An optional flag to indicate that this data type cannot be used to create data objects. An abstract "participant" data type can be used as a basis to declare other extended "participant" data types.
  • "type_name" - A required field to specify the name for this data type.
  • "identified by id_name" - A required field to specify the property name that will be used as the unique identifier for this data type. "identified by id_name" is required for a non-abstract "participant" data type and there is no identifier declared in its super-types. The identifier property must be a "String" data type.
  • "extends super_type" - An optional field to specify the super "participant" type, if this data type is an extension data type.
  • "o" - A required flag to specify a value property for this data type.
  • "-->" - A required flag to specify a reference property for this data type.
  • "property_type" - A required field to specify the data type of this property.
  • "[]" An optional flag to indicate that this property is an array.
  • "property_name" - A required field to specify the name of this property.
  • "optional" - An optional flag to indicate that this property is not required.
  • "default value" - An optional field to specify a default value for this property.
  • "validator" An optional field to specify a specify a validation rule like "range=[...]" or "[regex=/.../]".

 

"asset" CTO Statement Syntax

CTO Language Statements

Business Network CTO Modeling Language

⇑⇑ Hyperledger Composer Tutorials

2019-04-22, 253👍, 0💬