UML modeling--the practice and experience of developing sequence diagrams using EA tools

Source: Internet
Author: User
Tags dashed line

Enterprise Architect (EA) is an OMG UML-based visual model and design tool that provides support for the design and construction of software systems, business process modeling, and domain-based modeling, and is not only used by enterprises and organizations to model systems, It is also used for propulsion models to be implemented throughout the application development cycle.

On the EA tool modeling platform, the following common design models are available:

    • Business Process Model
    • Requirements Demand Analysis Model
    • Use case model
    • Domain Model domain models
    • Class Design Model
    • Database Design Model
    • Component Component Model
    • Deployment Deployment model
    • Testing test Model
    • Maintenance Maintenance Model
    • Project Management Projects Management model
    • User interface Model Interface

The most we can use at this stage are the class design model, the database design model, the use case design model, the component model and the deployment model. We can choose the model we want to create according to our own needs, of course, if we do not choose or choose the wrong one in the late can also make changes so this step is irrelevant, this article focuses on the design of time series based on class design model practice.

Sequence diagrams are primarily used to display these interactions between objects in a series of sequences that occur interactively. Like a class diagram, developers generally think that sequence diagrams only make sense to them. However, the business people of an organization will find that the sequence diagram shows how different business objects interact and is useful for communicating how the current business is doing. In addition to documenting the organization's current events, a business-level sequence diagram can be used as a requirement file to deliver a future system delivery requirement. At the project's requirements stage, analysts can take use cases to the next level by providing a more formal level of expression. In that case, the use cases are often refined into one or more sequence diagrams.

The organization's technicians can find that sequence diagrams are very useful in documenting how the behavior of a future system should behave. In the design phase, architects and developers can use diagrams to dig out interactions between system objects, thus enriching the entire system design.

One of the main uses of sequence diagrams is to translate the requirements expressed in use cases into further, more formal levels of fine expression. Use cases are often refined into one or more sequence diagrams. In addition to the purpose of designing new systems, Sequence diagrams can also be used to record how an object that exists (called "legacy") now interacts. This document is useful when the system is handed over to another person or organization.

The main purpose of a sequence diagram is to define the sequence of events that produce some desired output. The focus is not on the message itself, but on the order in which the messages are generated; however, most sequence diagrams represent what messages are passed between objects in a system and the order in which they occur. The graph passes information in the horizontal and vertical dimensions: The vertical dimension represents the time series that the message/call takes place from top to bottom, and the horizontal dimension from left to right represents the object instance to which the message is sent.


In this practical software project, we have completed the design of Use cases model (using case models in the diagram), and take the "Process lifecycle management" as an example to design in depth.

The first step: Add the Package "add a Packages" to the class model (in the figure), named "Process Management", as shown in 1, establish the "Process management" package, and generate the "process management" use case diagram at the same time.

Step Two: Open the "process management" use case diagram and draw the "Process lifecycle management" use case.

The position of the sequence diagram is not the same as the general figure, and it is not placed in a specific "package". Typically, a sequence diagram is a task that expresses how an object works together to accomplish a particular use case, so that the sequence diagram seems to be in use cases. So, let's go to the previous step to build the "process management" use case diagram to draw the use cases that need refinement.


Figure 1

Step Three: In the "Process lifecycle management" use case, create a class model diagram and a time series diagram, such as the process shown in 2:

(1) in the "Process lifecycle Management" Use case diagram, click the right mouse button, pop-up (2) window;

(2) Select "Add", pop-up (3) window;

(3) Select "Add Diagram ...".


Figure 2

As shown in result 3, a "Process lifecycle Management" class diagram and a time series diagram are formed.

Figure 3

Fourth Step: Create the class and its properties in the Class model diagram (Attributes ... ) and methods (Operation ... )

As shown in 4, drag the class to the Class Diagram design window, double-click or right-click to select Properties, and add information in the General tab of the popup dialog box. Where the name "Process Model Management list" is the class name, the construction type can choose whether this class is a form class or a boundary class or a business class, an entity class, and so on, in this case, select "form". Visibility for a class can be set to public, private, protected, respectively. The stages and version numbers are set according to your needs. Note the comment Description that is added to the class. Select the compiled language to facilitate the generation of source code. Click the Details tab to add parameters and related instructions for properties, methods, and methods to your class.


Figure 4

Fifth step: Adding properties and methods to a class


Figure 5

Sixth step: Draw sequence diagram

In the Project browser window, double-click to open the Process Lifecycle Management Timeline window with the following components in the Toolbox window:

    • Actor: a role/performer, typically used in a use case scenario diagram, that represents the current user/operator when describing user interaction.
    • Lifeline: lifelines, most commonly used, such as systems, subsystems, post roles, modules, classes. When drawing a sequence diagram, place a lifeline symbol element across the top of the graph. The lifeline represents a sequence, modeled role, or object instance.
    • Boundary, control, and entity are three special types of Lifeline objects that are commonly used together (MVC mode, control mode):
    • Boundary: The boundary object, the beginner uses less, in the MVC pattern, the control pattern, the demand analysis transition to the system design to use more, may use to represent the interactive interface, the subsystem.
    • Control: Controlling object, which is used to represent the business logic, the Division of labor coordination of the responsibility object, the use of control mode analysis design is much used.
    • Entity object, which is used to represent data objects that need to be persisted or for a longer lifetime, such as notes, files, databases (which are typically not directly said to be a technical implementation of a database, but rather the name of a logical meaning).
    • Fragment: Fragment that represents a local sequence diagram cell, such as a conditional branch, loop, sub-graph, or sub-graph link, which can be used for sequence diagram layering modeling.
    • EndPoint: The end point, indicating the process exit, abnormal exit, the end of the sub-graph, generally with the "Diagram Gate" with the use.
    • Diagram Gate: An entrance to the diagram that represents an entry into the sequence diagram. Used in a subsequence diagram to indicate under what circumstances a sequence diagram of the previous level came in.

(Interaction Relationships) message: To display an object (for example, a lifeline) passing a message to another object, you draw a line pointing to the receiving object, including a solid arrow (if it is a synchronous call operation) or a stick arrow (if it is an asynchronous signal). The message/method name is placed above the line with the arrows. The message being passed to the receiving object that represents an action/method for the class implementation of the receiving object.

1, drag the actor into the drawing board, named "Process Manager", and then from the Project Browser tree catalog, drag and drop the "Process Model Management list" into the drawing board, forming the effect as shown in 6.

Figure 6

or directly click the Lifeline (Lifeline) command in the Toolbox, add multiple lifelines on the graph, and then roughly adjust the location of each lifeline after entering the name of the lifeline;

2, through the message to show the interaction between the objects in the diagram, in Figure 7, click the message Arrow command in the Toolbox, press the left mouse button on a dashed line, drag the left mouse button on the dashed line of another lifeline, and then double-click the message line to enter the message name.


Figure 7


In this case, the order of the classes is defined first, and the message name is selected, as shown in 8. In the figure: Initialize the default list (), the new process model (), the selected process (), and so on, are defined in the class "Process Model Management list" and are directly selected here. You can also click the button "Operations", now Add.


Figure 8


Seventh Step: sequence Diagram layering

Using the sequence diagram layering technique, you can make a diagram less complex and express different levels of detail in different levels of sequence diagrams. In the, double-click the Interactive Reference box "What to Do" to enter the sub-sequence diagram, in the sub-sequence diagram to express more detailed content.

How to: Create a separate sequence diagram (a sub-sequence diagram, such as the Process Model Management list), drag the Process Model Management list sub-sequence diagram node onto the current sequence diagram on the model tree, and select the first type "interactive Reference box" in the Popup dialog box:


Figure 9

When you complete the link sub-sequence diagram operation, a diagram is generated on the current time series diagram.

The final effect, as shown in 10, is to click on the icon for the timeline diagram "ref/Process Model Management list" that it links to. Then, figure 11 shows the sequence diagram within the Process Model Management list, showing the effect of layering in depth.


Figure 10


Figure 11

Use UML experience and vision.

A sequence diagram treats a person as a system. The goal of software development is to improve current realities, either by introducing a new system or by upgrading existing systems. Sequence diagrams force the thinking behind the action. Where the message represents the distribution of responsibility rather than the flow of data.

UML modeling using an EA is a good choice. In the actual work, the first is to ensure the development of a complete use case model to determine the scope of requirements and planning objectives, the rest of the model, according to the work requirements, design to acceptable granularity, if the resources allow, then design better according to specifications.

In the development of time series diagram, as far as possible to step fine, deep. Conversely, if the coding is not smooth, you should go back to the timing diagram development process, gradually solve, and then in-depth analysis, so that the development code as concise, clear logic. If other purposes, trick, not discussed here.

The initial use of the EA tool, the shortcomings are unavoidable, welcome feedback discussion.


Reference:

Wikipedia. Enterprise Architect

UML modeling--sequence diagram modeling techniques

Baidu Library. EA Tutorials

"Software Method" Umlchina Pangayu 2012.11

The use of UML modeling-ea (i) EA basic settings and class design ring 2013.4

UML and Enterprise Architect 7.5 Team Development Practice Manual 3.2.5 Drawing sequence diagrams in EA Rai Shinren Electronics Publishing house 2010.3

Software project requirements Development process Practice Business Modeling use case diagram Sho Yongwei 2015.3

UML modeling--the practice and experience of developing sequence diagrams using EA tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.