Attributes

Attributes are properties that specify the information that is associated with an object of your business model. Concepts and entity and event types can have attributes, and instances of these types have values for these attributes. Each attribute has a name and a type that represents its possible values.

To define attributes, you can use the has, with, and can be keywords. has and with have the same purpose. You cannot use the has or with keywords to specify an attribute that has an entity type as type. Use the related to construct to create a relationship instead.

has
You can create a separate statement for each attribute by using the has keyword:
a ticket is a business entity identified by a ticket number.
a ticket has a price (numeric).
To define an attribute with multiple values, you can use the some keyword, or several different keyword.
a city has some stores.
a city has several different stores.

The stores attribute in these two cases is slightly different. The attribute defined with some might have multiple occurrences of the same value, whereas the values in the attribute defined with several different must be unique.

A city entity type that has an attribute defined with the some keyword can contain two or more values that are the same. For example, the stores attribute of an entity named Paris might contain the following values: GalerieLafayette, H&M, GalerieLafayette, Printemps. A city entity type that has an attribute defined with the several different keyword cannot contain two or more values that are the same. For example, the stores attribute of the previous entity named Paris can contain only a single value of GalerieLafayette. In this case, the attribute contains the following values: GalerieLafayette, H&M, Printemps.

To specify an attribute and its type, you can also use constructions with that is, that are, or named the:
a ticket has a price that is a number.
a ticket has a number, named the price.
a shopping cart has some items that are articles.
You cannot use named the with a plural term.

You can specify several attributes in a has statement. The attributes must be separated by commas, except for the last attribute in the list, which can be preceded by the and connector.

an airport has a name, a location (a geometry) and a baggage handling system (text).
with

To add a list of attributes, you can also use the with keyword. The attributes must be separated by commas, except for the last attribute in the list, which can be preceded by the and connector. Each attribute is introduced by an indefinite article: a, an, some, or several different.

an address is a concept with a street, a town, a zip code (integer), a country.
a ticket is a business entity identified by a ticket number with a price (numeric).
a bag scan is a business event time-stamped by a scan time with a scan ID, an airport tag and a scan location (a point).
can be
To define a boolean attribute, use the can be keyword:
an airport can be closed.

In a rule condition, this boolean expression can be used as follows:

if 'the airport' is closed

In a rule action, this boolean expression can be used as follows:

then make it false that 'the aiport' is closed;

Types

The type of an attribute can either be a default type, a predefined type that you specify, or a type that is defined in the business model.

When no type is specified for an attribute, the default type is text (String). In the following examples, the attributes have this default type.

an address is a concept with a street, a town, a zip code and a country.
a person has some addresses.

You can specify another type by adding a predefined type between parentheses after the attribute. See Business model definitions syntax for the list of available predefined types. In the following example, the street, town, and country attributes have the default text type, and the zip code attribute has the type integer.

an address is a concept with a street, a town, a zip code (integer) and a country.

The following example shows an attribute with an existing concept or event type. The type of the company address attribute is the address concept.

an address is a concept with a street, a town, a zip code (integer) and a country.
a company is a concept with a company address (an address).

If the name of the type is equal to the attribute name or to the last term of the attribute name, the type of the attribute is inferred from its name. For example, the company address attribute has the inferred type address. The inferred type overrides the default type when no other type is specified.

a company is a concept with a company address.

The type cannot be inferred from predefined types. For example, the expression purchase date is not interpreted as a date but as a string.