Can we have a cycle in an activity diagram?
For example in Registeration Use case, a form must be filled out and give to the secretary. It may not be filled correctly, so the secretary would call him later to come and fill out the form again. Can we show it in activity via a cycle? or we have to have to end state in Registeration Activity Diagram, one when the form is filled correctly and one when it is not?
Thanks for any help.
ThomasJ 060000T7U61 Post
Re: Cycle in an activity diagram2010-01-05T09:22:15ZThis is the accepted answer. This is the accepted answer.Yes, you can :)
Create a simple decision(diamond), name it "Correct ?", If "yes" go forward if "No" go back to activity "Fill out Form". If you use swimlanes you would probably have one for swimlane for the "secretary" and one for the "Registrator". The decision would be in the secretay swimlane.
Similar questions can be asked and will be answered at www.usecase.com.
SystemAdmin 110000D4XK3545 Posts
Re: Cycle in an activity diagram2010-01-05T20:50:29ZThis is the accepted answer. This is the accepted answer.A cycle in an activity diagram is allowed, but it may not be appropriate in your situation. Activity diagrams can be used for various purposes, e.g.
[A] To define a business process;
[B] To define the possible flows within a single use case.
From your posting, I assume that you want to use the diagram for purpose [B]. In that case, I would not recommend a cycle.
In RUP and many other methods, a use case ends when the user ends his/her session or continues executing another use case. In the case you describe, the user fills out a form, sends it to the secretary and ends his session or continues doing other work. There the use case ends. In the activity diagram, this corresponds with a final node. There will be one final node, regardless of whether the form is filled our correctly or not. Later on, when he is notified that the form was not filled in correctly, he starts the use case all over again.