Both Sequence and Activity Diagram are the type of Unified Modelling Language (UML) which is nothing but the pictorial representation of any behavioural flow but on the basis of what each of them emphasis we can distinguish between them.
Following are the important differences between Sequence Diagram and Activity Diagram −
|Sr. No.||Key||Sequence Diagram||Activity Diagram|
|1||Definition||Sequence diagram is the diagram in which main representation is of the sequence of messages flowing from one object to another also main emphasis is on representing that how the messages/events are exchanged between objects and in what time-order.||On other hand Activity diagram is a diagram in which main representation is of the control flowing from one activity to another implementing the logic behind these activity with the use of conditional structures, loops, concurrency, etc.|
|2||Main focus||Sequence diagram mainly focuses to represent interaction between different objects by pictorial representation of the message flow from one object to another object. It is time ordered means exact interactions between objects is represented step by step.||On other hand Activity diagram focuses to represent the work flow of a system by pictorial representation of the message flow from one activity to another.|
|3||Type||As Sequence diagram models the sequential logic, ordering of messages with respect to time so it is categorised as Dynamic modelling diagram.||On other hand Activity diagram mainly represents process flows captured in system so it is not classified as Dynamic modelling diagram.|
|4||UseCase||Sequence diagram as already mentioned is used to describe the behaviour of several objects in a particular single use case with implementation of all possible logical conditions and flows.||However on other hand Activity diagrams is used to describe the general sequence of actions for several objects in several use cases.|