-
Notifications
You must be signed in to change notification settings - Fork 3
Polymorphic Event Specification
An entity (anything capable of emitting a Signaling Event) may want to tell a bank account to close without regard to the particular type of account. But the activity that results may vary depending on the type. So we want the ability to send a generic ‘close’ Event, without knowledge of the target instance Subclass and yet have that Event processed by the appropriate Subclass Lifecycle State Model. This is accomplished by defining the generic event on a Superclass Lifecycle State Model, such as that for the example class Account. This event will then trickle down through one or more Generalizations to ultimately be resolved by activity defined in the appropriate Subclass Lifecycle.
In the following example from the book Models to Code, three Polymorphic Event Specifications Park
, Pass
, and Hitch load
, are defined and applied to multiple delegated polymorphic Events.
An Event is defined on a Class playing the role of Superclass, but delegated through one or more Subclass Lifecycle State Models with a polymorphic event specification.
- Name + Class + Domain
No non-referential attributes
Copyright © 2021-2023 Leon Starr