ooad1-8 Exercise 3: 'Join the Library' as an Activity Diagram ==================================================================== join.activity.puml (PlantUML 1.2026.8): @startuml scale 1000 width |Applicant| start :Fill in the application; :Show proof of address; |Librarian| :Check the proof of address; if (proof acceptable?) then (no) |Applicant| :Told what is missing; stop else (yes) |System| :Create the membership record; fork |System| :Record the card number; fork again |Librarian| :Print and laminate the card; end fork |Librarian| :Hand over the card; |Applicant| :Sign for the card; stop endif @enduml Render (render_diagrams.py from chapter 2): rendered ex3\join.activity.puml -> join.activity.puml.svg (10 KB) What you should see: three columns (Applicant, Librarian, System). The applicant fills in the form and shows proof of address; the librarian checks it; the 'proof acceptable?' decision sends a 'no' back to the applicant (told what is missing, end) and a 'yes' to the system, which creates the membership record; then a thick bar splits into two parallel actions, 'Record the card number' (System) and 'Print and laminate the card' (Librarian); a second thick bar joins them; the librarian hands over the card and the applicant signs for it. Why the fork is justified: recording the number and printing the card do not depend on each other and are done by different actors, so the diagram should not imply an order. If the printer needed the number first, it would be a sequence, and a fork would be wrong. The lanes were named at the start of each branch (see 'Mistakes while preparing this chapter'): without that, the 'yes' branch would have inherited the lane of the last step in the 'no' branch. WHY THIS WORKS AS AN ANSWER --------------------------- It uses each feature for a reason: swimlanes for who is responsible, a decision for the one real choice, a fork and join for genuinely parallel work. There is deliberately no loop for 'try again with better proof': that would be a second application, a different run of the process.