Robust Transform Entity Mapping 'Is Conditional' throwing StackOverflowError

Luke Mohr
Tera Contributor

Hi all. I have a robust import set transformer that is mapping records from a data source to the alm_hardware table. The ETL definition has 3 entities: an import set, a staging table, and the hardware table. Mapping from import set to staging table (Robust Transform Engine Entity Mapping tab on the ETL Definition page) is fine, data transformation is fine.

 

However, mapping from the staging table to the hardware table  is only successful if the 'Is Conditional' box is unchecked. If 'Is Conditional' is checked, then the below StackOverflowError is thrown regardless of the contents of the condition script (can return true or false, can be a function definition returning true or false, can be empty, etc.). In the screenshot I am only mapping 1 string field.

 

What could be causing this error? Is this an issue with ServiceNow? I've tried adding/removing field mappings, all of the import set and staging data is correct, everything works fine except for this 'Is Conditional' checkbox, which I need to be checked.

 

Screen Shot 2022-12-15 at 12.07.12 PM.png

ā€ƒ

Error from the Import Log (also shown in the 'Comment' field on the import set table):

Spoiler
com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.io.IOException): java.io.IOException: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: com.snc.cobject.ComplexObjectType["namespace"]->com.snc.cobject.ComplexObjectNamespace["types"]->java.util.Collections$UnmodifiableMap["Integer"]->
... (repeats) ...
com.snc.cobject.ComplexObjectType["namespace"]->com.snc.cobject.ComplexObjectNamespace["types"]->java.util.Collections$UnmodifiableMap["Integer"]->com.snc.cobject.ComplexObjectType["qualifiedName"])
at com.fasterxml.jackson.databind.JsonMappingException.fromUnexpectedIOE(JsonMappingException.java:338)
at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:1009)
at com.snc.cobject.serializer.SerializationMap.writeString(SerializationMap.java:47)
at com.snc.cobject.serializer.ComplexObjectSerializer.toJson(ComplexObjectSerializer.java:81)
at com.snc.cobject.serializer.ComplexObjectSerializer.toJSObject(ComplexObjectSerializer.java:172)
at com.snc.cobject.serializer.ComplexObjectSerializer.toJSObject(ComplexObjectSerializer.java:167)
at com.snc.cobject.IComplexValue.toJavaScriptObject(IComplexValue.java:68)
at com.glide.robust_transform_engine.RobustTransformEngine.transformRteInputs(RobustTransformEngine.java:252)
at com.glide.db.impex.transformer.service.RobustImportSetProcessor.sendToRobustTransformEngine(RobustImportSetProcessor.java:125)
at com.glide.db.impex.transformer.service.RobustImportSetProcessor.processBatch(RobustImportSetProcessor.java:106)
at com.glide.db.impex.transformer.service.RobustImportSetProcessor.transform(RobustImportSetProcessor.java:81)
at com.glide.system_import_set.ImportSetTransformerImpl.doRobustImportSetTransform(ImportSetTransformerImpl.java:166)
at com.glide.system_import_set.ImportSetTransformerImpl.transformAllMaps(ImportSetTransformerImpl.java:114)
at com.glide.system_import_set.ImportSetTransformerWorker.startWork(ImportSetTransformerWorker.java:40)
at com.glide.worker.AbstractProgressWorker.startAndWait(AbstractProgressWorker.java:126)
at com.glide.worker.ProgressWorker.startAndWait(ProgressWorker.java:52)
at com.glide.worker.BackgroundProgressJob.execute(BackgroundProgressJob.java:59)
at com.glide.schedule.JobExecutor.lambda$executeJob$0(JobExecutor.java:129)
at com.snc.db.data_replicate.replicator.DataReplicationAdvisors.runInOriginatorContext(DataReplicationAdvisors.java:73)
at com.glide.schedule.JobExecutor.lambda$inDataReplicationContext$2(JobExecutor.java:159)
at com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:132)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:116)
at com.glide.schedule_v2.SchedulerWorkerThread.executeJob(SchedulerWorkerThread.java:338)
at com.glide.schedule_v2.SchedulerWorkerThread.lambda$process$0(SchedulerWorkerThread.java:220)
at com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)
at com.glide.schedule_v2.SchedulerWorkerThread.process(SchedulerWorkerThread.java:220)
at com.glide.schedule_v2.SchedulerWorkerThread.run(SchedulerWorkerThread.java:101)

 

2 REPLIES 2

Clarkie1
Giga Expert

I think the condition script needs to do a "return" of the boolean.

Though I am also only just starting to use this myself and having different issues.

Aniket Surwase
Tera Contributor

Hello @Luke Mohr ,

I hope you are doing well, Here I think the condition script should be like this :

 

(function(input){

if(input && input.temp.var_name.slice(0,7) == 'Hardware') {

return true;

}

return false;

})

(function(input){

if(input && input.temp.var_name.slice(0,7) == 'Hardware') {

return true;

}

return false;

})

Here,

temp: is a statging entity path

 

var_name :- the entity field based on which you want to apply condition.

 

Thanks!!