[UML Forum] Activity Diagram: Peoblem with synchonisation/ condition

2 views
Skip to first unread message

maurice_t

unread,
May 19, 2010, 8:10:24 PM5/19/10
to UML Forum
Hello,

I have a problematic example of an activity I try to express. The
activity gets an ID parameter (categoryID) which splits the process
into two transitions. Each one loads an Item entity. After trying to
load them it shall be checked, if the 'extraItem' exists. If so, it is
used with the (always existing) defaultItem. If not, only the
defaultItem is processed.

please take a look at this activity:

http://groups.google.com/group/umlforum/web/ProblemActivity.gif?hl=en

I assume a mistake in the diagram, but I don't know how to solve it.
The problem is that the loading actions are parallel and get
synchronised _after_ the decision whether the extraItem exists or not.
Although the decision node needs both tokens to get a result it is not
a synchronisation so I think the course is wrong at that point. But if
I do the synchronisation first there could arise a deadlock, because
an extraItem does not have to exists so that this thread is only
terminated - it would not lead into the join-node.

Can anyone give me a hint for correcting the diagram?

--
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To post to this group, send email to umlf...@googlegroups.com.
To unsubscribe from this group, send email to umlforum+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/umlforum?hl=en.

sa...@centrum.cz

unread,
May 20, 2010, 4:28:34 AM5/20/10
to umlf...@googlegroups.com
Maurice,

assuming you are entering the activity with only one defined parametr - the categoryID integer, why don't you first check its contents? Your thread of control, upon entering the depicted activity, immediately 'runs off into two directions', without any obvious reason. Try to do a 'mental run' of you process again and the proper sequencing shall unfold in your mind ...

Martinigue

______________________________________________________________
> Od: "maurice_t" <maurice....@googlemail.com>
> Komu: UML Forum <umlf...@googlegroups.com>
> Datum: 20.05.2010 02:13
> Předmět: [UML Forum] Activity Diagram: Peoblem with synchonisation/ condition

H. S. Lahman

unread,
May 20, 2010, 11:21:33 AM5/20/10
to umlf...@googlegroups.com
Responding to maurice_t...

>
> please take a look at this activity:
>
> http://groups.google.com/group/umlforum/web/ProblemActivity.gif?hl=en
>

Try this...

<pre>
[Load Extra] [Load Default]
| |
| |
======================
|
|
[Check for Extra]
|
| Extra exists
< > ----------------[Process Both]
|
| Otherwise
|
[Process Default]
</pre>

Note that the join only represents flow of control. That is, the token
does not have to be an Extra; it could be simple success/fail or even
just a notification that the process has completed. If the Load
processes just put the items someplace where they are accessible for
subsequent processing, this works fine.

[You may be able to eliminate the [Check] process. I don't use ADs so I
am not sure offhand whether UML requires the output of a join to go only
to a process.]

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
Reply all
Reply to author
Forward
0 new messages