2

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 enter image description here

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

enter image description here

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 enter image description here

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.

Harsha J K
  • 197
  • 1
  • 1
  • 17
Irr
  • 656
  • 1
  • 9
  • 19

1 Answers1

1

What you always can do it to use diagram frames and place them inside an activity:

enter image description here

If you need to pass parameters and make use of them inside an activity you can do it this way:

enter image description here The action pin on Action1 takes the parameter to process it. As you see, you can also place the contents of an Activity manually inside its frame.

An activity is completed when it has reached its last action. More explicitly you should use a flow final to show that. I omitted it in the first example since your examples lacked it. But I usually place it at the end of each (sub-)flow.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Yes, but I cannot link any action outside the diagram frame to the diagram frame. This is the problem that I faced with my first partial solution described in my question – Irr Mar 07 '16 at 22:08
  • Why would you do that? Activities are capsules. You can add activity parameters for I/O. Inside you have a start and an end. – qwerty_so Mar 07 '16 at 22:14
  • Would you be able to give me a graphical example of this? Thanks – Irr Mar 07 '16 at 22:19
  • For example, suppose that you had an activity "FirstActivity" outside the internal diagram frame. Now how would you go to depict that after "FirstActivity" is completed, the control is transferred to the diagram frame? – Irr Mar 07 '16 at 22:48
  • See my additional example. – qwerty_so Mar 07 '16 at 23:26
  • Thanks. However, it is not fully clear to me yet. Please see the first example in my edited question. In your example you have an input parameter for your activity. What about if you do not have any input parameter like in my first example? – Irr Mar 07 '16 at 23:45
  • Now I lost you. You add a parameter and say there is none? – qwerty_so Mar 08 '16 at 09:52
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105674/discussion-between-robbo-and-thomas-kilian). – Irr Mar 08 '16 at 11:15