Meeting Lifecycle Management

Purpose

Within the broader scope of Real-Time Meeting Cost Tracking (Main Topic), the Meeting Lifecycle Management subtopic addresses the orchestration of meeting session states—specifically starting, stopping, resetting, and dynamically applying changes to attendee counts and hourly wages during an active meeting. This management ensures that meeting time segments are accurately recorded with their respective parameters, enabling precise cost calculations and data persistence.

While the parent topic describes the continuous cost updating process, this subtopic focuses on controlling the meeting's temporal boundaries and state transitions, maintaining coherent data slices (increments) that reflect attendee and wage changes over time.

Functionality

Meeting State Control

Dynamic Updates During Meetings

Increment Management

Real-Time Calculations Integration

Integration

Code Snippet Illustrating Lifecycle Control

// Starting the meeting resets increments and starts the clock
meeting.startMeeting();

// On attendee count change mid-meeting
meeting.changeAttendeeCount(newCount); // pushes previous increment, starts new increment

// Stopping the meeting pushes final increment and saves data
meeting.stopMeeting();

sequenceDiagram
participant User
participant UI
participant Meeting
participant Warehouse
User->>UI: Click Start
UI->>Meeting: startMeeting()
Meeting->>Meeting: clockRunning = true; currentIncrementStartTime = now
Meeting-->>UI: Meeting started
User->>UI: Change Attendee Count or Wage
UI->>Meeting: changeAttendeeCount() / changeAverageWage()
Meeting->>Meeting: pushIncrement() with old params
Meeting->>Meeting: update currentIncrementStartTime and params
Meeting-->>UI: Updated increment started
User->>UI: Click Stop
UI->>Meeting: stopMeeting()
Meeting->>Meeting: pushIncrement() final
Meeting->>Warehouse: save(increments)
Warehouse-->>Meeting: confirm save
Meeting-->>UI: Meeting stopped, data saved
User->>UI: Click Reset
UI->>Meeting: resetMeeting()
Meeting->>Meeting: reset all state to defaults
Meeting-->>UI: Meeting reset

This sequence diagram highlights the interaction flow between user actions, UI event handling, meeting state transitions, and data persistence, encapsulated within the lifecycle management subtopic.