-
Notifications
You must be signed in to change notification settings - Fork 0
Sequence Diagrams ‐ Goal Management
Selman Akman edited this page Oct 17, 2025
·
3 revisions

@startuml
actor User
participant ":GoalService" as GoalService
participant ":User" as UserObj
participant ":WasteCategory" as CategoryObj
title "Set/Create Custom Goal"
User -> GoalService: createGoal(userID, categoryID, target, timeframe, isCustom)
GoalService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> GoalService: userData
GoalService -> CategoryObj: getCategory(categoryID)
alt Valid Category
CategoryObj --> GoalService: categoryData
GoalService -> GoalService: createGoal(categoryID, target, timeframe, isCustom)
GoalService --> User: showConfirmation("Goal created")
else Invalid Category
CategoryObj --> GoalService: error("Category not found")
GoalService --> User: showError("Invalid category ID")
end
else User Not Authenticated
UserObj --> GoalService: error("User not found")
GoalService --> User: showError("Please log in")
end
@enduml
@startuml
actor User
participant ":GoalService" as GoalService
participant ":User" as UserObj
title "Select Predefined Goal"
User -> GoalService: selectPredefinedGoal(userID, predefinedGoalID)
GoalService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> GoalService: userData
GoalService -> GoalService: getPredefinedGoal(predefinedGoalID)
alt Valid Predefined Goal
GoalService --> GoalService: goalData(categoryID, target, timeframe)
GoalService --> User: showConfirmation("Predefined goal selected")
else Invalid Goal
GoalService --> User: showError("Invalid predefined goal ID")
end
else User Not Authenticated
UserObj --> GoalService: error("User not found")
GoalService --> User: showError("Please log in")
end
@enduml
@startuml
actor User
participant ":GoalService" as GoalService
participant ":User" as UserObj
participant ":WasteCategory" as CategoryObj
title "Edit Goal"
User -> GoalService: updateGoal(userID, goalID, categoryID, target, timeframe)
GoalService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> GoalService: userData
GoalService -> GoalService: getGoal(goalID)
alt Goal Exists and Owned
GoalService -> CategoryObj: getCategory(categoryID)
alt Valid Category
CategoryObj --> GoalService: categoryData
GoalService --> GoalService: updateGoal(goalID, categoryID, target, timeframe)
GoalService --> User: showConfirmation("Goal updated")
else Invalid Category
CategoryObj --> GoalService: error("Category not found")
GoalService --> User: showError("Invalid category ID")
end
else Invalid Goal
GoalService --> User: showError("Invalid goal ID or not owned")
end
else User Not Authenticated
UserObj --> GoalService: error("User not found")
GoalService --> User: showError("Please log in")
end
@enduml
@startuml
actor User
participant ":GoalService" as GoalService
participant ":User" as UserObj
participant ":WasteLog" as WasteLogObj
participant ":AchievementService" as AchievementService
title "Track Goal Progress"
User -> GoalService: trackProgress(userID, goalID)
GoalService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> GoalService: userData
GoalService -> GoalService: getGoal(goalID)
alt Goal Exists
GoalService -> WasteLogObj: getWasteLogs(userID, categoryID, timeframe)
alt Logs Found
WasteLogObj --> GoalService: totalReduced
GoalService --> GoalService: calculateProgress(totalReduced, target)
GoalService -> AchievementService: earn(userID, progressPoints, goalID)
AchievementService --> GoalService: pointsUpdated()
GoalService --> User: showProgress("Progress: " + progress)
else No Logs
WasteLogObj --> GoalService: emptyList
GoalService --> User: showProgress("No progress yet")
end
else Invalid Goal
GoalService --> User: showError("Invalid goal ID")
end
else User Not Authenticated
UserObj --> GoalService: error("User not found")
GoalService --> User: showError("Please log in")
end
@enduml
@startuml
actor User
participant ":GoalService" as GoalService
participant ":User" as UserObj
title "Compare Progress"
User -> GoalService: compareProgress(userID, goalID, timespan)
GoalService -> UserObj: getUser(userID)
alt User Authenticated
UserObj --> GoalService: userData
GoalService -> GoalService: getGoal(goalID)
alt Goal Exists
GoalService --> GoalService: fetchHistoricalProgress(goalID, timespan)
alt Historical Data Found
GoalService --> User: showComparison(currentProgress, historicalProgress)
else No Historical Data
GoalService --> User: showComparison(currentProgress, "No historical data")
end
else Invalid Goal
GoalService --> User: showError("Invalid goal ID")
end
else User Not Authenticated
UserObj --> GoalService: error("User not found")
GoalService --> User: showError("Please log in")
end
@enduml
@startuml
actor System
participant ":ChallengeService" as ChallengeService
participant ":TeamService" as TeamService
participant ":AchievementService" as AchievementService
title "Collaborative Goal Rewards"
System -> ChallengeService: checkTeamGoals()
ChallengeService -> TeamService: getTeamGoals()
alt Team Goals Found
TeamService --> ChallengeService: teamGoalList
ChallengeService -> TeamService: trackProgress(teamGoalID)
alt Goal Complete
TeamService --> ChallengeService: progressComplete
ChallengeService -> AchievementService: awardTeamReward(teamID, points)
AchievementService --> ChallengeService: rewardAwarded()
ChallengeService --> System: rewardsProcessed()
else Goal Incomplete
TeamService --> ChallengeService: progressIncomplete
ChallengeService --> System: skipRewards()
end
else No Team Goals
TeamService --> ChallengeService: emptyList
ChallengeService --> System: skipRewards()
end
@enduml- Lab1
- Lab 1 Meeting Notes
- Lab2
- Lab 2 Meeting Notes
- Lab3
- Lab 3 Meeting Notes
- Lab4
- Lab4 Meeting Notes
- Lab5
- Lab5 Meeting Notes
- Lab 5: MVP Implementation & Planning
- Lab6
- Lab6 Meeting Notes
- Lab7
- Lab7 Meeting Notes
- Lab 7: Milestone 2 Demo Preparation
- Lab8
- Lab8 Meeting Notes
- Lab 8: Requirements Review & Acceptance Planning
- Ahmet's Bio
- Barathan's Bio
- Berkay's Bio
- Berke's Bio
- Caglar's Bio
- Mehmet Emin's Bio
- Nilsu's Bio
- Ömer's Bio
- Selman's Bio
- Taha's Bio
Ahmet Okta
Barathan Aslan
Berke Kartal
Mehmet Çağlar Kurt
Mehmet Emin Atak
Muhammet Berkay Keskin
Mustafa Taha Söylemez
Nilsu Tüysüz
Selman Akman
Ömer Faruk Bayram
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards, Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Authentication
- Sequence Diagrams - Session Management
- Sequence Diagrams - Events Management
- Project Plan
- Requirements
- Elicitation Questions & Answers
- Scenario #1
- Scenario #2
- Scenario #3
- Scenario #4
- Scenario #5
- Scenario #6
- Scenario #7
- Scenario #8
- Scenario #9
- Scenario #10
- Scenario #11
- Scenario #12
- Scenario #13
- Scenario #14
- Use Case Diagram
- Class Diagram
- Sequence Diagrams - Admin Management and Moderator Functions
- Sequence Diagrams - Rewards,Badges and Leaderboard System
- Sequence Diagrams - Notification System
- Sequence Diagrams - Tips and Recommendations
- Sequence Diagrams - Challenge and Activity Tracking
- Sequence Diagrams - Waste Tracking and Scoring System
- Sequence Diagrams - User and Account Management
- Sequence Diagrams - Goal Management
- Sequence Diagrams - Auth
- Sequence Diagrams - Session Management
- User Manual for Frontend-Web
- System Manual for Frontend-Web
- Research Documentation for Frontend-Web
- Testing Manual for Frontend-Web