Sequence of transform scripts?

Ravish Shetty
Tera Guru

What are the different sequence of transform scripts?

I am interested in

  • Big transform map script
  • Source script in Field map
  • Other transform scripts like on before, on after, etc
1 ACCEPTED SOLUTION

bernyalvarado
Mega Sage

Hi Ravio,



Here goes the order on which I believe it executes:



a) onStart


b) onBefore


c) Transform Map Script (right before the update takes place)


d) Fields Mapped Transforms


e) onAfter


f) onComplete



Thanks,


Berny


View solution in original post

22 REPLIES 22

bernyalvarado
Mega Sage

Hi Ravio,



Here goes the order on which I believe it executes:



a) onStart


b) onBefore


c) Transform Map Script (right before the update takes place)


d) Fields Mapped Transforms


e) onAfter


f) onComplete



Thanks,


Berny


Mike Allen
Mega Sage

I am going to take a shot at this based on what I have noticed in the past:



onStart


onBefore



Source Script



Regular field map



onChoiceCreate


onAfter


onReject


onComplete



That would be my educated guess.


IT was much clear


Thanks


bernyalvarado
Mega Sage

But don't take our word for it, here goes a reference to what the wiki states:



There are two types of Transform Map scripts:


  • Explicit Transform Map scripts, which explicitly define mapping relationships
  • Transformation Event scripts, which modify the processing of events at different stages of a transformation


Explicit


An explicit Transform Map script explicitly defines mapping relationships in the Transform Map record itself. It runs in the context of "after" the source field values have been copied over to the target record, and before they are written to the database.




Event Scripts


The onStart event script is processed at the start of an import run, before any data rows are read.


The onComplete event script is processed at the end of an import run, after all data rows are read and transformed.


The onBefore event script is processed at the start of a row transformation, before the source row is transformed into the target row.


The onAfter event script is processed at the end of a row transformation, after the source row has been transformed into the target row and saved.


The onForeignInsert event script is processed at the start of the creation of a related, referenced record, before the record is created.


The onChoiceCreate event script is processed at the start of a choice value creation, before the new choice value is created.


The onReject event script is processed during the occurrence of a foreign record or choice creation, and the foreign record or choice is rejected, the entire transformation row is not saved.




http://wiki.servicenow.com/?title=Transform_Map_Scripts#Mapping_with_Transformation_Event_Scripts