Book a Demo

Author Topic: Auto-generate Scenarios from an Activity Diagram  (Read 4665 times)

allanm

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Auto-generate Scenarios from an Activity Diagram
« on: July 31, 2005, 06:52:02 pm »
Being new to the EA and associated methodologies, I was wondering if anyone is aware of a tool that will automatically generate written 'scenarios' based on an Activity Diagram?

I have a relatively complex Activity Diagram which I am using in my use-case to write a basic and alternate paths. Because the diagram is so complex, I am initially having troubles writing out the paths. More importantly though,  I see big problems in the future surrounding readability and also maintanability.

Does such a tool exist?

My basic understanding is that XML sits behind these diagrams in EA. How difficult would this feature be to create?

Thanks
« Last Edit: July 31, 2005, 06:52:38 pm by allanm »

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Auto-generate Scenarios from an Activity Diagr
« Reply #1 on: July 31, 2005, 11:13:30 pm »
Quote
I have a relatively complex Activity Diagram which I am using in my use-case to write a basic and alternate paths. Because the diagram is so complex, I am initially having troubles writing out the paths. More importantly though,  I see big problems in the future surrounding readability and also maintanability.


Now here we have in a nutshell what UML is all about.  If the  diagram is so complex that even the modeller is not coping, then it is not a good model.

As you have suspected,  I will confirm.  There will be problems with readability and maintainance.

The goal of UML is to produce concise and unabiguous representations of a problem (and/or its solution).  If the model itself is part of the problem then, to put it simply, the model is wrong.

Are you sure that the use case is pitched correctly?  If the number of possible scenarios is that large, then is it a well formed use case?  

Are all the paths truly scenarios?  As I wrote elsewhere, futile loops do not constitute a valid scenario.  For example, "insert card, enter PIN, select withdrawal, select check account, select cancel, select savings account, enter amount....etc" is not a seperate scenario to "insert card, enter PIN, select withdrawal, select savings account, enter amount....etc" (nor is it different to "insert card, enter PIN, select withdrawal, select check account, select balance, select cancel, select savings account, select balance, cancel, select other account, select balance, cancel, select savings account, enter amount....etc").

Look at your mega model from a slightly higher altitude.  Ignore the inards and look at what the possible outcomes are.  In the above, "user gets money | user doesn't get money".  How many realistic ways, can user get money? (Probably one)  How many significant ways can the user not get the money?  Are there any other outcomes that may require further consideration?  Perhaps  "user gets money + considerable unsolicted periodic marketing material" is important?  Is the (obvious) corollary important?

Also, check that the model isn't sufferig from the "drive to the shop" syndrome.  There are an infinite number of ways to get from home to the shop, only very few are important.  Even though paths involving high altitude ballons and great circles are feasible, the likelihood of an instance versus the cost of analysis and design is not a good number.  Which way is this mega model tending?

hth
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Auto-generate Scenarios from an Activity Diagr
« Reply #2 on: August 01, 2005, 12:32:14 am »
Quote
[size=13][SNIP][/size]
The goal of UML is to produce concise and unambiguous representations of a problem (and/or its solution).  If the model itself is part of the problem then, to put it simply, the model is wrong.
[size=13][SNIP][/size]
I can confirm bruce's view.  I'm now using UML2 as my "thinking repository".  As soon as I can't follow the model, then I stop and recheck the model with "reality".

That's not to say some things aren't complex.  But as both bruce and I are saying: when you see complexity, first check it isn't because of what you are doing (or the viewpoint you're taking)...

I've found that the correct application of abstraction techniques can make things easier to understand.  I know they didn't teach me these at school, I had to learn them - the hard way.

I use the "show cause" process - "show me why you have to be different".

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

allanm

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Auto-generate Scenarios from an Activity Diagr
« Reply #3 on: August 01, 2005, 12:58:02 am »
Many thanks. I will take some time to digest your comments and revisit my model.

All complexity aside, I still see big effeciency gains in having a tool that could auto-generate basic and alternate paths from an Activity Diagram (with your comments they should be more simle paths however). For maintainability purposes alone it would be great if someone could alter their activity diagram and hit the magic button to update the written scenarios. For those people not visually orientated the reverse could be done i.e. update your written scenarios and hit the magic button to generate an activity diagram.

Has anyone exported the XML from an Activity diagram to see how complicated this would be? If there aren't any tools available out there I might give it a try myself.

Thanks again.
Allan

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Auto-generate Scenarios from an Activity Diagr
« Reply #4 on: August 01, 2005, 03:14:17 am »
Quote
[size=13][SNIP][/size]
Has anyone exported the XML from an Activity diagram to see how complicated this would be? If there aren't any tools available out there I might give it a try myself.
[size=13][SNIP][/size]
Well Allan,

I'm exporting XML according to an XSD I'm developing to emit conceptual metadata from the model.  It's relatively easy.  However, it seems to me that it would be useful if we all cooperated on a consistent view of what can be output.

For example, I, too, wanted to eventually manage UseCases and Activities in a more coordinated way.

I was looking at extending the current XSD to incorporate Behavioural aspects of the model.

In my view, exporting XMI is not appropriate, however, others may differ.

If you're interested in cooperating, contact me off-line.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!