1
votes

I am creating an activity diagram

  1. Admin log in to the web
  2. If validated, it reaches the dashboard
  3. Through dashboard it can manage account, manage product and manages issues
  4. after performing one of above options, it can go back to dashboard or logout from system.

I have used fork/join, is it correct or I should be using decision/merge instead 2ndly, is the procedure of logging out or performing another option available in dashboard correctly defined?

enter image description here

2

2 Answers

1
votes

Your activity is having several issues.

First and most severe, it will not do anything because actions (and mostly those - not all model elements in activities) having an "implicit and sematics" for incomming control flows. This means that an action is only executed when an token is offered on ALL incomming control flow actions, otherwise it waits. So as your control flow from validate can not offer an token before Login has been executed and finished, you are having a lock. And nothing is executed. The same applies to Dashboard. To solve this you need to model merge nodes.

The second point is that you only want to execute (according to your description) one of the manage actions. (Btw. names with generic verbs like "manage", "maintain", "do", "perform", etc. are quite bad names for actions, use more specific ones instead). Your model executes, irregardless of the selection in the dashboard action, all manage actions concurrently. Concurrently means in an arbitrary order and does not demand a parallel execution. Thus you should replace the fork with a decision node, where the conditions on the outgoing flows are based on the selection from the dashboard. An decision node can have an arbitrary (but finite) number of outgoing control flows. All the outgoing control flows from the manage actions are merged using a merge node instead of a join node. As the join node would wait for an incommingtoken per incomming control flow.

A minor point, that would be solved when using an UML/SysML tool is that the fork and join nodes are bars and not rectangular frames.

-1
votes

Your AD has 2 flaws. First a fork/join is a solid thick line, but not a hollow rectangle. Second, it's used wrongly. This way you run all Manage actions in parallel and continue when they are all finished. According to your description use a diamond to decide for one of the actions Also use the diamond afterwards to merge the flows and continue to Logout.