Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: TheTwo on May 15, 2008, 09:45:27 pm

Title: Set Rulesets in MST File
Post by: TheTwo on May 15, 2008, 09:45:27 pm
Hi,

I've designed mey own Model Validation Ruleset and like to include it in my MDGTechnology.

Every time I run the "MDG Technology Creation Wizard" with my MST-File, it removes the <ModelValidation> tag from my MST-File. In the Technology XML File is anything for the Rulesets added.

What is wrong?

Thanks

Code: [Select]
<MDG.Selections model="D:\Eigene Dateien\Diplomarbeit\EA_Projects\UMLProfileForMOF.eap">
    <Technology id="MOFMetamodel" name="MOF Metamodelling" version="1.0" notes="Meta Object Facility Metamodelling" filename="D:\Eigene Dateien\Diplomarbeit\EA_Projects\Tech\MOF_Technology.xml"/>
    <Profiles directory="D:\Eigene Dateien\Diplomarbeit\EA_Projects\Tech" files="MOF_Elements.xml"/>
    <DiagramProfile directory="D:\Eigene Dateien\Diplomarbeit\EA_Projects\Tech" files="MOF_Diagram.xml"/>
    <UIToolboxes directory="D:\Eigene Dateien\Diplomarbeit\EA_Projects\Tech" files="MOF_Toolbox.xml"/>
    <ModelValidation>
        <RuleSet name="MOFRules"/>
    </ModelValidation>
</MDG.Selections>
Title: Re: Set Rulesets in MST File
Post by: peter.zrnko on May 16, 2008, 01:25:00 pm
This isn't an answer to your question. Just a a tip - while using the "MDG Technology Creation Wizard" you can uncheck an option "Save to MTS". In this way your MTS file will remain unchanged.
Title: Re: Set Rulesets in MST File
Post by: TheTwo on May 16, 2008, 05:45:43 pm
Hi,

thanks for the tip, but it doesn't solve my problem.

The problem is the Technology Output File (xml-File). The generated output is the same with or without the <ModelValidation><Ruleset name="..."/></ModelValidation> in the MST file. There is no information about the rulesets in the generated Technology.
Title: Re: Set Rulesets in MST File
Post by: Eve on May 19, 2008, 09:08:05 am
What build of EA are you using?  MTS file support for ModelTemplates and ModelValidation were only added in build 825.  (Version 7.1)  If you are using version 7.1 you've got a problem that you need to send directly to sparx support.  If not, you'll need to upgrade or directly insert the ModelValidation information into the MDG technology (inside the MDG.Technology node) every time you generate the technology.
Title: Re: Set Rulesets in MST File
Post by: TheTwo on May 19, 2008, 06:49:48 pm
Thanks for reply. I'm working with Build 818, so I have to add this manually.

How should such a ModelValidation information look in the technology file?

I added <ModelValidation> block direct to my technology (XML) file under the Node <MDG.Technology>. But after starting EA with the Addin, in the "Model Validation Configuration" my new Ruleset (MOFRules) is not checked. The Technology is selected.
Title: Re: Set Rulesets in MST File
Post by: Eve on May 20, 2008, 08:47:52 am
It sounds like you've done the right thing, but I'm not sure what you should be seeing.  What I'd do is try changing it to be a blacklist for rules that are on by default.
Title: Re: Set Rulesets in MST File
Post by: TheTwo on May 20, 2008, 06:22:59 pm
I'm trying mangage that when my technology is activated, all standard RuleSets  in the "Model Validation Configuration (MVC)" are deactivated and only my own ruleset is activated.

But when I add an white list to the technology file and activate this technology there is no change in the MVC. A Blacklist doesn't change this configuration too.
Title: Re: Set Rulesets in MST File
Post by: Eve on May 21, 2008, 08:11:08 am
I'm not sure that an MDG technology can both turn off rules and enable new rules.  I'd recommend sending an email to sparx support directly.