Error Handling in Flow Designer - Part 1 | ServiceNow | Rome Release
hello everyone welcome to my youtube channel a quick introduction about myself uh i am a servicenow consultant uh been working with servicenow for quite a while now uh i have been planning of sharing my knowledge that i've you know gained across my servicenow career with the community and community has also helped me a lot throughout this time so i think it's always good to give some things back so here i am with my first video coming to today's video uh today we will be talking about the new error handling in flow designer that's come up in the rom release error handling has been difficult with the flow designer since the start be something related to a powershell error like mid server is down in terms of in orchestration projects and they can also be some simple errors which basically errors out the flow in uh and you know lands the flow in a limbo and it doesn't go anywhere and it also does not update the ticket and you know that the user just had to reach out where my request is sitting at or maybe like any kind of record with the flow the any kind of flow which is executing on a particular record just sits there doing nothing so coming back to this functionality i will be walking you through so here's my developer instance and uh what i'll be doing today is uh i will be walking you through uh i've created a flow uh for a catalog item and so here is that flow for catalog item is new email account and i've just created a very simple flow where i'm just creating a catalog task and i've kept an action for send email i'm updating the particular requested item and as you can see here at the bottom so there is something new that we can see in the room uh instances which is error handler so i'll come to that part a bit later on but right now just to let you know in this particular flow in send email action what i've done is in the tool where i should be giving an email address or passing a value for an email address field for a user i have just given a trigger table name difference right so trigger record we see with table name it would be sc request item which is a requested item so it will be erroring out here and i'll be walking through before the error and after that like with the error handling and without the error handling so first of all we'll be going without the error handling so let's start i will be going to service portal request something so i will have this catalog item new email account wherein i just put in email address preferred email address and i do order now check out [Music] as you can see my item is submitted now and if i go to the fulfiller view i can see that the item is created and if i open up the flow we do have a catalog task which is waiting so i'll go down i will mark the catalog task as close complete so once the catalog task is closed complete and if i go back to the flow as you can see as we have not passed the right value over here you know it has basically errored out so email a validation field email contained the following invalid addresses that's the request item so it should have been something as an email address but again this is something that we have done to do this particular demo so and now the flow lands up in an error state and you know shows up this error nothing happens post that so update record did not run obviously error handling is not active right now so it also did not get executed so this is what happens with a lot of cases and you know there is no record no field which gets updated when the flow errors out on the particular item as well so in this case primarily you know this is reported to services by the user and you know or whosoever is the record owner get reports the issue and that following now falling down the line it gets forwarded to the servicenow team to have a look at it and then they go ahead and fix the issue which is but it takes a bit of time and technically no one is aware about the issue has occurred right now like immediately so if we go back to the flow now if we make this error handling active save it activating the flow now once this is done i will go ahead i will come back to the floor later i will go ahead and i will submit the same item one more time [Music] once this is done a new item is cleared i will go back to the full filler view we can close off this one so once we land up in the full filler view again we have got a flow connected to it and we also do have our task so first of all i will go ahead and close off the task [Music] and now when we have closed the task if i open up the flow so now as you can see this task when it's completed and it comes to send email action it is not updated the flow with a state error it has completed the flow and updated it as error caught also the actions and email is updated with the error code right and once this is done update request update record is not executed as usual but we have some other actions that got executed which is create incident and updating the record so in this particular flow what i've done is i'm creating an incident for a particular team and you know to action this request upon to basically so that they're basically aware then you know this particular request errored out and i'm also updating the particular requested item with some work notes so this request failed while processing this is the incident number has been created and assigned to servicenow admin team now when this happens if i go back to the ritm as you can see there is a particular book note in here the request field while processing has been created and assigned to this team so this helps basically you know in immediate notification to the team that there is something wrong that's happened uh you know engineering gets created and if someone comes at this particular uh requested item they can also see that something has something went wrong that's why there you go the request is not processed yet and they can you know make some fixes or they they can do a re-drive they can re-tick at the flow and whatsoever they want to fix that particular issue they can do it but at least this gives us a good notification and we can we are aware that you know something has went wrong so that that needs to be looked into so this i feel is a really good feature that was missing from the flow design and as i work with flow designer a lot and i think this is the best feature that is that is released in rome release and i totally love this hoping to you know work on this soon as the customers update the instances to room so and in more depth so in terms of this error handling what we can right now i've just kept a create incident and update requested item but you can keep as many as action similar to what you can in a particular flow you can you know just create a record create a task delete something send an email wait for whatever you want and some global actions like whatever you want similar to a flow uh we can use in any actions that we want we can also put in some logics here if this happened you know do this if that happened too and also we can also call in some subfloors we can also create some generic uh subfloors for error handling uh and we can use them so yeah this is pretty cool and looking forward to working on this yes uh so that's all for today uh so do let me know if there is any feedback in the comments and also let me know you know if you guys want me to create some videos on uh some contents and thanks again uh do like the video and subscribe my channel for future updates thank you bye
https://www.youtube.com/watch?v=HDibw534xkA