API to get the current applications's scope name inside a script in global processor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 03:46 AM
I am writing a global java processor inside which i need to perform an extra set of processes if the processor is being called from a certain scope. How can i check for the current application scope inside this global processor?
For example, there is a LocalScope api (com.glide.sys.fencing.LocalScope) which when used inside my global processor (LocalScope().get().scope().name()) returns 'global': which is the scope local to the code being executed. Is there any other similar api which can probably check from the current session for the current scope or any system property where the currently active scope is stored?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 07:35 AM
Hi Jivanjot,
var currentScope = gs.getCurrentScopeName();
gs.info(currentScope); //This will give name of current scope.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 08:00 AM
Hi Pradeep,
I need to use the api inside the java class for the processor. getCurrentScopeName() is not avaialble for the GlideSystem (com.glide.script.GlideSystem) object used inside the java class.