Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
6 subscribers
Views
2410 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hello, I need to include a timer in a process where, once the process
issamd
over 9 years ago
Hello,
I need to include a timer in a process where, once the process is initiated, the user task will be available two business days later.
I have found the Timer process node, but how can configure it to work based on Business Days (excluding weekends and holidays)?
OriginalPostID-193809
OriginalPostID-193809
Discussion posts and replies are publicly visible
0
John Peacock
Certified Lead Developer
over 9 years ago
You should be able to use the caladddays function or one of the other calendar functions that are built-in. You can see more information here:
forum.appian.com/.../Date_and_Time_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jessek
A Score Level 2
over 9 years ago
Review this information on the Intermediate Event - Timer Node:
forum.appian.com/.../Intermediate_Event_-_Timer.html
The node contains a "Delay until the date and time specified by this expression" radio button that, when selected, will run an expression to determine when the process should continue.
In the simplest case, today()+2 would give you a date two days after today. You can use Appian-provided functions like weekday() and date() to help you in creating a more complex custom expression that will determine the next start time for the process and avoid holidays and weekends.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
Great! Thank you all for your input.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Nick Vigilante
Appian Employee
over 9 years ago
I would create an expression rule (I named mine twoBusinessDays) defined as follows:
if( isnull(ri!date), {}, if(calisworkday(ri!date+2), ri!date+2, twoBusinessDays(ri!date+1)))
where ri!date is a rule input of type Date and Time.
What this does is it first checks to make sure there's a value for ri!date. If there is, it will check to see if two days in the future of ri!date is a workday. If it is, return THAT date. Otherwise, increment by one and iterate the date in the function again and repeat until a valid business day is found. You should be able to pass in pp!starttime in the Scheduling tab of the User Input Task.
Keep in mind that the calisworkday function has an optional parameter (which I have not included) to pass a calendar; in the event that your business days don't line up perfectly with the default calendar, you can create a custom system calendar for use with the workday functions. More information can be found here:
forum.appian.com/.../System_Calendar_Settings.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
issamd
over 9 years ago
Thank you for your input, that's very helpful!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel