Book a Demo

Author Topic: Activity Diagramming Question  (Read 9485 times)

JocaRamiro

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Activity Diagramming Question
« on: March 12, 2007, 10:49:51 am »
I could use some aevice on the preferred way to handle decisions and control flows within Enterprise Architect's implementation of the UML activity diagram.

1) if a decision requires input from two activities, is it good form for there to be two flows into a decision diamond or should a fork/join bar be used?

2) if one of the outcomes from a decision leads to two separate activities, is it good form for there to be two outgoing flows or should a fork/join bar be used?

I have assumd both answers to be YES, and produced a diagram  which I can't quite represent.  Is there a better way?

Mead Walker

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Activity Diagramming Question
« Reply #1 on: March 12, 2007, 01:33:25 pm »
You've assumed YES to which options that you've specified for each question?

1) From memory, a (merge) diamond will be activated as soon as one input control flow present.  In contrast, a join bar will be activated only when all input control flows are present.  As such I would say that there should be a join bar followed by the decision diamond.

2) I'm not sure if there is a constraint on a decision diamond that specifies that only one path is taken out of it.  (Just that it sounds like a condition that would match what I remember from the inputs.)  If I'm correct in this then you would need to model the decision diamond followed by the fork bar.

Having said that, there are also precedents for shorthand constructs. (eg. diamonds acting as both merge and decision) If you're model isn't going to be executed by a tool that will strictly follow these rules, then feel free to do whatever shows what you need it to.

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Activity Diagramming Question
« Reply #2 on: March 26, 2007, 04:53:21 am »
Merge - doesn't stop the flow, the token is just passed. So only one input is enough.
Decision - doesn't stop, but only one flow is run. Be careful to define the condition well (the best is logical sum of "1")
Fork - more outgoing flows are going out at once
Join, action, activity - waits for all incoming flows to be filled.

That's for UML 2.x
Jan 'Bary' Glas

JocaRamiro

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Activity Diagramming Question
« Reply #3 on: March 26, 2007, 06:40:55 am »
Thanks to both responders.  This has been helpful.  I also have to thank you for capturing what I was trying to ask, even though my question turns out to have been rather poorly written.

Just to confirm one thing that Jan said: It looks like UML merge and decision boxes look identical.  Do I indicate something is a merge by giving it a text tag "merge".  Is there any objection to having more than two streams merge?

Mead Walker

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Activity Diagramming Question
« Reply #4 on: March 26, 2007, 08:04:04 am »
Not sure and no, respectively.
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Activity Diagramming Question
« Reply #5 on: March 26, 2007, 01:21:45 pm »
Quote
It looks like UML merge and decision boxes look identical.

No they don't: A merge node has multiple in-flows; a decision node has multiple out-flows. Easy to tell them apart ;)
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Activity Diagramming Question
« Reply #6 on: March 26, 2007, 01:48:22 pm »
Quote
No they don't: A merge node has multiple in-flows; a decision node has multiple out-flows. Easy to tell them apart ;)
Especially when the flows go in an out of the same symbol...

The [size=13]UML 2.1.1 Superstructure (formal)[/size] Specification in Figure 12.76 - Decision node notation shows: "Decision node and merge node used together, sharing the same symbol".

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