The present disclosure generally relates to the field of computer science, and more particularly to Unified Modeling Language (UML).
UML class diagrams typically show relationships between objects within a model, and UML activity diagrams typically show the flow of logic within a model. Existing techniques for linking class diagrams to activity diagrams includes embedding an activity diagram inside an object in a class diagram, or embedding the object in the class diagram inside the activity diagram, causing closely coupled models that may be cumbersome to maintain inside the current tooling.
The present disclosure is directed to a method for associating an UML activity diagram with an UML class diagram. The method may comprise applying stereotypes to nodes in the UML activity diagram; specifying properties for the stereotypes, the properties may include information for linking nodes in activity diagram to role names in the class diagram; providing a mapping between nodes in the activity diagram and relationship objects in the class diagram based on the properties; associating the activity diagram with the class diagram utilizing the mapping.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not necessarily restrictive of the present disclosure. The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate subject matter of the disclosure. Together, the descriptions and the drawings serve to explain the principles of the disclosure.
The numerous advantages of the disclosure may be better understood by those skilled in the art by reference to the accompanying figures in which:
Reference will now be made in detail to the subject matter disclosed, which is illustrated in the accompanying drawings.
The present disclosure captures the use of a stereotype being applied to each activity node. A property on this applied stereotype may be set to the value of a corresponding role name on a class diagram that the activity node represents, thus providing a mapping between activity diagram nodes and class diagram objects. The present disclosure allows for looser coupling between the class and activity diagrams, ensuring that the concepts that are defined by each diagram are still maintained separately. A method to link non-class UML objects from the class diagram to the activity nodes may also be developed.
It is understood that by associating the relationship object in the class diagram to the nodes in the activity diagram, one may be able to extract information about the cardinality and relationship type as well as the data object that is being used, thus extending what was possible by using a simple UML object node. Utilizing the present disclosure, the relationship between class and activity diagrams may be loosely coupled in that changing one diagram has no impact on the other, and an association relationship is always maintained via the role name on the class diagram.
In the present disclosure, the methods disclosed may be implemented as sets of instructions or software readable by a device. Further, it is understood that the specific order or hierarchy of steps in the methods disclosed are examples of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the method can be rearranged while remaining within the disclosed subject matter. The accompanying method claims present elements of the various steps in a sample order, and are not necessarily meant to be limited to the specific order or hierarchy presented.
It is believed that the present disclosure and many of its attendant advantages will be understood by the foregoing description, and it will be apparent that various changes may be made in the form, construction and arrangement of the components without departing from the disclosed subject matter or without sacrificing all of its material advantages. The form described is merely explanatory, and it is the intention of the following claims to encompass and include such changes.