Possible bugs when retrieving subcomponents in a diagram

Hi,

when attempting to

either the returned set si empty (despite teh fact that the expression 1a works in Sirius interpreter) or the generation is aborted because the expressions generate a
“M2Doc : technical error.
org.apache.xmlbeans.impl.values.XmlValueDisconnectedException”.

Pls see the expressions in question in the atatched word file.

brm

MarekBUG_ownedLOgicalSubcomponents.docx (14.5 KB)

Now, after upgrading to m2doc 3.1.1 (and deleting the “p2” and “configuration” subdirectories in APPDATA MelodyTeam directory+ restart of MelodyTeam), BUG2 and 3 do not occur anymore - the queries return the expected results. But BUG 1a still returns an empty set (1b returns now the complete set containing also the matching components). I can´t understand this because in Sirius Interpreter the same queries work as expected.

I don’t have elements to know why it works in Sirius and not M2Doc. But some possible issues are:

  • you are working on representations elements in the Sirius interpreter and on semantic elements from the model in M2Doc: check type of elements with .eClass()
  • the AQL environment can be different for instance Sirius metamodels are not registered in M2Doc leading to some expression returning nothing: check reigstred nsURIs in your template
  • you can be working with different values
  • something else ?

Thanks for the hints.

n M2Doc:
DEBUG rootLogicalComponent.eClass(): org.eclipse.emf.ecore.impl.EClassImpl@c63a15f (name: LogicalComponent) (instanceClassName: null) (abstract: false, interface: false)

DEBUG logicalSubcomponents.eContainer(la::LogicalComponent).eClass()->first(): org.eclipse.emf.ecore.impl.EClassImpl@c63a15f (name: LogicalComponent) (instanceClassName: null) (abstract: false, interface: false)

In Sirius it is org.polarsys.capella.core.data.la.LogicalComponent.

So teh classes are teh same: la::LogicalComponent

But most importantly in both cases the classes on both sides of the condition in select are the same, so it should work.

I have checked also the other reasons.

Maybe you can check each step of the expression in both contexts to see which step return a different result.

Well, I have done that before - it is just the last step -the select (in BUG 1a) that is different: an empty set in m2Doc vs. a correct subset in Sirius interpreter.

eContainer() returns correct values for logicalSubcomponents both in m2doc as well as in Sirius interpreter.

Do you have any error/warning when validating the template ? Because everything looks fine from what I see.

No I don`t, the validation works fine. And now, I am experiencing another case of the very same “technical error” - pls see the attached file (1.). It seems there is definetely some problem here. At the very least, the error is not indicative at all. And after closing it (by pressing OK), another prompt pop-up appears that contains just teh OK button, no text…BUG_nonEmptyDesc_ownedLogicalSubcomponents.docx (16.7 KB)

Do you have the full stack of the XmlValueDisconnectedException ?

Can you also try logicalSubcomponents.ancestors() and see if rootLogicalComponent is in the returned list (checking the id or the memory address looking like this @0000000) ?

No, in the dialog there is no stack trace.

ancestors() produces teh same number (6) of items and they have the same types as in Sirius interpreters, but the OID is visible just in m2oc. Nevertheless it must be the 1st item LogicalComponent@OID786 which, I think, is the rootLogicalComponent.

You might have the stack trace in the error log view. You can open this view with the menu Window > Show view > Other and select error log.

BUG_nonEmptyDesc_ownedLogicalSubcomponents.docx (18.3 KB) Stack trace appended in the attached bug description

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.