Book a Demo

Author Topic: Structured Activity vs. Activity  (Read 8211 times)

Magnus

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • Illogica
    • View Profile
Structured Activity vs. Activity
« on: November 21, 2007, 02:22:23 am »
Hi, I've been looking through the documentation and can't seem to get a clear definition about the differences between an Activity and a Structured Activty. Are there any? Or is this just a way of saying the same thing in two different ways?

Copied from the EA User Guide:

There are five types of Structured Activity, each representing a particular structure of activity events. The five types are represented below:

· Simple Composite - represents an arrangement of activities that take place independent of each other

· Structured Activity node - represents an ordered arrangement of activities; that is, activities that have relationships

· Conditional node - represents an arrangement of activities where choice determines which activities are performed

· Sequential node - represents a sequential arrangement of activities

· Loop node - represents a sequence of activities that are - or can be - repeated on the same object.

As far as i can tell all of the above can be represented with the use of expansion regions or just ordinary activities...



Any input other than my own is really appreciated.

Should insert humorous quotation about inserting a humorous quotation here.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Structured Activity vs. Activity
« Reply #1 on: November 22, 2007, 01:16:41 am »
Quote
As far as i can tell all of the above can be represented with the use of expansion regions or just ordinary activities...


I guess you don't really need structured activities. There's an advantage though, because when you drag a structured activity to a diagram (or mark an exististing activity as "Composite element" via the "Advanced" context menu) EA will create a diagram under the activities node in the Project Browser. When later you create an rtf documentation, EA will respect the hierarchy of the diagrams and you don't have to manually order them.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Structured Activity vs. Activity
« Reply #2 on: November 22, 2007, 05:06:36 am »
Actually, one does need these, at least from a UML point of view. While EA's composite element paradigm accomplishes some of what the UML superstructure uses structured activities for, it does not cover all the ground.

Take a browse through the UML superstructure and you'll get the general idea. Think in terms of "Activity" versus "Structured Activity node" and you will have the right flavor.

David
No, you can't have it!

Magnus

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • Illogica
    • View Profile
Re: Structured Activity vs. Activity
« Reply #3 on: February 11, 2008, 02:05:45 am »
First of all i wanted to say that I'm sorry that I haven't been able to reply until now and also to say thank you for the replies.

I've started reading the UML superstructure as was suggested and I'm still quite puzzled by this. As far as I can tell all the Structured Activites is a generalization of the Structured Activity Node and an Activity is a generalization of the Redefinable Element. This states that there has to be some difference between the two. I started listing the most important differences and came up with the two following:

* An Activity consists of (mostly) Actions, edges and decision nodes, it cannot contain other Activities whereas a Structured Activity can, and probably have to, contain Activities.

* The only order of execution in an Activity is only governed by it's edges and to some extent by signals. In a Structured Activity the order of execution is also influenced by the type of Structured Activity.

As I state in the last clause i believe that the order of execution is influenced by the type of Structured Activity i found this little tidbit in the Superstructure Document intriguing:

"12.3.35 LoopNode (from CompleteStructuredActivities, StructuredActivities)
A loop node is a structured activity node that represents a loop with setup, test, and body sections.
Generalizations"

And:

"Notation
No specific notation.
Rationale
Loop nodes are introduced to provide a structured way to represent iteration."

What's the point with introducing this in EA when there's no notation for it, I mean you still have to model it since there's no syntactical sugar?

My continuing rant will now focus on the expansion regions.

I looked up Expansion Regions and found that a Expcansion Region is defined as:

"12.3.27 ExpansionRegion (from ExtraStructuredActivities)
An expansion region is a structured activity region that executes multiple times corresponding to elements of an input
collection.
Generalizations
• “StructuredActivityNode (from CompleteStructuredActivities, StructuredActivities)” on page 396"

Here we go, Isn't this iteration? Sure there's no conditional part but on the other hand there is notation so if I model the conditional part prior to entering the expansion region ain't I saying the same thing as if I would have used a loop node but with less hassle?

Phew, that was a long one. If anyone has the stamina to read this and reply  would be great.

Thanks in advance.
Should insert humorous quotation about inserting a humorous quotation here.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Structured Activity vs. Activity
« Reply #4 on: February 11, 2008, 05:01:53 am »
Actually, you found enough of the correct parts of the specification to put it all together.

So, while you reread what you wrote, here's some things to ponder...

Why not introduce the loop node, even though there is no specific notation? The whole point is that this is a specialization, as you point out, that defines an order of execution. Further, as you point out, the type defines the actual order. In this case, as you point out, the order includes setup, test, and body sections.

As to the notation, there does not have to be any "specific" notation, since the general (parent) types have defined all we need. This specialization simply specifies what is necessary for a valid LoopNode; the notation only has to obey the requirements for the LoopNode parent type, since it specifies all we need.

However, any product (EA or another) that "introduces" LoopNode needs to provide a valid notation for the Node per the specification, and ensure that you can enter the setup, test, and body sections. So, no "syntactical sugar" as far as notation goes, but still some requirements that have to be met.

As far as your "continuing rant" issue goes...

Yes, this is iteration. If you don't want to test a condition - perhaps you're running a game loop or something and will always exit from inside the loop body - then you have all you need.

If you do require a condition, you could model this from the outside "prior" to entering the expansion region, but you might be trapping yourself. In your model you have now separated the logic for your loop exit from the loop itself. What happens if these get out of sync? Perhaps nothing, perhaps something bad. What are the chances of this happening in your organization, modeling paradigm, or any particular model? Who knows, perhaps acceptably small, perhaps not.

Now enter constructs like LoopNode. Using this paradigm you've resolved the above questions.

And the "hassle" is minimal: you are doing the same work as you would need to do to "model the conditional part prior to entering" the expansion region. Where's the extra work?

Of course, you might use a LoopNode on one diagram and an expansion region on another. Each is good at explaining specific things, and each best works at its own level of abstraction. This kind of thing shows up a lot in UML.

Make any sense yet?

David
No, you can't have it!

Magnus

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • Illogica
    • View Profile
Re: Structured Activity vs. Activity
« Reply #5 on: February 11, 2008, 06:20:14 am »
Thanks for the rapid response, really appreciated.

Again i took your advice and reread what I've written as well as browsed through some articles on the subject. I guess I was right when I assumed that Structured Activities are just structural elements that enforces a design pattern.

Concerning the notation I'm not sure that I agree when you say that no additional notation is needed. It sure would be nice and in my opinion might lend quite alot to the readability of a model.

The last little isssue where i pitted the Expansion Region against the Structured Activity, was resolved as follows:
Expansion Region = Operations on whole sets of data.
Structured Activities (Loop nodes) = The whole iteration package i.e setup, test and body!

That sound about right?
Should insert humorous quotation about inserting a humorous quotation here.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Structured Activity vs. Activity
« Reply #6 on: February 11, 2008, 06:35:00 am »
Yes, that sounds about right.

As to your notation issue, your opinion is valid, as are all. But I don't think you are taking it up in the correct place. EA is merely a tool, which takes its 'direction' from the UML specification.

For whatever reason OMG - the organization that governs the specification for those not familiar - saw fit not to add a particular notation for the LoopNode element. You should probably take the issue up with OMG. They are a membership based organization. Most members are corporate. Individuals can participate though, either through organizations they themselves belong to, or through other forms of OMG membership.

Depending on the form of membership you have, it is possible to comment or even vote on future revisions to the UML specification. UML continues to evolve, so your input could have effect.

David
No, you can't have it!

Magnus

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • Illogica
    • View Profile
Re: Structured Activity vs. Activity
« Reply #7 on: February 11, 2008, 06:43:03 am »
Thanks, now i can put that behind me.

Notation would be nice. Perhaps i should look in to suggesting it to the OMG, my company is probably already involved.
Should insert humorous quotation about inserting a humorous quotation here.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Structured Activity vs. Activity
« Reply #8 on: February 11, 2008, 06:48:29 am »
Good stuff!

The thing about this kind of specification is that it really is driven by participation. It's one of those areas where if you don't play you can't win. If nobody plays there are only losers.

While you're at it though, check out SysML. This came along quite recently, and had the benefit of experience with the UML legacy to that point. Perhaps SysML will offer you more.

And remember, Sparx also produces a good SysML add-in for EA.

David
No, you can't have it!