Business model definitions syntax

You use the business definitions to model entity and event types.

You define the entities, concepts, and events of your business model by adding constructs in the Definitions editor of the business model file. You use specific constructs to define the nature of the concept, the relationships to other concepts, and the attributes that compose the entity, concept, or event.

Table 1. Constructs
Construct Definition Example

<a concept> is a concept

Defines a simple concept that is neither an entity nor an event.

a person is a concept.

<an entity> is a business entity identified by <identifier>

Defines an entity and the attribute that is used as the entity identifier. The entity ID is of type string.

an airport is a business entity identified by an airport code.

<an event> is a business event time-stamped by <a time>

Defines an event that has a time stamp. If no time stamp is specified, a time stamp is applied by default. The event time stamp is of type date & time.

a flight event is a business event time-stamped by a datetime.

<a concept> is <a concept>

Defines a concept that inherits from another concept.

a car is a vehicle.

<an entity> is <an entity>

Defines an entity that inherits from another entity.

a dog is an animal.

<an event> is <an event>

Defines an event that inherits from another event.

a flight depature event is a flight event.

<a concept> can be one of: <value>, <value>, <value>

Defines an enumerated domain with a list of values.

a ticket state can be one of: Booked, CheckedIn, Boarded. 

<a concept> has <an attribute>.

Defines an attribute of the concept, entity, or event.

You cannot use this construct to specify a relationship to an entity.

a person has a first name.

with <an attribute>, <an attribute> and <an attribute>

Introduces a list of attributes.

an address is a concept with a street, a town and a country.

<a concept> is related to <an entity>

Defines a relationship to an entity.

a flight is related to an airport.

some

Defines a multi-values relationship.

a flight is related to some boarded passengers.

several different

Defines a multi-values relationship where each item is unique.

a flight is related to several different crew members.

<a concept> can be <attribute>

Indicates an attribute that is defined by a Boolean expression.

a trip can be completed.

<a type>, named the <attribute>

Specifies an attribute name for a type.

This construct is equivalent to <an attribute> (<type>).

a person has a number, named the age.
This expression is equivalent to the following expression:
a person has an age (numeric).

<an attribute> that is <a type>

Specifies the type of an attribute.

This construct is equivalent to <an attribute> (<type>).

a person has a phone number that is a number. 
This expression is equivalent to the following expression:
a person has a phone number (a number). 

used as the default <facet>

Defines a facet so that the concept can be interpreted as another type in the rules. This type can be temporal or geospatial.

a flight has a position used as the default location.

<a concept> is <a type> whose values are prefixed by a <prefix>

Adds a prefix to the values of a concept.

The type must represent a lexical value such as number, date & time, string.

a dollar is a number whose values are prefixed by a "$". 

<a concept> is <a type> whose values are suffixed by a <suffix>

Adds a suffix to the values of a concept.

The type must represent a lexical value such as number, date & time, string.

a reference is a string whose values are suffixed by a "#". 

<a data provider> is a data provider, accepts <input>, returns <output>.

Defines a data provider that returns values based on input values. The input and output are attributes that you define in the business model.

a weather provider is a data provider,
accepts a longitude (numeric) and a latitude (numeric),
returns a temperature (numeric), a wind speed (numeric) and a precipitation level.

The default type for attributes is a string, but you can specify a different type.

Table 2. Main attribute types
Construct Definition Example

(numeric)

The type of the attribute is a number (double). For example, 100.56.

You can also use the equivalent type (a number).

a purchase has an amount (numeric).

(integer)

The type of the attribute is an integer. For example, 1300.

an aircraft has a capacity first class (integer).

(text)

The type of the attribute is a string. This type is the default type.

You can also use the equivalent type (a string).

an airport has a baggage handling system (text).

(a boolean)

The type of the attribute is a Boolean.

a flight has a snack bar (a boolean).

(a character)

The type of the attribute is a character.

a flight has a boarding area (a character).

(<a concept>)

The attribute inherits the type of the specified existing concept.

a person has a home (an address).

(<a type>)

The attribute has a type, for example a geometry.

a flight has a location (a point).

<attribute> [mandatory]

The attribute is mandatory.

a flight has a state (a flight state) [ mandatory ]. 

<attribute> [<technical_attribute>: <value>]

The attribute has a technical attribute.

a flight is a business event [ 'xsd.targetNamespace' : "http://www.example.com/bmd/syntax" ] identified by a name.

(<type>, <default value> by default )

The attribute has a type with a default value.

a flight has an original flight time hours (numeric, 12 by default).
Table 3. Temporal attribute types
Construct Definition Example

(time)

The type of the attribute is a time of day.

You can also use the equivalent type (a time).

a flight has a regular time of departure (time).

(date & time)

The type of the attribute is a date and a time within a specific timezone.

a flight has an original departure (date & time).

(an absolute duration)

The type of the attribute is an absolute duration. For example, 30 hours. An absolute duration cannot be defined in years, months, or days, which have a duration that might vary. You can compare absolute durations in rules.

You can also use the equivalent type (duration).

a flight has a flight duration (absolute duration).

(a calendar duration)

The type of the attribute is a calendar duration. For example, 3 months.

a loan has a duration (a calendar duration).

(a time period)

The type of the attribute is a time period. A time period starts and ends at specific time points. For example, the time period that starts on 01/01/2016 and ends on 01/26/2016. The time point at which the time period starts is included in the time period, but the time point at which it ends is excluded.

a coupon has a validity period (a time period).

(a year)

The type of the attribute is a year. For example, 2016.

a product has a release year (a year).

(a month)

The type of the attribute is a month. For example, March.

a seed has some optimum sowing months (a month).

(a day of week)

The type of the attribute is a day of the week. For example, Tuesday.

a library has some weekly closed days (a day of week).

(a day of month)

The type of the attribute is a day of a month. For example, the 10th day of the month.

a paper has a monthly publication date (a day of month).

(an hour of day)

The type of the attribute is an hour of the day. For example, 10 O'clock.

a service has a daily schedule (an hour of day).

(a minute of hour)

The type of the attribute is a minute of an hour. For example, the 10th minute of the hour.

an hourly shift has a time (a minute of hour).

(a second of minute)

The type of the attribute is a second of a minute. For example, the 10th second of the minute.

an automatique refresh has a time (a second of minute).
Table 4. Geospatial attribute types
Construct Definition Example

(a geometry)

The type of the attribute is a geometry.

a parking lot has a location (a geometry).

(a moving geometry)

The type of the attribute is a moving geometry.

a car has a location (a moving geometry).

(a point)

The type of the attribute is a point with a longitude and a latitude.

a shop has a location (a point).

(a polygon)

The type of the attribute is a polygon.

a shop has a delivery area (a polygon).

(a line string)

The type of the attribute is a line string.

a pedestrian crosswalk has a location (a line string).

(a linear ring)

The type of the attribute is a linear ring.

a country has a border (a linear ring).

(a multi point)

The type of the attribute is a multi point.

a train has a set of stops (a multi point).

(a multi polygon)

The type of the attribute is a multi polygon.

a parking has an available area (a multi polygon).

(a multi line string)

The type of the attribute is a multi line string.

a bridge has a location (a multi line string).

(a multi linear ring)

The type of the attribute is a multi linear ring.

a continent has a border (a multi linear ring).