What ist the difference between Structured Activity and Sub-Activity in UML?

280 Views Asked by At

I am modeling in SPARX EA - and first I just came across two different icons:

  • glasses/chain enter image description here

  • The rake/trident enter image description here

Now my understanding is: A composite activity is one possibility for a structured activity. SPARX EA says, the chain symbol indicates a composite element (icon not being part of UML, but comes in handy).

The trident indicates a sub-activity. It is part of other stack-questions. Got that. here or here

But my question is:

How do they differ?

  1. Is a composite activity (its "sub diagram") only within that process and cannot be called/used by s.o. else? So not a distinct process on its own, just a part of the parent activity?
  2. Is a sub-activity always (technically) callable by others?
  3. And are there differences w.r.t. to forking? Like that a composite activity is "closed", just more details, and a sub-activity can run freely and parallel while the invoking process goes on? If so, why is this a sub-activity but seems "closed". So what does it have more or less compared to a composite activity? "Callability by others"?

Thanks for your clarifications :)

[I am asked what I tried. Well I googled. :)]


UPDATE 2023-05-08: Here I would expect the glasses:

Substeps_in_process

2

There are 2 best solutions below

7
www.admiraalit.nl On BEST ANSWER

The glasses are not UML-compliant. I think it was present in earlier versions of the UML specs, but I'm not sure. To be UML-compliant, use the rake instead.

The disadvantage of the glasses (structured activity) is that they create a strict parent-child relationship between activities and subactivities, i.e. a tree. With the rake (call behavior), you can create any network of activities calling each other. This allows you to reuse an activity in multiple other activities.

By default, the symbol with the rake represents a synchronous call. The UML specification says that asynchronous calls are also possible. It defines a property isSynchronous on metaclass CallAction, which is true by default, but it does not specify how to an asynchronous call shall be visualized in an activity diagram.

4
qwerty_so On

In EA a structured activity is an activity which has a (composite) diagram associated. This will open when dbl-clicking the activity in a diagram. Else this is an Activity as defined in the UML specs.

The element with the fork is an instance of an Activity. It is therefore an Action (with CallBehavior). Thus you can have it in a chain of events connected via ControlFlow to other Actions.

enter image description here

When you press Ctrl-L with that Action in focus you will see the Activity which is it's classifier.