IBM Support

Call behavior actions cannot be linked to activities, if an activity diagram is moved out of an activity

Troubleshooting


Problem

In IBM Rational Software Modeler and IBM Rational Software Architect, it is possible to open an activity diagram from a use case diagram by double-clicking on a use case; however, the activity diagram must be directly under the use case element.

Cause

If the activity diagram is moved, a call behavior action can no longer be directly linked to the activity. The tool generates a clone of this activity diagram. These results are to be expected.

Diagnosing The Problem

The following steps will recreate the scenario:

1. Create a UML project, a UML model and add a Use Case Diagram

2. Create two use cases in that diagram called, for example, Delete and Find

3. Create an activity under Find and an action called, for example, findByID, under the activity. Doing so will also create an activity diagram within the activity.

4. Drag the activity diagram up so that it is directly under the use case in the Project Explorer. This allow you to open this diagram by directly double clicking on the Find usecase from the usecase diagram.

5. Create an activity under Delete. Doing so will also create an activity diagram within the activity.

6. Create a call behavior action on the activity diagram under Delete and, when prompted, select Existing element and choose the activity under the usecase Find.

7. Double-click on the call behavior action

    Result: The call behavior action will not find the activity diagram. You will be prompted with the message Create Activity Diagram: Could not find a Activity diagram; create one?

8. Select Yes at this prompt
    Result: A clone of the activity diagram is created. Now there are two activity diagrams for the same activity.

Resolving The Problem


In Step 6, the user creates a call behavior action and associates it to the Find activity.

When double-clicking on the call behavior action in order to try to open the activity diagram, Rational Software Modeler/Rational Software Architect will give the Could not find a Activity diagram... message, as expected, because the activity Find no longer has an activity diagram directly under it: its activity diagram was moved to the level between the use case Find and the activity Find in Step 4.

If the user replies with Yes, it will create an activity diagram under the activity Find, as expected. Because activity diagrams are canonical, all elements under the activity (in this case there is only the findByID action) will be drawn onto the activity diagram.

Canonical diagrams are diagrams in which the contents of the model are synchronized with the contents of the diagram. As a result, any change in the model will automatically be reflected on the diagram and vice versa.

Strictly speaking, this new activity diagram is not a clone of the previous one, as the position of the findByID action in the diagram is not the same. Also, if you rename the activity diagram in Step 4, the name of the new diagram in Step 8 will be different.

[{"Product":{"code":"SSCLKU","label":"Rational Software Modeler"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modeling: Diagrams","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modeling: Diagrams","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}},{"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modeling: Diagrams","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21375903