In PIM-4, a system analyst can use a sequence diagram to express the interaction between a group of objects in the system when a system use case is completed and executed. Later, the sequence diagram may be adjusted by the designer's hand, and become the programmer's most concern for the design of the second (the other is the class diagram). Programmers usually follow the content of the sequence diagram and write out the source code of the method.
In addition, PIM-1 's system use case narration and PIM-3 class diagram have an indispensable contribution to the PIM-4 sequence diagram. From the PIM-1 system use case narrative, the system analyst can analyze the system flow. In the PIM-3 class diagram, the system analyst defines the static structure inside the system. Then, to the PIM-4 sequence diagram, the system use case and the static structure are combined.
By thinking and expressing the sequence diagram, the system analyst tries to arrange the interaction between the groups of objects generated by the class, so that the group of objects can work together to complete a system use case. Also, in sequence diagrams, the actions that a group of objects interact with can be fed back to the class diagram, defining more actions and attributes, and even discovering other classes and relationships that were not previously discovered.
A system analyst can draw a sequence diagram by referring to the following steps:
- The performer object that plays the initiator is placed at the left of the sequence diagram, and the performer object that plays the supporter is on the far right of the sequence diagram.
- For each process step documented in the system use case narrative, determine what data is required for execution and assign the object that owns the data to be responsible for the work.
- Try to execute the sequence diagram to adjust the process and add parameters to the operation.
- Feedback the actions and attributes found when plotting the sequence diagram to the class diagram.