I want to create 2 DOM instances with EXCEL file by use of script "IngestInstances" of deployment "DOM Editor":
EXCEL sheet "Instances":
Network_NWID Network_NName Network_NID Network_NType
0
-
0
-
1
Test
1
Satellite
EXCEL Upload is successful:
JSON: [
{
"Network": {
"NWID": "0",
"NName": "UNDEF",
"NID": "0",
"NType": "-"
}
},
{
"Network": {
"NWID": "1",
"NName": "Test",
"NID": "1",
"NType": "Satellite"
}
}
] (Script 'IngestInstances')
For section field "NWID"
there is an error for each instance:
TraceData: (amount = 1)
- ErrorData: (amount = 1)
- ErrorReason: DomInstanceContainsUnknownFieldsForCurrentStatus, DomInstanceId: DomInstanceId[fc702e28-7f0d-4a0a-98fc-87aac4135f06], DomInstanceName: 0, AssociatedFields: [SectionDefinitionID[3a9f92a4-16e5-4736-9b1c-f207e8feb311] (SectionID[b67b9725-fd27-499f-b0a1-3c41f5c70c45]) - FieldDescriptorID[323557a3-ae69-4a79-b86f-2c4d6e125d99]], StatusId: new,
(Script 'IngestInstances')
Don't know what I'm doing wrong?
Hi Harald,
A potential cause that I could think of: In the JSON, the values of the field "NWID" are considered JSON Strings, while the FieldDescriptor expects a number.
It could be that because of this inconsistency, the ingest-instances script cannot do the conversion or saving. Is it possible to have as input "NWID":0 instead of "NWID":"0" and try again?
Kind regards,
Joachim
Hi Joachim, I have no influence on JSON. It’s automatically generated from EXCEL by script. I believe there’s correct transformation of JSON input strings to data types due to the FieldDescriptor data type definition. I’ve changed FieldDescriptor data type for NWID to String but still get same error.
I think to let the community help you troubleshoot, what could be useful is if you can provide the content of the module.json file, which you get when you open the Dom Editor Automation Script > Export … > check your DOM Module, Click on Export, Extract the .zip you get and provide the content of module.json as a comment.
After deleting the complete module and loading again EXCEL description ingest works. It seems that internal DOM handling gets into confusion when fields are changed from optional to mandatory back and forth and from autoincrement to Int64 back and forth.
Thanks for help.
It’s great to hear you’ve already identified the issue. I was planning to reproduce it to pinpoint the root cause, but it seems you beat me to it. Wishing you success with your further DOM adventures, and feel free to reach out to the Dojo Community if you encounter any further issues.
Another intermediate thing to try out could be to change the FieldDescriptor Type of NWID to String and see if it works like that. That could already be an indication that the problem is related to the Types.