infor.com
concierge
infor u
developer portal
Home
Groups
Process Automation (IPA) Community
TimeOut -> Only on business days.
unknown
Does anyone have an example of the user action node only timing out on a business day?
Find more posts tagged with
Process Automation (IPA) - General Discussions
Comments
john-miller
A qualifying question I have, is are you attempting to make sure a 5 day timeout ends on a M-F? or are you attempting to Time out in 5 business days. (Values given are just examples)
Both would be done using the javascript editor set that variable based on the System day (not date) Sunday = 0 Saturday = 6. But the logic in the node would differ depending on the answer to the above question.
russel-cornelson
var currentDate = new Date();
var weekday = currentDate.getDay();
var TimeOutDays;
switch (weekday){
case 0:
TimeOutDays = 3; //mon,tues,wed
break;
case 1:
TimeOutDays = 3; //tues,wed,thur
break;
case 2:
TimeOutDays = 3 //wed,thurs/fri
break;
case 3:
TimeOutDays = 5; //thurs,fri,sat,sun,mon
break;
case 4:
TimeOutDays = 5; // fri,sat,sun,mon,tues
break;
case 5:
TimeOutDays = 5; //sat,sun,mon,tues,wed
break;
case 6:
TimeOutDays = 4; //sun,mon,tues,wed,
break;
default:
TimeOutDays = 3; //should never get used.
}
russel-cornelson
NOTE: You could likely write this is a bunch of different ways simply using math with dates if you know exactly what you are looking for. But the above example should get you going in the easiest fashion
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
General Discussions
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions