wiki:UseCase0002

Version 1 (modified by 236024, 8 days ago) ( diff )

--

UC0002 - Create Activity Session

Initiating actor: Board Member

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.

Scenario

  1. The Board Member opens the activity session creation form.
  1. The application lists available activity types.
SELECT
    at_name,
    at_description
FROM activity_types
ORDER BY at_name;
  1. The Board Member enters the activity session data.
  1. The application stores the activity session.
INSERT INTO activity_sessions (
    at_name,
    as_start_time,
    as_location
)
VALUES (
    'PR Workshop',
    TIMESTAMP '2026-06-22 17:00:00',
    'Baraka 2.1'
);
  1. The application records the responsible member.
INSERT INTO responsible_for (
    student_index,
    at_name,
    as_start_time,
    as_location
)
VALUES (
    230006,
    'PR Workshop',
    TIMESTAMP '2026-06-22 17:00:00',
    'Baraka 2.1'
);
  1. The application links the activity session to BEST Course in Summer 2026.
INSERT INTO related_to (
    at_name,
    as_start_time,
    as_location,
    et_name,
    event_title,
    event_start_time
)
VALUES (
    'PR Workshop',
    TIMESTAMP '2026-06-22 17:00:00',
    'Baraka 2.1',
    'BEST Course in Summer',
    'BEST Course in Summer 2026',
    TIMESTAMP '2026-07-05 12:00:00'
);
  1. The application shows the created activity session.
SELECT
    a.at_name,
    a.as_start_time,
    a.as_location,
    s.first_name || ' ' || s.last_name AS responsible_member,
    rt.et_name,
    rt.event_title
FROM activity_sessions a
JOIN responsible_for rf
    ON rf.at_name = a.at_name
   AND rf.as_start_time = a.as_start_time
   AND rf.as_location = a.as_location
JOIN students s
    ON s.student_index = rf.student_index
LEFT JOIN related_to rt
    ON rt.at_name = a.at_name
   AND rt.as_start_time = a.as_start_time
   AND rt.as_location = a.as_location
WHERE a.at_name = 'PR Workshop'
  AND a.as_start_time = TIMESTAMP '2026-06-22 17:00:00'
  AND a.as_location = 'Baraka 2.1';
Note: See TracWiki for help on using the wiki.