Statements
RealmObject
DomainObject
EntityObject
Object
ObjectRelation
ObjectEvent
Overview
The M0 model not only captures the static data model (using the Object and ObjectRelation statements) but also the dynamic model (using the ObjectEvent statement). M0 can be regarded as a snapshot of the Real World at a certain time (system initialisation) complete with events frozen in time.
RealmObject Statement
RealmObject:Objects_Of_Application
The RealmObject statement introduces object domains that have previously been defined at a higher analysis abstraction level.
In the M1 silo the name of the realm is "Analysis_Of_Application". In the M0 silo the corresponding realm is always called "Objects_Of_Application" in the RealmObject statement.
DomainObject Statement
DomainObject:Ping_Pong
This statement specifies the name of a domain that has been defined in the M1 Silo and introduces the corresponding EntityObject statements.
EntityObject Statement
EntityObject:Ping
The EntityObject statement specifies the name of an entity defined in Entity statements in the M1 silo. It introduces the Object, ObjectRelation and ObjectEvent statements.
Object Statement
EntityObject:Tong
Object
| Identity
TONG_ID001
EntityObject:Ling
Object
| Identity | Count | Limit
LING_ID001 : 0 : 5
EntityObject:Pong
Object
| Identity | State
PONG_ID001 : Activate
EntityObject:Ping
Object
| Identity | State | Count | Limit
PING_ID001 : Activate : 0 : 5
The Object statement populates an entity with data (or facts) that correspond to the entity's attributes and state if the entity is active. Any object state may be specified in the data subregion not just creation states.
The first field is known as the Identity field. It is used to uniquely identify an object within an entity.
The Identity is confined to DomainObject subregion since it is ignored in the code generation process but is only used to refer to a specific object instance in the ObjectRelation and ObjectEvent statements.
If letters appear in an object identity they must be upper case letters and if a data field cannot be specified the <<Void>> directive may be used in its place causing that field to be unintialised at start up.
ObjectRelation Statement
ObjectRelation:Signals:Pong
PING_ID001 : PONG_ID001
This statement establishes a connection or link based on a relationship declared in the application analysis.
The relationship is specified in two parts after the statement's name. Only two identities per line are allowed in the data subregion, representing the source and target objects of the relationship.
For single relations (-->) an identity must appear once on the left hand side and for conditional relations (-0>) an identity may only appear once on the left hand side.
ObjectEvent Statement
ObjectEvent
| Identity | Event
PING_ID001 : Go
| Identity | Event | Message | Count | Limit
PING_ID002 : Fire : "Hello World!" : 0 : 5
The ObjectEvent statement sends events to objects at start up. All events are treated as self directed events.
Data in the ObjectEvent subregion consists of two required fields, the object identity and the event name, followed by any event data the event may carry. The <<Void>> directive is not allowed in any field as all event data must be defined.
Other than the first field, an identity may not appear anywhere else on the line since events may not carry object references.
Creation events cannot be sent using the ObjectEvent statement; instead the Object statement must be used.
|