Values of template variables in genconf are not persistent, they are reset to EObject

When types of template variables are set and mapped, e.g. rootLogicalComponent and rootLABdiagram are set in an m2doc template to la::LogicalComponent and viewpoint::DRepresentationDescriptor, respectively and they are subsequently mapped in genconf to appropriate values selected in an melodymoddeler and sirius DAnalysis, respectively, they are both reset to EObject when the genconf is reopened rigth after they have been set.

(Occured in Capella 4.5.2 and m2doc 3.1.0)

You should check the URIs of variables in the genconf, because it can be a bug with the label provider especially in a shared project:

If the URIs of variables are reset in the genconf, please fill a bug.

Hi, so it means just that the labels are not OK, but the actual mapping is correct? (in the bug description it says “Note that self value is correctly serialized in the genconf file”)

Also, may be related to this, what I have observed recently is that after removing a variable from the template (such as rootLogicalComponent in the above example) by replacing it with an m:let variable of the same name, it (sometimes) remains to be displayed in the template properties as a template variable and the validation of the template generates an error

{m:let <— The variable mask an existing variable (rootLogicalComponent).rootLogicalComponent = myModel…}

When the contents of the template is copied into a new template, this issue does not occur anymore - only the myModel variable is displayed in the template properties.

Yes the URI referencing the self value should be correct.

For the let case it should not happen, I think opening the template properties in the wizard and saving them should fix the problem.
I opened a new bug:

Reopening the template properties and saving them (clicking Finish) does not change the situation - the unused variable is still there…

You can edit the custom properties from word and try to remove it manually. The M2Doc web site is currently down, but you can find the way custom properties are stored in the M2Doc help using the Eclipse help content.

Thanks, this alternative way does its job in that I was able to delete the unused property and, subsequently, the validation error disappeared. Ideally, the “?” button in the Edit template properties dialog would open that page in the Help.

Unfortunately, there is this other issue related to template variables which hampers our work on the generic templates usable in multiple models of ours: M2doc: How to use optional template variables