OAB & OES Diagram Generation

Hello everyone,

"I’m using M2Doc 4.0.1 with Capella 7.0.1. I want to embed OAB (Operational Architecture Blank) and OES (Operational Entity Scenario) diagrams in my template.

What already works:

  • OEBD diagram: self.containedOperationalAnalysis.ownedEntityPkg.asImageByRepresentationDescriptionName('Operational Entity Breakdown')

  • OCB diagram: self.containedOperationalAnalysis.ownedAbstractCapabilityPkg.asImageByRepresentationDescriptionName('Operational Capabilities Blank')

What does not work:

  • OAB: The diagram is found with self.containedOperationalAnalysis.containedOperationalActivityPkg.eAllContents()->select(e | e.isRepresentationDescriptionName('Operational Architecture Blank')) returning true, but retrieving the image fails because eAllContents() without a type filter causes ‘EClassifier=ElementExtension is not registered’ errors. What is the correct element type that OAB diagrams are attached to?

  • OES: Same issue – the diagram exists on OperationalCapability elements but self.containedOperationalAnalysis.eAllContents(oa::OperationalCapability).asImageByRepresentationDescriptionName('Scenario') returns no image.

What is the correct AQL expression for both OAB and OES diagrams?"

Thank you!!

I found a solution.

{m:for sc | self.containedOperationalAnalysis.eAllContents(interaction::Scenario)} {m:sc.name}: {m:sc.availableRepresentations()} {m:endfor}

Helps you findig out the correct names.

1 Like

You can also import *kitalpha* metamodels (nsURI) in your template using the template properties wizard.

1 Like