How to use same activity from synchronization bar and from out of synchronization bar

36 views
Skip to first unread message

Goran Bijeljina

unread,
Sep 25, 2016, 9:23:09 PM9/25/16
to UML Forum
Hi. I have activity which can be used as one of activity from synchronization and alone (if decision is in that way)

Something like this : START ---> ACTIVITY1--->DECISION-----> IF true do just ACTIVITY2 else DO ACTTIVITY2 and ACTIVITY 3.

How to achive that without duplicate activity2 ?
ActivityDiagram1.jpg

FAUDOU raphael

unread,
Sep 26, 2016, 2:46:09 AM9/26/16
to umlf...@googlegroups.com, raphael FAUDOU
Hi,

Since UML2, nodes represent actions, not activities. So you might have two different actions that call same activity.
It is the way you support « reuse ». No duplication. 
best
Raphaël

--
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
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?hl=en
---
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umlforum+u...@googlegroups.com.
To post to this group, send email to umlf...@googlegroups.com.
Visit this group at https://groups.google.com/group/umlforum.
To view this discussion on the web visit https://groups.google.com/d/msgid/umlforum/69c7dc3c-f403-4162-9d9c-b0a2687d5980%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<ActivityDiagram1.jpg>

Goran Bijeljina

unread,
Sep 26, 2016, 7:09:50 AM9/26/16
to UML Forum
Thanks for reply Raphael but i didn't understand you. Do you want to say that diagram which I posted is correct ?

FAUDOU raphael

unread,
Sep 26, 2016, 9:22:59 PM9/26/16
to umlf...@googlegroups.com, raphael FAUDOU
Hi Goran,

Which UML tool are you using?
looks like old « Rational Rose » tool that support UML 1.X only.
UML 1.X provided activity diagram where you managed activities. In that context, there was no way to reuse activities and you were compelled to duplicate an activity used in synchronization and without synchronization (your point).

UML 2.X has improved semantics. Now an activity diagram manages « Action » elements. And amongst those actions you get a « Call Behavior Action » that can call another activity.
With that semantics your problem is solved: you get the global activity diagram with 2 different action nodes that will call same activity2. Activity2 is not duplicated.

You can refer to UML Specification 2.X for more detail on activity diagram and actions, especially Call Behavior Action.


Le 26 sept. 2016 à 09:45, Goran Bijeljina <pgor...@gmail.com> a écrit :

Thanks for reply Raphael but i didn't understand you. Do you want to say that diagram which I posted is correct ?

--
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
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?hl=en
---
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umlforum+u...@googlegroups.com.
To post to this group, send email to umlf...@googlegroups.com.
Visit this group at https://groups.google.com/group/umlforum.

H S Lahman

unread,
Sep 26, 2016, 9:23:09 PM9/26/16
to umlf...@googlegroups.com
Responding to Bijeljina...
This sounds like yet another homework problem, but here is a hint: your
decision is in the wrong place.

--
A man is drinking beer on his porch with his wife.
He: I love you.
She: Is that you or the beer talking?
He: It's me talking to the beer.

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

Imagine how much more difficult physics would be if electrons had feelings
-- Richard Feynman

Rene Descartes went into a bar. The bartender asked if he would like a drink.
Descartes said, "I think not," and disappeared.

Entropy isn't what it used to be.
-- mwalshe89

Life is an accident of infinitesimal probability.
Thus entropy acts to extinguish it with due dilligence.

Heisenberg, Godel, and Chomsky go in to a bar.
Heisenberg: Clearly this is a joke but how do we tell if is is funny?
Godel: We can't know because we are inside the joke.
Chomsky: Of course it's funny. You are just telling it wrong.

A programmer's wife tells him, "Go to the store and get a loaf of bread.
If they have eggs, get a dozen."
The programmer returns with a dozen loaves of bread.

To do is to be (Descartes).
To be is to do (Sartre).
To be do be do (Sinatra)
-- Kurt Vonnegut

H. S. Lahman
H.la...@verizon.net
website: http://www.hslahman.com/
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
software book: Model Based Development, Addison-Wesley, 2011
geology book: The Evolution and Utilization of Marine Resources, MIT Press, 1972
novel: Hobsons' Dilemma, Inifinity Publishing, 2016

Goran Bijeljina

unread,
Sep 28, 2016, 3:29:51 PM9/28/16
to UML Forum
Yes i have found a way for that problem and it is on first picture. But now I have another problem. What if i need situation from picture two ?
START---> Activity1 --------> Sinchronization ----------> DO Activity2 AND Activity3 --------> END Sinchronization ------> Acitivity4 -----> DECISION IF result from Activity4=True DO Activity 2 AND GO to END (do not do activity4 again)---->ELSE go to END
ActivityDiagram1_1.jpg
ActivityDiagram2.jpg

Goran Bijeljina

unread,
Sep 28, 2016, 3:29:57 PM9/28/16
to UML Forum, raphael...@samares-engineering.com
Hi. I am using StarUML. I have found solution for first problem (it is in reply to H.S.) but now I have another problem (picture 2 in reply to H.S.)

H S Lahman

unread,
Sep 30, 2016, 12:15:37 AM9/30/16
to umlf...@googlegroups.com
Responding to Bijeljina...

Yes i have found a way for that problem and it is on first picture.

Assuming you are attempting to define concurrent processing, this is better. However, what is the point of the lower decision? A decision implies there is choice in where to go next.

 
But now I have another problem. What if i need situation from picture two ?
START---> Activity1 --------> Sinchronization ----------> DO Activity2 AND Activity3 --------> END Sinchronization ------> Acitivity4 -----> DECISION IF result from Activity4=True DO Activity 2 AND GO to END (do not do activity4 again)---->ELSE go to END

This diagram is correct, assuming you might need to repeat A2 after A4.

However, I am confused about the "do not do A4 again" qualifier. The is no loop here, so how would A4 get repeated?

Goran Bijeljina

unread,
Sep 30, 2016, 10:50:33 PM9/30/16
to UML Forum
Hi. Activity4 is checking of "sometnihg" and after that i need to do just activity2 which is in sinhronization and before activity2 so if i repeat activity2 after that is activity4 but in that case i don't want to check again.

H S Lahman

unread,
Oct 1, 2016, 11:38:26 AM10/1/16
to umlf...@googlegroups.com
Responding to Bijeljina...


Hi. Activity4 is checking of "sometnihg" and after that i need to do just activity2 which is in sinhronization and before activity2 so if i repeat activity2 after that is activity4 but in that case i don't want to check again.

I am still not sure what the problem is here. The join ensures that both A2 and A3 will have completed before A4 is executed. Only then is A4 executed. When it completes, there is a test to see whether A2 needs to be executed again or not. Whether A2 is executed or not, you are then done and exit. (You still need an arrow from the second A2 to the exit point that is missing from your diagram.)  So I still don't see how A4 might get repeated.

-- -- You received this message because you are subscribed to the Google Groups "UML Forum" group. Public website: www.umlforum.com 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?hl=en --- You received this message because you are subscribed to the Google Groups "UML Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to umlforum+u...@googlegroups.com. To post to this group, send email to umlf...@googlegroups.com. Visit this group at https://groups.google.com/group/umlforum. To view this discussion on the web visit https://groups.google.com/d/msgid/umlforum/4e87180a-0263-4379-8d91-568a6e8d094c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages