How to Conditionally Set a Transform Map to run based on a flow. I am trying to figure out how to conditionally set a transform map to run when different flows are initiated.

tapan1
Tera Contributor

Scenario:
2 - Remote Instances
2 - Separate Flows Inbound & Outbound
2 - Transform Maps that transform different columns on the same Incident Table

How can I conditionally set a Transform Map to run when the remote instance updates the incident fields are different for each Transform Map?

2 REPLIES 2

Surendra Raika1
Kilo Guru

Please explain bit more.

So are two external system's are updating incident(s) in your system, and you are using import set(s) API and corresponding Transform Maps !

Something like
Import Set IS1 ->(uses) TM1 -> incident-1

Import Set IS2 ->(uses) TM2 -> incident-1

 

tapan1
Tera Contributor

Update on this Question:

 

Source Instance: Flow send Incident details via Action Create or Update Remote Record to table sn_now_remote_spk_imp_incident. On Remote Instance, there are two transform maps that take the sn_now_remote_spk_imp_incident data and transforms to the Remote Incident Table. These 2 transform maps create two incidents on the Remote Instance Incident table.

 

I created a OnStart script to check the source CI, if it starts with 'xyz' then abort the transform. But when evaluating the source CI using (var confItem = source.getValue('cmdb_ci')) and trying to print the value using gs.info ("CI = ", confItem), the info message shows null, but when the transform is completed as well as the values stored in the sn_now_remote_spk_imp_incident table, there is an actual string value of "XYZ Computer".

 

Goal is to check the incoming source string value, if it starts with "xzy" then abort this transform map and use the other transform map.