I would like to to create a sequence diagram to show some interaction, and then use that sequence diagram as an interaction occurrence (sub-sequence) on other sequence diagrams. The point is I would like to apply the sub-sequence each time to a different object instance that is involved in the interaction in the sub-sequence. In my case the instances are simply various file artifacts. Is there any legitimate way of doing this prescribed by UML?
EDIT: some more clarification of my context:
- I have 2 main sequence diagrams where I want to reuse the sub-sequence as an interaction occurrence
- on the 1st main sequence there is one file for which the sub-sequence has to be applied 3 times
- on the 2nd main sequence there are 3 different files for which the sub-sequence has to be applied 3 times
- the files are read by the same object instance
- I model reading from a file by a call arrow stereotyped as
<<
read>>
to a on object instance which represents the file.
I need to reference the file somehow in the sub-sequence, but I haven't found a good and simple way of doing this.