R976 - modelint/shlaer-mellor-metamodel GitHub Wiki

R976 / Generalization

Create Action is a Delegated Create Action or Local Create Action


These Create Actions correspond, respectively, to the asynchronous and synchronous mechanisms defined in [MB] and [OOA96] for creating a new instance of a Class.

Each of these mechanisms makes use of the create accessor as defined in [OOA96] which is managed by the MX (model execution) domain.

Our terminology here is updated since it is easier to remember, especially for newcomers, and helps us think about how the initiating Activity manages the process.

Delegated creation, for example, triggers the create accessor and then goes about its business without waiting for the create accessor to complete. Synchronization with the newly created instance is possible, directly or indirectly, in some future state, if desired. This mechanism requires that the target Class defines a [Lifecycle] since the new instance must process an initial Event. The new instance is created asynchronously with respect to the initiator.

Local creation, on the other hand, completes entirely within the context of the Local Create Action. In other words, it is created synchronously, similar to invoking a function in a programming language. In fact, a reference to the newly created instance is yielded as the output of the Local Create Action. This mechanism is useful when creating instances of a Class that does not define a Lifecycle. If a Lifecycle is defined, an initial state must be specified. The Activity in this state will not be executed as a direct consequence of local creation since no initiating event is dispatched.

A more detailed comparison of these mechanisms as well as some improvements over the [OOA96] and [MB] approaches are discussed in this technical note.

Formalization

<subclass>.(Action, Activity, Domain) -> Create Action.(Action, Activity, Domain)
⚠️ **GitHub.com Fallback** ⚠️