M2doc in Melody Advance Team (Capella Team)

Thanks, Yvan.

I tried something else.
I installed M2Doc 3.1.0 on top of Melody 4.5.2 (=Capella 1.4.2). Now fromHTMLBodyString works.

Are there incompatibilities between M2Doc 3.1.1 and Capella 1.4.2?

Greetings, Uwe

This should work but you will probably not be able to install the specific services included in the M2Doc Capella extensions since this part connect a specific version of M2Doc and Capella. It’s probably not a problem if you don’t uses those services or can move them in your own project.
I will test the fromHTMLBodyString() with M2Doc extensions for Capella 1.4.2 and version 5.0.0.

We have found out, that the m2Doc template/gencof files can be placed into a remote connected project in Project Explorer of Melody Team. But they are not visible to other users (nor are they exported when a local project is exported to a remote project). Why are they stored just in the local workspace, not in the remote repository? If this is not possible, then templates corresponding to a shared model cannot be stored in that model itself and can quickly become out of sync with it. At least in principle, Capella is capable of storing of (image) files in a remote project – the upload:

image001.png

@UweW I tested with:

  • M2Doc 3.1.1 and Capella 5.0.0
  • M2Doc 3.1.0 and Capella 1.4.2
    And the service is available in both cases. Not sure what is going on here… May be something specific to Melody.

@MSechny You can put the template in the CDO repository (shared project) and reference is with its URI (cdo://…). It will work as long as you have the SiriusSession defined to your shared .aird.
But in order to share the genconf file and be able to launch it, you will need to write a bit of integration code since M2Doc relies on resources from the workspace for its menus. Here you probably want to provide menus for each genconf resource on the CDO repository.
An other way of sharing a template is creating a plug-in and distribute it in an update site. There is a registry to reference template from such plug-ins.

Hi Yvan,

the effort to have the genconf in the repository seems to be quite high and actually it should be invested rather not by the users of m2doc. Nevertehless, may be, if you provided a sample where to change what we could get the menus there.

To share a plugin for each template is not feasible imho.

Afa the template via URI is concerned, it sounds viable and workable. But we do not an idea how to do that exactly – could you pls provide a more detailed instruction on this?

Hi Yvan,
related to versions:
you confirm more or less what I have found out:
M2Doc 3.1.0 and Capella 1.4.2 (Melody 4.5.2) works fine with ‘fromHTMLBodyString’.

Obviously, for the combination M2Doc 3.1.1 and Capella 1.4.2 it does not work.

I don’t have access to the final product Melody and your request go further simple support on M2Doc. We can probably help you with commercial support, @SamuelRochet will contact you.

I tested M2Doc 3.1.1 with Capella 1.4.2 and it works, the service fromHTMLBodyString() is found. But in this configuration the M2Doc Capella extensions can’t be installed so I had to remove specific services from the IFE example (replaceLink(), getCeDirection(), getDestinationComponent()), the service import in the template and also change the version of M2Doc to 3.1.1 in the template.

Hi Yvan,
currently we again have this very same issue in the same combination of m2doc and Capella (3.1.1 + 1.4.2) versions occuring across templates and users - '<—Couldn’t find the ‘fromHTMLBodyString(EClassifier=EString)’. Now, it is good to know it works at your premises. So we simply have to identify the issue which causes the problem at ours. Could you pls expand a little bit on what you mean by ‘had to remove … the service import in the template’?

Or may be you have also another idea where we need to look? (We had to change the default workspace of Capella, which also changed its configuration directory - may be this is related to the issue, because it stopped to work afterwards). br, M.

… it cannot be stressed enough that it would be nice to have a response, as we are currently blocked and I am hopeful we could find the reason why and resolve this, actually.

You need to make sure you have the feature “M2Doc HTML Integration (experimental)” org.obeonetwork.m2doc.html.feature is installed in your Capella. And you don’t need to import any service class by hand for this service to work.

Yes, I know, that is how it should be, but as I have written yesterday here Postprocessing of M2Doc Documents by Visual Basic we have this feature installed, it is visible in the installed sw dialog. … Or should we may be reinstall this feature? How - via an update site?

@YvanLussaud, @UweW, @plm Hi Yvan, we experience now exactly the same issue “Invalid query statement: Couldn’t find the ‘fromHTMLBodyString(EClassifier=EString)’ service” in Capella 5.1 + m2Doc 3.2.0. The “M2Doc HTML Integration (experimental)” is installed acc. the list of Installated Software in the Installation List. Is there any new relevant information or anything else we could try out wrt this issue since the last time? br, M.

There is nothing new, this service is tester on each version of Capella when the M2Doc extensions update site is built. We also tests the installation and the generation with Capella Team. So I’m still not sure why it doesn’t work for you out of the box.

There is a new version of M2Doc (it will be the 3.2.1 after the release) that improve the conversion form HTML+CSS to docx. But the packaging is still the same so I’m not sure it will help you. The nightly build can be found here:

https://s3-eu-west-1.amazonaws.com/obeo-networkaggregation-releases/capella-extensions/capella-5.1.x/nightly/full

This version is not a release but should be close to the released version. Let me know if it helps.

OK, thanks. Does our instalaltion details screenshot looks as it should?

After updating/installing M2Doc your qualifier should be 3.2.1.202112101442 and not 3.2.0.

There is also a zipped version of the update site here if needed:

https://s3-eu-west-1.amazonaws.com/obeo-networkaggregation-releases/capella-extensions/capella-5.1.x/nightly/full/org.obeonetwork.capella.update.full.zip

Yes, I´ve meant we have not done the upgrade to 3.2.1 ye, so it looks like in the above screenshot. So it is ok and it should work with 3.2.0 also, that is what you mean. But we will try 3.2.1 as well.

From the other thread you should also check the org.jsoup plugin. But for M2Doc everything seems fine.

Hi,
I have tried several ways installing M2Doc. I have used the version 3.2.0 and 3.2.1 . Both versions I have installed with different methods: the standard update-site zip and installation as dropin.
The behaviour is always the same.
In some cases ‘fromHTMLBodyString()’ works. But, it all seems to depend on if the jsoup plugin is getting loaded or not. I could no sort out why sometime jsoup is loaded and sometimes not.

I remember with Melody 4.5.2 the issue was also that jsoup did not get properly loaded. The recommendation from the Thales support then was to install m2doc as dropin, which helped at that time.

This time it does not help.

Shouldn’t jsoup be explicitly required and loaded by m2doc? As a user I should not need to check for it.

Jsoup is required by M2Doc see this manifest and also this feature.

I don’t know why it can’t be loaded in your configuration. If you install everything using p2 (update site) you should have errors on what is incompatible.
Do you have other versions of the org.jsoup plugin in your installation ? Maybe I can open the range for jsoup if it don’t break the code.