LEAVE-001: Leave Request System (IM-Workflow)
Download Materials
You can download the prompt materials (a set of Markdown files) used in this sample from the links below.
- Download all: leave-request-prompt.zip
- Individual files:
Overview
A system in which employees apply online for annual paid leave and half-day paid leave, and the remaining paid leave balance is automatically managed after two-stage approval by the supervisor and the HR department. Validations such as balance and duplication checks are performed at the time of application, and the remaining paid leave balance is deducted when final approval is completed.
Target Users
| Persona | Description |
|---|---|
| General Employee | An employee who applies for leave. Wants to check the remaining balance and apply easily |
| Supervisor | The direct supervisor who approves a subordinate's leave request. Decides while considering the subordinate's work situation |
| HR Staff | Performs the final approval of leave requests. Manages paid leave usage across the company |
User Stories
As a General Employee
- Can apply for leave after checking the remaining balance. Cannot apply if the remaining balance is insufficient
- Can withdraw a request that the supervisor has not yet processed, in order to revise and resubmit it
- Can cancel a request that is no longer needed
- Can check the comment on a sent-back request, revise it, and resubmit it
As a Supervisor
- Can review a subordinate's leave request details (type, period, reason, remaining balance) and approve, send it back, or deny it
- Can convey the reason via a comment when sending back or denying
- Can temporarily hold processing and resume it later
- Can withdraw an approval if the HR department has not yet processed it
As HR Staff
- Can give the final review to a leave request already approved by the supervisor, and complete the approval, send it back, or deny it
- Can choose the send-back destination: the applicant or the supervisor
- The remaining paid leave balance is automatically deducted when the final approval is completed
Workflow Definitions
For details on each definition, refer to the individual documents.
- Flow Definition - Function settings, flow group, function policies
- Content Definition - Screen definitions, user programs, notification definitions
- Route Definition - Node definitions, processing authority plugins, processing flow
Functional Requirements
F-001: Leave Request
F-001-1: Request Input
- The applicant can enter the required information into the leave request form and submit the request
- Information required for the request:
- Leave type (required, selectable: Annual Paid Leave / Half-Day Paid Leave)
- Start date (required, a date on or after today)
- End date (required, a date on or after the start date. Must be the same as the start date for half-day paid leave)
- Half-day segment (required only for half-day paid leave, selectable: Morning / Afternoon)
- Number of days taken (auto-calculated, business days excluding weekends and public holidays. 0.5 days for half-day paid leave)
- Reason for the request (required, selectable: Personal / Medical visit / Ceremonial occasion / Family circumstances / Refresh / Other)
- Emergency contact (optional, up to 50 characters)
- Remarks (optional, up to 500 characters)
- Displays the remaining paid leave balance at the time of application, and disallows requests that exceed the remaining balance (validated by the user program)
- Saves data to the
leave_requesttable via the user program when the request is completed - Sends a notification email to the supervisor when the request is completed
F-001-2: Withdrawing a Request
- The applicant can withdraw a request that the supervisor has not yet processed
- After withdrawal, the request content can be revised and resubmitted
F-001-3: Canceling a Request
- The applicant can cancel an unapproved request
- After cancellation, the matter is completed (canceled)
F-001-4: Resubmission After Send-Back
- A sent-back request can be revised and resubmitted
- The revision is made after checking the send-back comment
- On resubmission, the user program updates the
leave_requesttable and re-runs the validations
F-002: Approval Process
F-002-1: Supervisor Approval
- The supervisor reviews a subordinate's leave request and can approve, send it back, deny it, hold it, or release the hold
- Items to check when approving:
- Request details (leave type, period, reason)
- The subordinate's remaining paid leave balance
- A send-back comment is required when sending back (up to 300 characters)
- The send-back destination is the application node
- A denial reason is required when denying (up to 300 characters)
- While on hold, processing by any assignee other than the person who placed the hold is prohibited
- If the HR department has not yet processed the request, the supervisor can withdraw the approval
- Sends a result notification email to the applicant when processing is completed
F-002-2: Final HR Approval
- HR staff review a leave request already approved by the supervisor, and can complete the approval, send it back, deny it, hold it, or release the hold
- Items to check for final approval:
- Request details (leave type, period, reason)
- The applicant's remaining paid leave balance
- Consistency with internal regulations
- A send-back comment is required when sending back (up to 300 characters)
- The send-back destination can be selected as the application node or the supervisor approval node (any already-processed node)
- A denial reason is required when denying (up to 300 characters)
- While on hold, processing by any assignee other than the person who placed the hold is prohibited
- The user program deducts the remaining paid leave balance in the
leave_balancetable when the approval is completed - Sends a result notification email to the applicant when processing is completed
F-003: Displaying the Remaining Paid Leave Balance
- Displays the remaining paid leave balance on the application screen
- Remaining balance = annual granted days + days carried over from the previous year − days already taken
Non-Functional Requirements
Performance Requirements
- Screen display: within 3 seconds
- Application/approval processing: within 2 seconds
- Concurrent users: 500
Business Rules
| ID | Rule |
|---|---|
| BR-001 | A leave request exceeding the remaining paid leave balance is not allowed |
| BR-002 | For half-day paid leave, the start date and end date must be the same |
| BR-003 | The number of days taken is auto-calculated as business days excluding weekends and public holidays (0.5 days for half-day paid leave) |
| BR-004 | The start date must be on or after the application date |
| BR-005 | The user program deducts the remaining paid leave balance in leave_balance when the final approval is completed |
| BR-006 | A denied or canceled request does not affect the remaining paid leave balance. The leave_request data is retained as history and not deleted |
| BR-007 | Duplicate leave requests for the same period are not allowed |
Screen List
| Screen ID | Screen Name | IM-Workflow Screen Type | Overview |
|---|---|---|---|
| SCR-001 | Leave Request | Application Screen / Resubmission Screen | Input form for a leave request. Displays the remaining paid leave balance. Displays the send-back comment on resubmission |
| SCR-002 | Processing | Processing Screen | Screen where an approver reviews the request and approves, sends it back, denies it, or holds it |
| SCR-003 | Processing Detail | Processing Detail Screen | Screen where an assignee views the details of a matter |
| SCR-004 | Reference Detail | Reference Detail Screen | Screen where a viewer views the details of a matter |
Screen Field Definitions
SCR-001: Leave Request Screen (Application Screen / Resubmission Screen)
| Field Name | Input Type | Required | Notes |
|---|---|---|---|
| Applicant | Display only | - | Automatically displays the login user's name |
| Organization | Display only | - | Automatically displays the login user's organization |
| Remaining Paid Leave Balance | Display only | - | Displays the current remaining paid leave balance |
| Leave Type | Select | ○ | Annual Paid Leave / Half-Day Paid Leave |
| Start Date | Date | ○ | Calendar picker. On or after today |
| End Date | Date | ○ | Calendar picker. On or after the start date |
| Half-Day Segment | Radio | △ | Morning / Afternoon. Displayed and required only for half-day paid leave |
| Number of Days Taken | Display only | - | Automatically calculates and displays the business day count |
| Reason | Select | ○ | Personal / Medical visit / Ceremonial occasion / Family circumstances / Refresh / Other |
| Emergency Contact | Text | - | Up to 50 characters |
| Remarks | Text | - | Up to 500 characters |
| Send-Back Comment | Display only | - | Shown only on resubmission. Displays the approver's send-back comment |
SCR-002: Processing Screen (For Approvers)
| Field Name | Input Type | Required | Notes |
|---|---|---|---|
| Applicant | Display only | - | Applicant's name |
| Organization | Display only | - | Applicant's organization |
| Remaining Paid Leave Balance | Display only | - | Applicant's remaining paid leave balance |
| Leave Type | Display only | - | Displays the request details |
| Start Date | Display only | - | Displays the request details |
| End Date | Display only | - | Displays the request details |
| Half-Day Segment | Display only | - | Displayed only for half-day paid leave |
| Number of Days Taken | Display only | - | Displays the request details |
| Reason | Display only | - | Displays the request details |
| Emergency Contact | Display only | - | Displays the request details |
| Remarks | Display only | - | Displays the request details |
| Comment | Text | △ | Required when sending back or denying. Up to 300 characters |
SCR-003: Processing Detail Screen (For Assignees)
| Field Name | Input Type | Notes |
|---|---|---|
| Applicant | Display only | Applicant's name |
| Organization | Display only | Applicant's organization |
| Remaining Paid Leave Balance | Display only | Applicant's remaining paid leave balance |
| Leave Type | Display only | Displays the request details |
| Start Date | Display only | Displays the request details |
| End Date | Display only | Displays the request details |
| Half-Day Segment | Display only | Displayed only for half-day paid leave |
| Number of Days Taken | Display only | Displays the request details |
| Reason | Display only | Displays the request details |
| Emergency Contact | Display only | Displays the request details |
| Remarks | Display only | Displays the request details |
| Processing History | Display only | Displays the processing history of each node |
SCR-004: Reference Detail Screen (For Viewers)
Uses the same layout and fields as SCR-003 (Processing Detail Screen).
Data Model (Overview)
User Data (User Content Management Scope)
Leave Request (leave_request)
├── User Data ID (PK)
├── Applicant User ID
├── Leave Type (annual/half_day)
├── Start Date
├── End Date
├── Half-Day Segment (am/pm, nullable)
├── Number of Days Taken
├── Reason Category
├── Emergency Contact
├── Remarks
├── Created At
└── Updated At
Paid Leave Balance (leave_balance)
├── User ID (PK)
├── Fiscal Year (PK)
├── Granted Days
├── Carried-Over Days
├── Days Taken
├── Remaining Days (= Granted Days + Carried-Over Days − Days Taken)
├── Created At
└── Updated At
Matter Properties
| Property Key | Set At | Purpose |
|---|---|---|
| leave_days | On application | Number of days taken. Used in the email replacement string |
Glossary
| Term | Description |
|---|---|
| Annual Paid Leave | Paid leave granted under the Labor Standards Act, based on years of continuous service |
| Half-Day Paid Leave | Leave taken by splitting one day of paid leave into a morning and an afternoon portion. Counted as 0.5 days |
| Remaining Paid Leave Balance | The number of paid leave days available to take in the current fiscal year (granted days + days carried over from the previous year − days already taken) |
| Business Day | A working day excluding Saturdays, Sundays, and public holidays |