Event Specification - modelint/shlaer-mellor-metamodel GitHub Wiki

The name and set of parameters delivered with an Event are established by an event specification.

For Monomorphic (non polymorphic) Events, the specification of an Event is fairly simple. Consider the Event Specification Accessible Shaft Level:Floor calling( dir: Direction ) from the Elevator Case Study. This specification defines an Event addressed to, and processed on the Accessible Shaft Level Lifecycle State Model. The correspondence between this specification and the Floor calling Event is one to one.

In fact, were it not for Polymorphic Events, we wouldn't need to distinguish the event and specification as separate concepts. But let's see what happens with a polymorphic Event Specification.

In the bank account example we define a Polymorphic Event specification Account:Open( Balance: Money ). This one specification corresponds to multiple Events on multiple classes. We start with the Open Event on the Account Class which has no State Model. This Event delegates to a separate Open Event defined on each Subclass.

The specification defines the name of the event and its parameter names and types, whereas an Event constitutes application of that specification on one or more Subsystem Elements (Class or Relationship). In the case of a Monomorphic Event, the application will be to an Event on a single Lifecycle or Assigner State Model. But in the case of a Polymorphic Event the specification will be applied to multiple Classes each of which may or may not define a Lifecycle State Model.

Identifiers

  1. Name + Subsystem element + Domain

Attributes

Name

The meaning of an Event is conveyed by its name. Example Events for an elevator door lifecycle might be Open requested, Cabin arrived, etc.

Type: Event Name, based on Name