Emailtemplates not created in ASU not finding MxModelReflection.MxObjectReference

0
Hi All, As the title says we have some email templates that need to be created when the system is deployed/restarted. These were made in design time but we can’t find them once the email server is setup. All the environment model options are enabled and the system restarted automaticaly when saving them. Can you think of anything? Thanks!   EDIT: See my post bellow
asked
6 answers
4

Hi Jeremie,

Based on my understanding:

  1. You are working with Emailtemplates
  2. In your EmailTemplates, probably you are using tokens or something else which requires MxModelReflection to be enabled and working
  3. When you link those EmailTemplates to ASU, it tries to create the EmailTemplate and tries to find the entities linked via MxModelReflection

 

Check if the following fixes your problem:

  1. Make sure you trigger the ASu_CheckMetamodel from MxModelReflection before your EmailTemplate ASU
  2. Before calling the ASu_CheckMetaModel make sure you update the modules needed to be synced 
  3. After modules are updated and committed call ASu_CheckMetamodel
  4. This will make sure that your MxModelReflection is updated and all required objects are available when system starts
answered
2

I am not sure from you description, but i believe you are expecting the templates to be moved from one Mendix environment to another by doing a deploy of a Mendix package.

You are aware that the templates are stored in the database and not as part of the Mendix model? This means that templates will not be moved to another database automatically by doing a deploy. You need to either recreate the templates on the other server, or for example do some import/export routine you created yourself, or a database restore.

 

answered
2

It appears to me that your project contains custom code that uses MxModelrefelction to create mail templates. That is pretty complex and hard to help you with remotely.

Some quick hints:

Could it be the case that the association name or module name in the retrieve does not match the exact name of the association in your domain model? Maybe a developer did a name change?

Or maybe you need to do a refresh of MxModelReflection first?

answered
1

Hi Jeremie, 

in addition to Nirmalkumar's answer here a screenshot of our setup in the ASU:

Our retrieve of the reference is like this:

answered
0

Hi Michiel, 

No, they are created in design time so once we deploy the package the templates should be created again.

 

In the meantime I did find a technical mistake from our side in the creation of those templates. (something to do with not finding a needed MxObjectReference)

We retrieve them with this activity:

 [CompleteName='ModuleName.Entity1_Entity2' and Module='ModuleName']



It’s there that it goes wrong. Do you have an idea on how to retrieve the said reference?

answered
0

Hi All, thank you all for the help. We did it with a combination af all your answers :)
 

answered