Preventing design omissions due to association multiplicity
By setting the multiplicity of the association between models, you can prevent design omissions of relationships between models that should be required.
You can set a multiplicity (number of data) constraint for the association between classes in the metamodel. Set the number of data for the association to "1 or more multiple" and run [Home] > [Model] > [Check Error] in the ribbon tab to detect areas where the association has not been set.
However, since error checking is always performed for the entire project, it is necessary to set the multiplicity taking into consideration the gradual progress of the design. For example, if function design is set as required (1 or more multiple) even at the stage of the overall structural design, it will be detected as a design deficiency.
Instead of error checking based on multiplicity constraints, you can develop a model validation function in the extension to realize unique validation in accordance with the design process for only the model being designed.
Multiplicity options and when to use them
Multiplicity options | When to use | Points to note |
---|---|---|
0 or more, multiple (default) | A general-purpose relationship. | For relationships designed in later processes, it is necessary to allow for a state where there is no relationship. |
0..1 | Use for relationships that do not have multiple models. | (Same as above) |
1 or more, multiple 1 | Use for relationships that must be designed. | If used for relationships that should be designed in later processes, the error check will detect excessive errors. Therefore, it should only be used for relationships that should be designed within the same process. |
Where multiplicity can be set
Multiplicity can be set for both ownership and reference relationships. It can also be set for reference relationships in the opposite direction. For example, for a reference relationship between an actor and a use case, it is possible to require both the actor and the use case to have one or more reference relationships with each other.
About changing multiplicity
Even if you revise the metamodel and change the multiplicity during the design process, the design information (relationships between models) will not change and will remain in the original state. You can detect inconsistencies by running an error check after changing the multiplicity.