ServiceNow Workflow Timer Activity on Demand Execution : ServiceNow Workflow Tips and tricks
foreign [Music] top of it and that particular workflow has some weight for conditional certain time for certain days okay or certain hours now we have developed it out you're probably as a workflow and if you want to test it out so will you wait for that for that many days for that execution to happen for the complete execution of the flow for instance after 10 days a notification will get triggered so we'll wait for 10 days to complete your testing all right so how we can get rid of the timer at that particular point of time to complete our testing so we'll be looking into that so for this we will again use a table called incident okay and for this I've already created a workflow if I go to the go editor pretty simple workflow I have created and you can you can also relate to it right so I have created a workflow called incident trigger this is really near to my heart so I will just open this instant trigger out I've created this workflow on uh incident table and what exactly this workflow is doing so it will begin okay it will begin when the record gets created and it has a timer activity where the name as salary weight so this this is the core of this particular activity okay so basically this is salary rate as you know the duration will be 30 days and after 30 days you will be receiving a notification called as select credited okay with a message right you received you received your salary okay your salary has been created to your account now if I go and if I go and create this table out to create a record out right so let's go over here and if I create a record let's consider it I will go to incident dot two I will I'm creating a new record so we'll have a fresh workflow context creator for the scene and if I consider I if I pull the caller as able tutor evil tutor and I will give what is the status of my salary and I will save it out so definitely of workflow must have created for this right and we'll see the workflow for it so how to see the workflow context so we I will explain how to how you can see the workflow context also so I you have to go and just copy the CIS ID for that particular record out you can go here you can search for active context which will give the current content for the workflow and here you can search into related record the Sid if you have multiple workflows out so it will give different workflow names and then you can choose which workflow you can filter at the physical condition for which particular workflow you want to check the context and if we go over here okay let's go over here I will open this so it's in the executing state you can see workflow executing activities it's currently in the executive State uh it's salary weight at this a little bit stage okay it has completed again it is waiting over here okay and we know that this particular style and if you want to show the workflow right if I go to the show workflow so this is a current state and as you know that this particular activity will now get executed after one month so if I want to test this flow out so I have to wait for one month to get this activity executed but you can trigger it out how will we sing that so what you have to do what you have to do you have to come to the activity context a workflow context you can open this activity also so I will open this activity and okay and what it states that it started today okay and blah blah blah the celebrating state is running so on okay and you have a scratch pad over here so the next activity you can get from this particular schedule so what you have to do you have to just go to the label and copy this label outside I'm just copying this label out Ctrl C then you have to go as you must be knowing whenever a certain activity future activities we want to schedule it goes into schedule table only so let's jump into the schedule table okay schedule and we have to go into which schedule so how we have a table name called says trigger also for the same okay so let's open any schedule out okay I'll just go to the schedule okay the base table is common for everything right I'll go for all and what we can do we can simply search that particular waffle label which we have covered and we found the record for the same now if we open this record it queues the context when exactly the next activity will happen and so on so it states that it will happen on the next after four weeks after 30 days okay the next action will happen so we have to wait for this particular point of time to have that particular activity executed but we have a button over here if it's not visible on the form you can configure the form and just change the condition for the you action to get this visible on the form if we click on this particular bit now execute Now button please will trigger that particular event to trigger that particular action or to trigger that particular timer activity at that particular point of time only say if I click on execute now flow should get completed okay so if I go back so it was in this state right okay it wasn't it was stuck over here if I refresh it out so it got completed okay so this is how or you can you can get rid of the timer activity or the wait for activity and just keep on going with your testing okay I hope this is pretty clear to you okay it's it's used into day-to-day activity you may be using it a lot of timer activities in your workflows and also on so you again while testing you can use this particular approach so this is all for today's tutorial I hope you like it out um please subscribe to my channel so that you will get notified with this kind of videos in the future also till then stay safe stay nice happy and have a nice day
https://www.youtube.com/watch?v=S7-ZUFuQapA