Skip to main content

Content Definition: Leave Request Content

This document elaborates on the "Content Definition" section of specification.md.

Basic Information​

ItemValue
Content NameLeave Request Content
Content IDleave_request_content

Screen Definitions​

Screen Definition List​

Screen TypeScreen IDPath TypeScript PathInitial UseNotes
Application ScreenSCR-001Scripting Developmentleave/apply/apply○imwUserDataId is assigned a number by the function container
Resubmission ScreenSCR-001Scripting Developmentleave/apply/apply○Same as the application screen. Additionally displays the send-back comment
Processing ScreenSCR-002Scripting Developmentleave/approve/approve○Displays the request details as read-only
Processing Detail ScreenSCR-003Scripting Developmentleave/detail/detail○Reference only
Reference Detail ScreenSCR-004Scripting Developmentleave/detail/detail○Uses the same screen as the Processing Detail Screen

Screen Field Definitions​

For details on the screen fields, see specification.md - Screen Field Definitions.

User Program Definitions​

Development Model​

ItemValue
Development ModelScripting development model (SSJS)
Screen TechnologyJSSP (HTML templates + function containers)
User ProgramsServer-side JavaScript (action processing / matter end process)

Action Process List​

Program NameDeployment PathTarget NodeProcessing Content
ActionProcess1leave/action/ActionProcess1.jsApplication NodeData saving, validation, and matter property setting on application and resubmission
ActionProcess2leave/action/ActionProcess2.jsApproval NodeDeducts the remaining balance when the approval is completed

ActionProcess1 (For the Application Node) Processing Details​

Process TypeStepProcessing ContentApplicable Rule
apply (Application)1Retrieve the screen input values from the user parameters-
2Validation: Number of days taken ≦ Remaining balanceBR-001
3Validation: For half-day paid leave, start date = end dateBR-002
4Validation: Start date ≧ Application dateBR-004
5Validation: No duplicate request for the same periodBR-007
6On a validation error, return resultFlag = false plus an error message-
7INSERT into leave_request (key: userDataId)-
8Set the number of days taken in the matter property leave_days-
9Return resultFlag = true-
reapply (Resubmission)1Retrieve the screen input values from the user parameters-
2-6Run the validations (same as on application)BR-001, 002, 004, 007
7UPDATE leave_request (key: userDataId)-
8Reset the matter property leave_days-
9Return resultFlag = true-

ActionProcess2 (For the Approval Node) Processing Details​

Process TypeStepProcessing ContentApplicable Rule
approveEnd (Complete Approval)1Retrieve data from leave_request using userDataId as the key-
2Add the number of days taken to the days-taken count in leave_balance (UPDATE)BR-005
3Recalculate the remaining balance (granted days + carried-over days − days taken)-
4Return resultFlag = true-
Other (approve / deny / sendBack, etc.)-No business data operation needed. Return resultFlag = trueBR-006

Matter End Process​

Program NameDeployment PathProcessing Content
MatterEndProcessleave/action/MatterEndProcess.jsReturns whether to send an email (send if data = true)

Notification Definitions​

Notification Method​

ItemValue
Notification MethodEmail notification
Definition MethodMessage definition (recommended method)
IMBox NotificationNot used

Email List​

Send TimingNotification TypeRecipientExample Subject
On applicationProcessing requestSupervisor"A leave request has arrived"
On approvalProcessing result notificationApplicant"Your leave request has been approved"
On approval completionProcessing result notificationApplicant"Your leave request has received final approval"
On send-backProcessing result notificationApplicant"Your leave request has been sent back"
On denialProcessing result notificationApplicant"Your leave request has been denied"

Replacement Strings​

The following replacement strings can be used in the email body.

Replacement StringDescription
Matter property valueleave_days (number of days taken)
intra-mart URLLink to the processing screen or reference screen

Matter Properties​

Property KeySet AtPurpose
leave_daysOn applicationNumber of days taken. Used in the email replacement string

Rule Definitions​

This workflow does not use branch routes, so no rule definitions are configured.