Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Viking on June 03, 2020, 02:53:16 am

Title: Consitency checks and reuse
Post by: Viking on June 03, 2020, 02:53:16 am
Hi, I am sure that I am not the first one interested in this topic. But I did not find this topic in the forum.

I currently create an new viewpoint. Beside the notation it should provide modelling rules likes EA does it for the provided diagrams. I wonder how this is implemented in EA and if I can reuse this technology and / or models in my profile. Does EA use standard or own metamodels, OCL, etc.?

Many thanks, V.
Title: Re: Consitency checks and reuse
Post by: Uffe on June 03, 2020, 07:04:57 pm
Hello,

OCL is not used. To specify permitted connectors between element types, use metarelationships or metaconstraints in your profile.

/Uffe
Title: Re: Consitency checks and reuse
Post by: Viking on June 03, 2020, 07:58:11 pm
Hello,
OCL is not used. To specify permitted connectors between element types, use metarelationships or metaconstraints in your profile.
/Uffe

Many thanks @Uffe. Very helpful.

Does the OMG formally describe the rules of UML and BPMN ? I couldn't find anything in the Normative Machine Readable Documents.
Title: Re: Consitency checks and reuse
Post by: qwerty on June 03, 2020, 08:36:21 pm
Well, UML is normative. How tool developers realize that is different. EA isn't too bad in that respect. Alas, you have lots of people that permanently misuse UML, ignore rules and ask why they get limited all the time :-/

(I guess the same goes for BPMN since it's also now under OMG's jurisdiction.)

q.
Title: Re: Consitency checks and reuse
Post by: Viking on June 04, 2020, 02:20:59 am
Well, UML is normative. How tool developers realize that is different. EA isn't too bad in that respect. Alas, you have lots of people that permanently misuse UML, ignore rules and ask why they get limited all the time :-/
(I guess the same goes for BPMN since it's also now under OMG's jurisdiction.)
q.

With "Normative Machine Readable Documents" I mean the XMI-files from OMG. They contain the Elements,  Structures, etc. But I cannot find the modelling rules (like metaconstraints or OCL).

Just to make sure that there is no misunderstanding.
Title: Re: Consitency checks and reuse
Post by: Geert Bellekens on June 04, 2020, 03:35:35 am
Have you looked at the xmi from UML 2.5?

I imported that in EA a while ago, and I do find constraints there.
For example on BroadcastSignalAction I see a constraint in OCL:

argument->size() = signal.allAttributes()->size()

Geert
Title: Re: Consitency checks and reuse
Post by: Viking on June 04, 2020, 04:03:42 am
Have you looked at the xmi from UML 2.5?
I imported that in EA a while ago, and I do find constraints there.
For example on BroadcastSignalAction I see a constraint in OCL:
argument->size() = signal.allAttributes()->size()
Geert

Great. Thank you. I will check this.
Title: Re: Consitency checks and reuse
Post by: qwerty on June 04, 2020, 04:30:40 am
I can confirm what Geert said (I have a quite recent import). However, these OCL constraints won't help you in EA unless you write your own OCL compiler. Good luck with that.

q.
Title: Re: Consitency checks and reuse
Post by: Geert Bellekens on June 04, 2020, 05:06:24 am
unless you write your own OCL compiler. Good luck with that.
That's actually quite fun. :P I did that for a small subset of OCL a while ago when we did a migration from Magicdraw to EA.
The script converted a bunch of OCL statements into a schema composer artifact.
See https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Framework/OCL (https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Framework/OCL)

Geert
Title: Re: Consitency checks and reuse
Post by: qwerty on June 04, 2020, 06:31:51 am
I think that this is fun (I wrote lots of compilers). But only if you got the time. It's definitely no free lunch here ;-)

q.