gs.isInteractive() in a business rule

Aditya24
Giga Expert

I have question regarding below image from the now docs.

find_real_file.png

What is gs.interactive is used for?

In the description after code it says "unless they have the itil role, or are listed in the Caller or Opened by field." but in the if condition before gs.role not condition is there, how?
They have mentioned caller or opened by but why the watchlist part is not mentioned (as it is in the condition).

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, gs.isInteractive() simply identifies a physically logged in user/user session.

https://developer.servicenow.com/dev.do#!/reference/api/paris/server_legacy/c_GlideSessionAPI#r_GlideSessionIsInteractive?navFilter=isinteractive

isInteractive()

Determines if the current session is interactive.

An interactive session is one that involves an end-user interacting with a user interface that then retrieves information from a server. An example of this type of session is when a user logs in using the log-in screen or uses a form to query a data store. A non-interactive session is one that only involves programmatic interaction with a server such as a SOAP request to retrieve data.

 

Edit;

So this BR runs for any logged in user who does not have the 'itil' role, where the logged in user is a match to a user record populated into the 'caller', opened by' or 'watch list' of the record; AKA any user without a license, who has an identified interested in the task.

If the watch-list may not be mentioned in the description, then this is an oversight;
and over time your may find that it is not uncommon to see incomplete\inaccurate description details for some records.