How can I use "Wait for 10 minutes" Option outside of a flow ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 05:22 AM
Usually, we have "wait for sometime" option in flow to check status of record after sometime. Due to certain restrictions, I can't use flow designer I have to use server-side script. Can someone please tell me which server-side script to use to check the status of record after 10 mins? Also, what function/method can be used within that server-side script to achieve this functionality?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 05:36 AM
Hi @Community Alums ,
I think you could use gs.sleep(seconds)
Example :gs.sleep(120000)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 05:43 AM
Hi @Community Alums ,
But if I use gs.sleep() for 10 mins in a BR, then it will impact BR. It is not an ideal solution.
Thanks,
Hrithik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 05:42 AM
What exactly are those 'restrictions' because this is absolutely what flows are for. You are starting something, then you wait and then you do something. That's a flow.
You can have a scheduled job run every minute, checking if it has already been ten minutes, but then you are putting way more pressure on the performance of your instance. I don't know who put the restrictions on you, but I would use this use case as reason to get rid of them. Just tell them it can't be done otherwise.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2024 05:48 AM
Hi @Mark Manders ,
I agree that's what Flow is for, but what I want to do is I want to call REST Message that can be called using 2 ways: 1. Flow Designer where I can create REST Step in action and call that action, but as it turns out per request sent by our instance we are supposed to pay certain cost to ServiceNow which is why we are forced to use BR. Now can you please give me a solution?