Swapping allows counter-change symbols with each other on the diagram.

Example of swapping actions in Activity diagram

You can swap the symbols in the following diagrams:

  • In the Activity diagram, you can swap actions, merge or decision nodes, join or fork nodes with each other, if the symbols are connected through control flow.
  • In the State diagram, you can swap states or pseudo states (initial state, deep history, join, fork, junction, choice, entry point, etc.) with each other, if symbols are connected through transition.

 

To swap elements, do one of the following


  • Drag one shape onto another.

    Swap does not work when dragged shape can be added into the target shape (or in other words, can be added as a child).

  • On the diagram, select the two shapes that you want to swap, right-click, and from the shortcut menu, select Refactor > Swap.

 

  • Swapping does not work when symbols have different parents.
  • If you cannot swap within a Teamwork Cloud project, make sure you have the right to edit the model of this project and then try to lock for edit this diagram.

In the following example, you can see the cases when you can swap the elements and the cases when you cannot swap the elements.

 Example of swapping. The green lines are drawn between the elements that you can  swap, and the red  lines are drawn between the elements that you  cannot swap.

RuleExample

You can swap the elements that
are in the same branch

You can swap the following elements:

  • “Select the reading item to remove” with “Confirm deletion”
  • “Request removal confirmation” with “Check if there are loaned copies of reading item”
  • “Check if there are loaned copies of reading item” with “Notify librarian and do not allow removal”
  • “Check if there are loaned copies of reading item” with “Check if reading item is reserved”

You cannot swap the
elements that have different parents

You cannot swap the following elements:

  • “Select the reading item to remove” with Request removal confirmation, because one element is in the “Librarian” partition and the other is in the “System” partition.
  • “Confirm deletion” with “Check if there are loaned copies of reading item” because one element is in the “Librarian” partition and the other is in the “System” partition.

You cannot swap the elements that
are in different branches

You cannot swap the following elements:

  • “Notify librarian and do not allow removal” with “Check if reading item is reserved”.