I have a module based on the Questionnaire module from the App Store and I would like to be able to export questionnaire configurations from one server to another. I have looked at the export/import functionality for templates in the Excel Importer module and tried to use similar workflow, with partial success.
I created a temporaty web service to create an XSD for the QuestionnaireConfig and associated forms, and then created export and import mappings based on it. This partially works as I can export the XML file, then import it to create new records. However, the questionnaire ElementConfig records to be created should each be a specialization of the ElementConfig entity, based on the value in ElementConfigType attribute.
I addressed this by using a microflow in the Import Mapping that looks at the value in the ElementConfigType data and creates the correct specialization - this also works OK. My problem is that the specializations have extra attributes that do not exist in the generalization (ElementConfig), such as Option values linked to List-type elements. This data does not exist in my Export mappings, so I cannot import it.
Does anyone know how to address this issue - is there any way when defining the XML export template to include the extra attributes that are part of any specializations? Thanks for any suggestions.