How to depict nested action/activities in a UML Activity Diagram?

I would like to create an activity diagram in which one of the actions is depicted with its sub-actions. To better clarify I would like to be able to depict something like the following diagram

The problem in my case is that SubActivity1 does not have any input parameter. I just want SubActivity1 to start its execution when OpaqueAction1 is completed.

I know that it is possible to use a CallBehaviorAction to express that an Action will result in the execution of another Activity like in the following diagram

But, in this way I cannot depict the sub-actions in the same activity diagram.

I also thought of using a StructuredActivityNode like in the following diagram

here the problem is that I am not able to show the name of the StructuredActivityNode. I do not know whether this is an issue of the tool that I am using (Papyrus) or it is a general issue.

1 ответ

То, что вы всегда можете сделать, это использовать фреймы диаграмм и поместить их в упражнение:

Если вам нужно передать параметры и использовать их внутри действия, вы можете сделать это следующим образом:

Вывод действия на Action1 принимает параметр для его обработки. Как видите, вы также можете вручную поместить содержимое действия в его фрейм.

Деятельность завершается, когда она достигла своего последнего действия. Более явно вы должны использовать поток final, чтобы показать это. Я пропустил это в первом примере, так как в ваших примерах его не было. Но я обычно помещаю это в конце каждого (под) потока.

Другие вопросы по тегам