umldiagramuse-caseactivity-diagramuse-case-diagram

In activity diagram, can there be a fork into two actions but only one action at joining, due to inclusion of one action in the other?


Consider a system user can perform two actions in concurrent manner, the first action (A1) is just performed on the user's order, the second action (A2) includes performing (A1) when performed as it is stated in the following use-case diagram..((considering A1 completely carries out U1 and A2 completely carries out U2))..

enter image description here

so how to represent such concurrent actions in activity diagram? is any of the following diagrams valid? enter image description here


Solution

  • You are still mixing usecases with their implementation. They are independent. I would recommend you to read Bittner/Spence about use cases which is the best you can find about this topic.

    Now for your two activity diagrams.

    Left: Not in general. You can not repeat an action like this. Each action in an AD must be distinct. However, if these were activity invocations they may appear more than once (as different instances). These invocations have a little fork icon bottom right.

    Right: You could model that but it's futile. A1 will only start once A2 is finished since it needs two tokens. So you should simply make it A2 -> A1.