Insert new element and then create the XML file

Hi, I’d like to insert a choreography task on the basic modeler. There’s a way to insert it and then create the relative XML element when exporting the model?
I tried to use the costum-element example but it is missing the XML convertion of the new element.
How can I do?

Thanks a lot