Cannot add requested number of business day Error in the logs
User is seeing an error in the log files, The error says " Cannot add requested number of business days : 540 to startDate Fri Apr 24 10:45:02 BST 2015 as it moves beyond calendar date range ."
Error in logs :Cannot add requested number of business days : 540 to startDate Fri Apr 24 10:45:02 BST 2015 as it moves beyond calendar date range
Steps to Reproduce
1. create a SLA rule and configure it with goal:400 days, deadline:450 days.
2. Add this newly created SLA with a flow.
3. Run the flow and create a work object.
4. Check the logs
The root cause of this problem is a defect in customer application code/rules. Developer was trying to set the Goal/Deadline time of the work object to some value which was not available in business calendar. As before adding any number of business days to set Goal/Deadline time, the business day instances are picked from available Business Calendar and if the required number of business days instance is not available then an error is thrown and printed in logs.
This issue is resolved through the following local change: Business calender instances should be created according to the timelines configured for Goal/Deadline in SLA.
Published June 12, 2015 - Updated October 8, 2020