I want to change the time in relative duration time as 2 min from now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 06:19 AM
Hi Community,
Here we are triggering notification if the approver was not accepted for 2 business days using workflow here we want for testing purpose we need to change this to wait for only 2 min from now. can you please help us on this how to change this relative duration as 2 min from now. Thanks in advance.
1) Here is the workflow
2) This is what they are doing in timer activity they are calling relative duration
3) This is the relative duration time they are using how can we change this to wait 2 min from now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 04:57 PM
Hi, this section of the code adds 1 day to the default 2 days if the start time is after 10 am.
if (calculator.isAfter(calculator.startDateTime, "10:00:00")) {
days++;
}
DurationCalculator | ServiceNow Developers
If this is for testing then I would just bypass the activity or replace/update it with a standard wait x minutes.
But this would only be for testing, and I would not recommend deploying small value timers to prod.