1
votes

I understand that UML sequence diagram is to depict, sequential and ordered flow of messages between components. I would like to depict such a flow in a distributed system, with node being my components.

The flow I want to represent, is in the form of A->B->C. Say this system has N nodes; A can be any node within these N nodes; B can be any node other than A; and C can be any node other than A and B. Such a flow would be different from, say, A1->A2->A3, where A1, A2, and A3 can be any nodes in the system, and I don’t care if A1 and A2 are the same. I am wondering if UML has a formal way to describe such a relationship. Or if other diagrams/models are better in describing this.

For now the only way I can think of is to have three entities, each named “A”, “B”, and “C”. But this means that the reader has to infer implicitly that A, B, and C are different nodes by their name. I am looking for a way to formalize this.

1
Different object timelines in a sequence diagram represent different objects, so I'm not sure that any further information is required. If they could be the same object, then I'd add a note to the effect. - Pete Kirkham
I am trying to do some formal proof based on it, so I am wondering if UML provides a way to represent this. - yangsuli
UML has no formal semantics, so create your own constraint, note or stereotype and attach it to the diagram or timelines. - Pete Kirkham

1 Answers

3
votes

Actually each life line represents an instance. And each instance has a classifier. So in this SD

enter image description here

you have four different life lines. One classified with A, two with B and one with C. Any SD always shows a concrete flow to highlight a collaboration of objects.