- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 07:09 AM
I have a workflow with a few (Wait x days) timers. When I'm testing changes to the workflow I don't want to actually wait that long for this step to complete. Is there any way I can force the context to move on to the next step?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 07:26 AM
In workflow timer activity, you can put code like
// Create a property e.g. with name as "nameOfCustomProperty" and put its value as //disable. when you move to PROD or next instance, change value to "enable"
if ( gs.getProperty("nameOfCustomProperty") == "disable") {
// put code here to wait for 2 secs atleast
}else{
// put code for time you want to wait here in reality and not for testing
}
Note: Please mark reply as correct / helpful if it answers your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 07:26 AM
In workflow timer activity, you can put code like
// Create a property e.g. with name as "nameOfCustomProperty" and put its value as //disable. when you move to PROD or next instance, change value to "enable"
if ( gs.getProperty("nameOfCustomProperty") == "disable") {
// put code here to wait for 2 secs atleast
}else{
// put code for time you want to wait here in reality and not for testing
}
Note: Please mark reply as correct / helpful if it answers your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 08:58 AM
Hi Deepak, are you proposing a global change to how every timer activity is run, or is this a per-instance change?
How would I even go about editing that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 09:03 AM
You can make it a part of every global activity as well, I don't see an issue.
I would create a script include which can be called from timer script and based on property you can turn on and off the real time. In instances where you dont want to wait, you can turn it off, and in instances where you want to behave the way it should, you can turn it on.
This will give you flexibility for unit testing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 01:58 AM
The best way to do this on an individual basis is this..
1. Open Workflow Context > Workflow Executing Activities
2. Select the timer that you would like to skip/force
3. Copy the sys_id from the scratchpad field
4. Go to sys_trigger.list
5 Search Name for the sys_id
6. Change the Next action date
7. Boom!
You're welcome! 😄