Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] multiple inheritance in profile

Hi Ed,

Gery is currently working on the BPMN Papyrus DSML, you may find all sources in this eclipse repository [1].
I think it's quite natural for him to use this mailing list for such tricky dev question.

The root issue is that OMG BPMN profile is indeed using multi-inheritance and same property name [2].
(IMHO: very bad idea, but I didn't check if it's valid for an UML profile)

Maybe it should be reported as OMG bug?

Regards,
Benoit

1: https://git.eclipse.org/c/papyrus/org.eclipse.papyrus-bpmn.git/
2: BPMNActivity extends InteractionNode and BaseElement
BaseElement and InteractionNode both have a base_Element property.

-----Message d'origine-----
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Ed Willink
Envoyé : mardi 28 mars 2017 11:22
À : Papyrus Project list <mdt-papyrus.dev@xxxxxxxxxxx>
Objet : Re: [mdt-papyrus.dev] multiple inheritance in profile

Hi

This is the Papyrus developers list. Please use the Papyrus forum for Papyrus usage questions. Use the UML2 forum for UML questions.

You haven't provided a repro so I may be misunderstanding what is nasty.

base_XXX/extension_XXX is effectively reserved for use by the Stereotype implementation mechanics. Very bad practice to re-use it. Imperfect tooling may get confused.

Duplicate feature names are prohibited in Ecore and UML. In Ecore (for the reified Stereotype) you would be in trouble. However UML provides a redefinition capability. This should be used to break the conflict. I've only used it in some superficial OCL test cases, so you may have some bugs to circumvent. Raise Bugzillas with fulll project repros.

     Regards

         Ed Willink

On 28/03/2017 09:53, DELOGE Gery 249233 wrote:
> Hi,
>
> I had annoying exceptions in BPMN. The root cause was an issue in BPMN profile generated code with multiple inheritance.
> A stereotype inherits from two parents who have each a property named with the same name.
> Basically BPMNActivity inherits from InteractionNode and from BaseElement who have both a base_element attribute.
>
> Initial configuration was UML2 generator (xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel in genmodel file) and DUPLICATE_FEATURE_INHERITANCE set to DISCARD.
> In this case, the inheritance from InteractionNode is not present in generated code and effect is IllegalArgumentException.
>
> First test was renaming base_element attribute in InterractionNode and keeping DUPLICATE_FEATURE_INHERITANCE to discard.
> Code was generated without error and multiple inheritance is fine.
>
> Second test was setting DUPLICATE_FEATURE_INHERITANCE to Process. In that case multiple inheritance is generated correctly but I have one error in generated code in a switch case in eIsSet method
> 	case BPMNProfilePackage.INTERACTION_NODE__BASE_ELEMENT:
> 		return isSetBase_Element();
> INTERACTION_NODE__BASE_ELEMENT cannot be resolved or is not a field 
> Commenting this case and everything look fine.
>
> Does anyone already have this issue ?
> What is the best solution ?
>
> Cheers,
> Géry
>
>
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or 
> unsubscribe from this list, visit 
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


Back to the top