After searching the net and a couple of old fashioned books I own, I still haven't found my answer to how to model an activity for a specific use case. I am fairly new to UML and thus activity diagrams.
The activity is Add hotel. This is fictional, but the issue is exactly the same as my issue. My contract prevents me from talking about the real deal to third parties.
In this activity the user provides necessary details and has two optional actions that he can choose at anytime while in the Add hotel activity:
As said these are optional and not mandatory. The user is also able to proceed to save the entered data. However, when choosing one of these actions, I imagine another activity diagram should be invoked, named the same as the choice the user made. In this activity all relevant stuff is entered and at the endpoint the user returns to the Add a hotel activity after which the user has the option to choose the optional activities again or proceed to save the provided data.
The only somewhat relevant answer I found was this one
But as I understand it, a fork means all actions after it have to be carried out before the flow will continue after the join. And in case of a decision, only one option can be chosen.
The actions 1 and 2 above, are also available from other locations in the application. I just need to make them available on the Add hotel activity.
So how would I go about modelling optional actions that are available all the time during the flow of an activity? And why should it be done that way (if not obvious after reading) Also, does it matter if these optional actions are Atomic actions or CallBehavior actions?
Like is said, I'm fairly new to UML, so it might well be possible that I interpret some things wrongly.
Actions are notated as round-cornered rectangles. Name or description of the action is placed inside of the rectangle. The Process Order action. Name of the action is usually action verb or noun for the action with some explanation.
Activity diagrams show the flow of control and activities as rounded rectangles. Activities are typical action states – states that transit automatically to the next state after the action is complete. The filled-in circle represents the start of the activity diagram where the flow of control starts.
To create a Activity Diagram: Select first an element where a new Activity Diagram to be contained as a child. Select Model | Add Diagram | Activity Diagram in Menu Bar or select Add Diagram | Activity Diagram in Context Menu.
The initial node is the starting point of an activity. An activity can have more than one initial node; in this case several flows start at the beginning of an activity: It is also possible that an activity has no initial node, but is initiated by an event (action: accepting an event).
You're correct in the assumption that a fork will continue in all paths. To make an optional process simply use a Decision node (looks like a lozenge). From there you can proceed to your two optional actions or skip. Finally join the path again with the very same lozenge to merge the optional paths.
Basically it might look like this (not taking all the details of your activity into account):
Just ignore all those fuzzy details about different actions. Atomic is enough for a start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With