Author Topic: Decision Block  (Read 1713 times)

AuntJulie

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Decision Block
« on: July 02, 2010, 01:22:52 am »
I need to model a situation where my fire dispatcher decides to dispatch station 1, station 2, or both stations 1 & 2 in addition to notifying both stations regardless if they are dispatched.  

The decision block essentially gives me only two choices correct?  Can I force it to give me three choices?

Any ideas?

Thanks,
Jules

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Decision Block
« Reply #1 on: July 02, 2010, 05:27:09 am »
Hi Jules,

You don't have to use a decision block at all - just use guarded transitions (as many as you need) from an activity/action with the appropriate conditions...
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9831
  • Karma: +300/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Decision Block
« Reply #2 on: July 02, 2010, 03:26:42 pm »
Julie,

Where did you get the id that a Decision (from Activities) can only have two possible outcomes?
AFAIK there is no such limitation.

Geert

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Decision Block
« Reply #3 on: July 02, 2010, 10:40:06 pm »
Geert is right, of course... the only limitation with decision blocks is, if I recall correctly, that EA only allows connectors to snap to vertices. This still allows 3 outgoing transitions before doubling-up (more than 1 connector pinned to a vertex).
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


beginner

  • Guest
Re: Decision Block
« Reply #4 on: July 02, 2010, 10:49:45 pm »
You can snap an arbitrary number of vertices at each four ends. What counts is the guard. You might also choose a fork instead.

b.
« Last Edit: July 02, 2010, 10:50:19 pm by beginner »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9831
  • Karma: +300/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Decision Block
« Reply #5 on: July 02, 2010, 10:59:57 pm »
Well, forks and decisions are not entirely the same concept.
Especially when you need to join the flows later.
From UML superstructure 2.3:
Quote
If guards are used on edges outgoing from forks, the modelers should ensure that no downstream joins depend on the
arrival of tokens passing through the guarded edge. If that cannot be avoided, then a decision node should be introduced
to have the guard, and shunt the token to the downstream join if the guard fails. See example in Figure 12.44 on page 340.

I think you can compare the difference to a
IF (x) ELSEIF (y) construction (decision)
and a
IF(x) IF (y) construction (fork)

Geert

beginner

  • Guest
Re: Decision Block
« Reply #6 on: July 03, 2010, 01:25:26 am »
You're of course right. I used "might" with intention....

b.

AuntJulie

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Decision Block
« Reply #7 on: July 05, 2010, 10:40:41 am »
Thank yall!  I used a fork instead.

I was reading the UML decription for decision blocks and it indicated that you have two paths in a decision block.

I'm using the DoDaf add on and there isn't a lot of instruction unfortunately.

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Decision Block
« Reply #8 on: July 05, 2010, 11:36:34 am »
FYI:

UML 2.2 [Superstructure] sez:

"A decision node must have one non-decision input activity edge entering it and one or more edges leaving it."

So there is no limit on the number of outgoing transitions.

As far as fork nodes are concerned, UML 2.2 sez:

"Fork nodes are introduced to support parallelism in activities."

And...

"Tokens arriving at a fork are duplicated across the outgoing edges. If at least one outgoing edge accepts the token, duplicates of the token are made and one copy traverses each edge that accepts the token. The outgoing edges that did not accept the token due to failure of their targets to accept it, keep their copy in an implicit FIFO queue until it can be accepted by the target. The rest of the outgoing edges do not receive a token (these are the ones with failing guards)."

So decision nodes and forks aren't really interchangeable from a semantic perspective... but your use of them in the case you described may actually be perfectly legit.
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.