| | 1 | = UC0002 - Create Activity Session = |
| | 2 | |
| | 3 | '''Initiating actor:''' Board Member |
| | 4 | |
| | 5 | A Board Member creates an activity session and records who is responsible for it. The scenario creates a PR workshop connected to BEST Course in Summer 2026. |
| | 6 | |
| | 7 | == Scenario == |
| | 8 | |
| | 9 | 1. The Board Member opens the activity session creation form. |
| | 10 | |
| | 11 | 2. The application lists available activity types. |
| | 12 | |
| | 13 | {{{#!sql |
| | 14 | SELECT |
| | 15 | at_name, |
| | 16 | at_description |
| | 17 | FROM activity_types |
| | 18 | ORDER BY at_name; |
| | 19 | }}} |
| | 20 | |
| | 21 | 3. The Board Member enters the activity session data. |
| | 22 | |
| | 23 | 4. The application stores the activity session. |
| | 24 | |
| | 25 | {{{#!sql |
| | 26 | INSERT INTO activity_sessions ( |
| | 27 | at_name, |
| | 28 | as_start_time, |
| | 29 | as_location |
| | 30 | ) |
| | 31 | VALUES ( |
| | 32 | 'PR Workshop', |
| | 33 | TIMESTAMP '2026-06-22 17:00:00', |
| | 34 | 'Baraka 2.1' |
| | 35 | ); |
| | 36 | }}} |
| | 37 | |
| | 38 | 5. The application records the responsible member. |
| | 39 | |
| | 40 | {{{#!sql |
| | 41 | INSERT INTO responsible_for ( |
| | 42 | student_index, |
| | 43 | at_name, |
| | 44 | as_start_time, |
| | 45 | as_location |
| | 46 | ) |
| | 47 | VALUES ( |
| | 48 | 230006, |
| | 49 | 'PR Workshop', |
| | 50 | TIMESTAMP '2026-06-22 17:00:00', |
| | 51 | 'Baraka 2.1' |
| | 52 | ); |
| | 53 | }}} |
| | 54 | |
| | 55 | 6. The application links the activity session to BEST Course in Summer 2026. |
| | 56 | |
| | 57 | {{{#!sql |
| | 58 | INSERT INTO related_to ( |
| | 59 | at_name, |
| | 60 | as_start_time, |
| | 61 | as_location, |
| | 62 | et_name, |
| | 63 | event_title, |
| | 64 | event_start_time |
| | 65 | ) |
| | 66 | VALUES ( |
| | 67 | 'PR Workshop', |
| | 68 | TIMESTAMP '2026-06-22 17:00:00', |
| | 69 | 'Baraka 2.1', |
| | 70 | 'BEST Course in Summer', |
| | 71 | 'BEST Course in Summer 2026', |
| | 72 | TIMESTAMP '2026-07-05 12:00:00' |
| | 73 | ); |
| | 74 | }}} |
| | 75 | |
| | 76 | 7. The application shows the created activity session. |
| | 77 | |
| | 78 | {{{#!sql |
| | 79 | SELECT |
| | 80 | a.at_name, |
| | 81 | a.as_start_time, |
| | 82 | a.as_location, |
| | 83 | s.first_name || ' ' || s.last_name AS responsible_member, |
| | 84 | rt.et_name, |
| | 85 | rt.event_title |
| | 86 | FROM activity_sessions a |
| | 87 | JOIN responsible_for rf |
| | 88 | ON rf.at_name = a.at_name |
| | 89 | AND rf.as_start_time = a.as_start_time |
| | 90 | AND rf.as_location = a.as_location |
| | 91 | JOIN students s |
| | 92 | ON s.student_index = rf.student_index |
| | 93 | LEFT JOIN related_to rt |
| | 94 | ON rt.at_name = a.at_name |
| | 95 | AND rt.as_start_time = a.as_start_time |
| | 96 | AND rt.as_location = a.as_location |
| | 97 | WHERE a.at_name = 'PR Workshop' |
| | 98 | AND a.as_start_time = TIMESTAMP '2026-06-22 17:00:00' |
| | 99 | AND a.as_location = 'Baraka 2.1'; |
| | 100 | }}} |