Well, I’m working on sequence diagram and I got confused when I found a some function could be a standalone function for a complete process the user may do, and it could be a sub process of a bigger process like
the first process: “historyClassRegistration(studentId)”
the second process: “allClassesRegistration(studentId)”
the student can register only history class
also he can register all classes which includes “historyClassRegistration” process inside
the question is:
should I draw the “historyClassRegistration” process alone with it’s sub-processes and redraw it again with it’s sub-processes in “allClassesRegistration”, or what can I do???
I think it probably depends on what use case the sequence diagram is trying to demonstrate.
It will also depend on the structure of the system.
If I had control of the design, the first operation would probably not exist. The type of class being registered for seems like it should be a parameter, unless the process for registering for classes is radically different between classes.
If your diagram was to show a student registering for all classes then there would just be a loop over a
student.registerForClass(class)operation.If your diagram was to show the internal execution of the
allClassesRegistration(studentId)operation, then you might show a diagram with a loop over something likeclassRegister.register(studentID, Class).If it was to specifically show a student registering for a history class, its really a scenario in which the
student.registerForClass(class)is called withclass = history. You might then show more detail of what happens to the object with which the student is registering.