Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto mail trigerring

 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am developing a leave application system & i want to have a functionality that if an employee applies for a leave & his leave is not approved by his reporting manager within 3 days of the application date then an automatic approval should be generated & a mail should be send parallely to the employee who has applied for the leave & also to the reporting manager & duration of 3 days should not include saturday's,sunday's & national holidays.Please send me some replies which can solve this issue.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the actual question? How to send mail? How to check the database for dates three days in the past to determine who gets emails?
 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the actual question is:


if I am the employee & I am applying for a leave say for example I post my application on 22/07/2010,for a leave of 7days from dates 02/08/2010 till 08/08/2010,

1. at the time of application it should check the calendar & display that 07/08/2010 & 08/08/2010 are saturday & sunday,so can't apply for leave on these days.

2. as I have applied on 22/07/2010 & my reporting manager dosen't responds to it in next three working days,then by default it should calculate the next three working days i.e. by 27/08/2010, the application should be approved by not counting the Saturday & Sunday i.e. 24 & 25 july & approve the leave on 27/08/2010 early morning & a mail should be triggered parallely to the applicant as well as the reporting manager.

Please reply.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So... search for leaves not approved > 3 days that haven't had emails sent and send the emails to the appropriate people.

Again--what's the actual question? I *know* the problem statement: I don't know what you don't know how to do.
 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually we don't know how to make the process of mail triggerring,we will sort the leaves which have not been approved from the last 3 days

1. In the last three days how to exclude the Saturday's & Sunday's for the calculation,how to apply that logic.

2. How to trigger the mail after sorting the unapproved leaves.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run a daily job to sweep the database looking for appropriate dates.

You know how to find what day it is, you know how to decide if weekends come into play, I would assume you have a way of knowing what holidays you have to pay attention to: given all that, can you think of a way to decide what date you need to check for?
 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the main problem is:

We don't know how to calculate the weekends & national holidays in the duration of the leave applied for

&

How to match the calender for excluding weekends for auto approval scheduling of mails.

How to do it from front-end in java class the scheduling of validation & auto-approval mails.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with Servlets. Moved to a more appropriate location.
 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggest us on what shall we move-on to other than servlets.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(It's already been moved.)
 
Avinash Chaturvedi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can't understand what you mean to say.Please guide us.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic