Robust Transform Entity Mapping 'Is Conditional' throwing StackOverflowError
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-15-2022 09:29 AM - edited ā12-15-2022 11:48 AM
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.
ā
Error from the Import Log (also shown in the 'Comment' field on the import set table):
... (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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-05-2023 10:52 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-12-2024 09:50 PM
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!!