gs.isInteractive() in a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2020 11:06 PM
I have question regarding below image from the now docs.
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).
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 12:18 AM
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()
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.