Skip to content

Assigner

Leon Starr edited this page Mar 14, 2022 · 6 revisions

An assigner is a state machine that serves as a single point of control for creating links on competitive associations. [MB]

A detailed description of where Assigners are required, the problem they solve, and how to build them is available in [MB] and [OOA96].

Briefly though, on an Association where the instances on each side are trying to reference each other, a kind of moderator may be required to ensure that multiple instances on one side of the Association don’t all try to reference the same instance on the other side when only one (on one or both sides) may be referenced at a time. The moderation task can’t be delegated to a Lifecycle State Model on either side of the Association due to competition. In the naturally concurrent world of Shlaer-Mellor, [LSSYNC] we need to be explicit when platform-independent sequencing is required.

An Assigner solves the problem by creating a single, platform independent, point of control where the competition can be resolved deterministically. An Assigner is specified as a State Model with a single token (in the case of a Single Assigner) which steps through the process of verifying the existence of linkable Instances or waiting for an Instance to become available, choosing the Instances to link when sufficient Instances are available using relevant selection criteria, locking down the Instances to be linked to avoid a race condition (using status attributes) and then creating the Link in a concurrent-safe manner. Whereas [MB] prescribes the use of a ‘class-based state machine’ for an Assigner to support UML compliance and easy implementation in existing UML tools, miUML parts ways and returns to the founding theory where the assigner state machine is bound directly to an Association. ‘Associating assigners with (Associations) has two very desirable consequences. First, the analyst is now free to choose how to formalize the competitive (Association) and is no longer forced to do so with an (Association Class). Secondly, all (Classes) have, at most, one possible state model: a lifecycle model.’ [OOA96] While a class-based assigner idea works, in practice it is misappropriated to support all manner of class-based activity that is properly formalized with specification Classes and single Instance Classes. In fact, the concept of an Assigner is quickly forgotten and C++ style ‘static class’ behavior begins sprouting all over the class model. miUML is dedicated to providing a requirements analysis facility rather than an object-oriented code browsing environment of which there are already plenty. The idea of a State Model built directly on an Association to manage Link competition avoids any confusion about the purpose of such a State Model. To map to standard UML, generate an extra UML singleton class with a statechart then tag that class as an {assigner}. In this way, miUML conceptual integrity is preserved and OMG UML standard conformance is possible.

Clone this wiki locally