«

»

ServiceNow UI Freezes During An Order/Request

Lately I have been doing quite a lot of third-party integration to Nutanix Era work meaning driving Era functionality from a layer above, customer service portals.

While taking advantage of the ServiceNow Workflow functionality to e.g. run REST API commands to external systems, in my case to Era, the ServiceNow Service Portal page will be in freeze/hung state until the ServiceNow request is completed.

Example, when taking an Era Time Machine Snapshot via ServiceNow the workflow behind the Catalog Item (Time Machine Snapshot) reaches out to Era via REST API and requests the Time Machine available and creates a drop down list of available Time Machines. Then you just provide a Snapshot Name, click order now.

And last step is to click Checkout and the take Time Machine Snapshot request is sent to Era.

This will leave the ServiceNow UI in the following state, in this case Ordering, until the Time Machine Snapshot is completed. If you refresh the browser it will just trying to fetch the page and if the workflow takes enough time the browser refresh action will timeout and give you a blank browser window. Opening up a new Tab will work the same way as trying to refresh the page.

When the Time Machine Snapshot is completed you’ll end up in the following Request state ServiceNow UI section/page.

To work around this from an end user perspective you can just close the browser, not enough to just close the browser tab, and open it up again. Not that good if you have many tabs open.

However, you can solve this in the ServiceNow workflow as well. Just add a Timer Activity in the beginning of the workflow. Only has to be 1 sec, I usually use 2 secs. Not sure why though but I guess I like even numbers:)

Workflow before Timer is added:

Workflow when Timer is added:

Now when you order a Time Machine Snapshot and click Checkout you’ll end up in the Request state ServiceNow UI section/page after just a few secs.

Might not be useful when your request takes just a few secs to complete but in my case the requests I’m working on for the moment will take everything between 1 min to 50 mins.