OEBD Diagram Generation

Hi,
I am trying to generate a document that uses OEBD diagrams but I have not found a way to navigate to the diagrams. I know that the OEBD diagrams are a viewpoint::DView but I can’t seem to find the right code that will produce the diagrams.
Thank you,
Maria

Hi Maria,
I hope you are doing well.
I think these two thread should help you, let me know if not.
https://forum.mbse-capella.org/t/569/
https://forum.mbse-capella.org/t/499/
Stephane

To make it work, first, you have to add these additional nsURI packages to your m2Doc template. To do so, right click on your m2doc template (under Capella) and select “Edit Template properties” amd then go to the nsURI(expert) tab, click on “add” and search for *sirius.
http://www.eclipse.org/sirius/1.1.0
http://www.eclipse.org/sirius/diagram/1.1.0
http://www.eclipse.org/sirius/diagram/sequence/2.0.0
http://www.eclipse.org/sirius/table/1.1.0
http://www.eclipse.org/sirius/tree/1.0.0
Then you can try one of these two examples, the first one will display the diagram name as well.
{m:for package |self.containedOperationalAnalysis.ownedOperationalContext}
{m:for rep | package.representationByDescriptionName(‘Operational Entity Breakdown’)}
{m:rep.asImage().fit(500,400)}
{m:rep.name}
{m:endfor}
{m:endfor}
{m:for package |self.containedOperationalAnalysis.ownedOperationalContext}
{m:for im | package. asImageByRepresentationDescriptionName(‘Operational Entity Breakdown’)}
{m:im.fit(500,400)}
{m:endfor}
{m:endfor}
If you want to also get the OABs, you have to replace the DescriptionName string by ‘Operational Entity Blank’
I hope this helps.

Hi! @YvanLussaud

In Template properties, should both packages Capella and Sirius be visible? Only Capella can be selected (it is visible only in 3.0.0), Sirius package generates an error (in both installations: m2doc 3.0.0 and 3.1.0) when selected - its URL is not ok:

Invalid block: can’t find EPackage: http://www.eclipse.org/sirius/tree/1.1.0

So why is the Sirius package there even if it does not work?

And, in m2doc 3.1.0, even after selecting all the sirius* nsURIs (most of which are 1.1.0, some are 1.0.0) the services seem to be hard to find ;-):

Invalid query statement: Couldn’t find the ‘asImageByRepresentationName(java.lang.String)’ service

br
Marek

Depending on the version of Sirius and what parts of Sirius you installed all nsURIs might not be here.

In the template properties wizard, you can use the expert tab to select the list of nsURI you need. For instance use the add button and in the dialog enter *capella* add visible nsURIs then *sirius* and add visible nsURIs.

For a working example follow the M2Doc Capella tutorial. You will see several usages of the service asImageByRepresentationName() in both LA and SA templates.

Hello @YvanLussaud ,

I imported an existing project in MelodyAdvance 4.5.2 and M2Doc 3.1.0 from the same configuration, just another.
I also get the error:
Invalid block: can’t find EPackage: http://www.eclipse.org/sirius/tree/1.1.0
Invalid block: can’t find EPackage: http://www.eclipse.org/sirius/tree/1.1.0

In the template property wizar, we checked the list of nsURI in the expert tab. Both packages are there.

Are there know problems with imports ? What can we change so it works ?

Kind regards,
Pierre

You probably need to remove the http://www.eclipse.org/sirius/tree/1.1.0 and add the one with your current version. Also you probably can remove it since you probably don’t need tree representations.

Hello Yvan,
we (also @MSechny) have tried to go forward from your former advice.

By rexporting the project in a new way, the failure changed: we now have ’ <—can’t find EPackage: http://www.polarsys.org/kitalpha/vrprofile’. Since that, we can’t retrigger the /sirius/tree/1.1.0.
We also have reimported the project into Marek’s environment - no problem, and made the same experience with our IT responsible: problem again.
Comparing our configurations, we see that @MSechny has following plug-ins (Menu Help.About Melody Advance.InstallationDetails):


Neither our IT responsible nor I have it (empty list with the same filter).

We have tried to remember how this plug-in could come into Marek’s config - and not the other although we work originally from the same install.
Would you know this ? Our IT responsible will reinstall it from scratch with 3.1.1 to benefit from your bug fixes, so if there is a point where he should be particularly carefull, it could help.

Kind regards,
Pierre

Thank you

I don’t know where those plugins come from, but the idea here is to identify metamodels (nsURIs) you are using in your template and import them in the template. And my guess is none of http://www.eclipse.org/sirius/tree/1.1.0 and http://www.polarsys.org/kitalpha/vrprofile are useful in your case. By useful I mean you are using features from those metamodels in your AQL expressions.
If they are useful, you must have the corresponding plugins installed to generate the template.

I hope it helps.

Hello @YvanLussaud,

We have tried to remove http://www.polarsys.org/kitalpha/vrprofile from the nsURls both for me an @MSechny. It worked in both cases. We will be carefull about this in the future.

Hope you get this thank you before the week-end,
Pierre

You’re welcome and have a nice week-end.

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