
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
11-29-2020 11:43 PM - edited 08-03-2024 06:45 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Workflow Editor is a legacy product to maintain existing workflows already in production. For new use cases and workflows, use ServiceNow Workflow Studio. Workflow Studio is a low-code alternative to Workflow Editor. |
Hi there,
With Flow Designer, I'm used to taking shortcuts on the testing. Especially when it comes to times… you are not going to wait for days until time passes? Or changing your Flow Designer temporarily so it uses a shorter time?
So how about Workflows? How can you shortcut testing on Workflows and for example using the "Timer" utility?
Flow Designer
One of the possibilities to shorten testing on Flow Designer with for example "Wait for a duration of time", is to look up the record involved in the Events table [sysevent]. There you could simply update the Process on field value. This way you do see which date has been entered or calculated and if it's valid, and you can simply update it so you don't have to wait for hours/days.
Workflow
So how about Workflows? Are you temporarily changing the duration of the Timer utility in your workflow during testing, or is this actually also stored somewhere in a record in a table?
The associated record for a "Timer" activity is not stored in the sysevent table like Flow Designer does have. If you search a bit, you would come across the Schedule table [sys_trigger].
Schedule [sys_trigger]
When a "Timer" utility in a Workflow is reached, a record will be generated in the Schedule table. The Schedule record can be identified while filtering on "trigger_type=0, document=wf_executing".
document=wf_executing^trigger_type=0
Depending on how many Workflow contexts are active, this could be a lengthy list obviously. You might already identify the Schedule you are after based on the date mentioned on the Next action, though more reliable: copy the sys_id value from your active Workflow contexts (obtain it for example through "Workflow > Active Contexts") and filter in the Schedule table on name=Workflow<your_sysid>, for example: name=Workflow094296e4db34e410a0a26f7748961948.
Schedule: Next action
So the trick to speed up testing… Field Next action [next_action]. You could just update the value of this field, similar to doing for the Process on on Event records for Flow Designer!
And that's it actually. Once you know this, so easy.
---
If any questions or remarks, let me know!
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Consultant @ Quint Technology
1x ServiceNow Developer MVP
1x ServiceNow Community MVP
---
- 9,663 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I wanted to comment on the Flow version that you have mentioned. I'm not sure if something has changed, but what I'm finding is that there is a Scheduled Job that is created for the timer, exactly like in a Workflow, however the Scheduled Job then triggers an Event with the same Process On date. In order to 'nudge' that timer forward during testing, you must change the next action on the Scheduled Job, and then change the Process On on the Event. I'm guessing this is a change in behavior in one of the last two releases.