Introduction
Unified Modelling Language "UML", is becoming a widely-recognized method to define, organize and display all the components of a system architecture into a standard model.
We can define a system as a construction made by human and technological tools that follow some rules to achieve a goal. The word "system" is used to materialize an abstraction and adjust it according to a certain reality. In this case, UML makes it possible to create and represent simple models of a complex reality.
How can we use UML?
Using UML we can communicate and share the knowledge of a system architecture by combining simultaneously five perspectives :
Define: Firstly it is important to determine, decide and explain a concept through its distinctive attributes. We have to put the limits and choose what is important and what is just circumstantial.
Organize: Secondly, the resources must be established and the responsibility order has to be defined. Besides, it is vital to formalize the relation an behavioural patterns in order to reach the system goal.
Visualize: It means to represent by using images or symbols all the content and organization of the concepts that belong to the system. In other words, to make visualize its structure and complexity.
Act: It is important to make decisions quickly and following a method, which define the acting rules based on the relationship between the actors, activities and certifications that are possible in a concrete scenery.
Certificate: It is necessary to prove accurately that the product we offer is complete, useful, and it has coherence. In other words, the product must reach the purpose that it was made for.
The result will be a better understanding about the nature of objects, events and facts that have consequences inside of a domain. Considering these ideas, and clarifying that the reader must have basic knowledge of how to model systems using UML, we can go to the next step, which refers to the comprehension of the behavior of all the components that were mentioned before. To achieve this task, we'll study the usage of one type of diagrams that UML offer: The State Diagrams.
State Diagrams
The state diagrams show the behavioural patterns of an object, it means all the states that has an object through its life. The diagram also includes all the facts that make an object change from one state to another. We can see this idea in the following diagram:
The picture shows a part of a class diagram, which shows the relationship between the Document Class and the Revision Class. In fact, with this association we can see that a single document can pass more than one revision process. Besides, this scenery suggests that we take control of the revision process associated with a document. Then we must get a mechanism that makes it possible to represent all the states that a process may have during its existence.
This requirement that have been mentioned above may be satisfied by using the State Diagrams that UML offers to us.
A state identifies a period of time in an object's "life", at which the object is waiting for an operation. During this time, the object shows a special behavior or it can receive certain stimulus.
In UML notation, a state is represented by a rectangle with blunt borders. It may have three sections, the first is for the name, the second for the attributes of the object in thst state and the last one is for the actions that occur when the object enters, leaves or stay in a state (entry, exit or do respectively). For example in the picture 2, we have six states. (IN PROGRESS, APPROVED, CANCELED, REJECTED, INCOMPLETE and IT NEEDS CHANGES ) If the object enters the state IN PROGRESS it must change the state to the associated document. When the document leaves that state, the user that started the revisión process must be notified in order to update the document state.
The arrows represent a transition between two states. As the picture shows, a transition may be labeled to describe the condition that will be evaluated to produce a change of state and also the action that will occur if the condition is true. In so doing, we have in the picture 2 the transition that goes from the state IN PROGRESS to the state APPROVED, the condition is that the number of approvals must be equal to the number stablished beforehands. If it happens, the action APPROVE will take place.
What I'm trying to show is a practical a usage of state diagrams without get the readers sick with excessive notation that is used in this sort of diagrams. If you need further information about UML notation for this and other diagrams you can check the following Internet source:
http://www.rational.com/uml/resources/documentation/index.jsp
Conclusions and Recommendations
The state diagrams are suitable to describe the way an object acts through different use cases, nevertheless they aren't appropriate at all when we want to describe the acting of a set of objects collaborating between them. Thus, it is useful to combine the state diagrams with other techniques. For example, the Interaction Diagrams are the ideal solution to describe the behavioristic patterns of many objects in a single use case. On the other hand the Activity Diagrams show the clearly the general sequence of actions for different objects and use cases.
Copyright © by informatizate Group 2002-2004. All Rights Reserved.
The total or partial copy of any content from this site is absolutely forbidden.
Online since November, 27th, 2002
|
|