Difference between new GlideEvent vs gs.eventQueue?

Nia McCash
Mega Sage
Mega Sage

I'm noticing on this docs page  Map with transformation event scripts  that there are code samples that appear to be creating events via a  new GlideEvent  call, but I haven't been able to find this in use else where.

 

What is the difference between  new GlideEvent  vs  gs.eventQueue?

Should I only use  new GlideEvent  for Transform Map scripts?

Or are  new GlideEvent  and  gs.eventQueue  the same?

1 ACCEPTED SOLUTION

edwajs
ServiceNow Employee
ServiceNow Employee

Hi Nia,



The answer is in section three of the second link.  



Here is the direct link to the section:   Mapping with Transformation Event Scripts



3 Mapping with Transformation Event Scripts


Transformation events occur during the process of transforming an import set table onto a ServiceNow table. These events modify the transformation behavior from any type of mapping specification. Transformation Event scripts modify the processing of the events at various stages of the transformation. For example, the processing of a mapping operation defined using the Mapping Assist Utility can be manipulated using the event scripts. There are a number of import set JavaScript objects that are accessible during these events. These objects represent tables or portions of tables. It is important to note that what these objects refer to varies depending on the context of the event in which they are referenced.



Transformation Events are specifically related to imports and the processing of Transformation Maps.   The GlideSystem eventQueue() function is for System Events.   They are different code for different functionality.



Ed Wajs


ServiceNow Technical Support


View solution in original post

3 REPLIES 3

amlanpal
Kilo Sage

Hi Nia,



Please have a look at the below Wiki Links. GlideEvent replaces Packages.com.glide.policy.Event


1. Packages Call Replacement Script Objects - ServiceNow Wiki


2. http://wiki.servicenow.com/index.php?title=Transform_Map_Scripts#gsc.tab=0


I hope this helps.Please mark correct/helpful based on impact


Thanks for the links but I am still not seeing answers to my questions in those links.   Would you kindly and explicitly point out where or how those documents explain the difference between new GlideEvent and gs.eventQueue?


edwajs
ServiceNow Employee
ServiceNow Employee

Hi Nia,



The answer is in section three of the second link.  



Here is the direct link to the section:   Mapping with Transformation Event Scripts



3 Mapping with Transformation Event Scripts


Transformation events occur during the process of transforming an import set table onto a ServiceNow table. These events modify the transformation behavior from any type of mapping specification. Transformation Event scripts modify the processing of the events at various stages of the transformation. For example, the processing of a mapping operation defined using the Mapping Assist Utility can be manipulated using the event scripts. There are a number of import set JavaScript objects that are accessible during these events. These objects represent tables or portions of tables. It is important to note that what these objects refer to varies depending on the context of the event in which they are referenced.



Transformation Events are specifically related to imports and the processing of Transformation Maps.   The GlideSystem eventQueue() function is for System Events.   They are different code for different functionality.



Ed Wajs


ServiceNow Technical Support