Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarative modelling : Problems when declaring new functions / components #400

Open
olive2205 opened this issue Apr 11, 2024 · 4 comments · May be fixed by #237
Open

Declarative modelling : Problems when declaring new functions / components #400

olive2205 opened this issue Apr 11, 2024 · 4 comments · May be fixed by #237
Assignees
Labels
model breaking Issues that pose the risk of breaking a model

Comments

@olive2205
Copy link

Hi,
I 'm using Capella 5.2 and i noticed a few problems in the .capella file when declaring new functions and components with Declarative Modelling and YAML file. The elements declared with py-capellambse are not the same than the ones declared directly in Capella and do not have all the informations displayed ine the Semantic Browser. These problems can, sometimes, corrupt the Capella Project so it can't be opened in Capella anymore.

For logical and physical functions, the xml tag is ownedFunctions and not ownedLogicalFunctions, so the function is not recognized in Capella.

For components :

  • sourceElement attribute is missing in the <ownedFunctionalAllocation/> tag
  • a tag <ownedFeatures/> should be added when declaring new components
  • in pa, when adding a deployment link between Behavior and Node component with deployed_parts, the following line should be added at the top of the .capella file :
    xmlns:org.polarsys.capella.core.data.pa.deployment="http://www.polarsys.org/capella/core/pa/deployment/5.0.0"

I hope this will help you,

Thanks

@vik378
Copy link
Member

vik378 commented Apr 11, 2024

@olive2205, any chance you could share some YAML example of what you are trying to do? (obfuscated will be fine too) - it will help us to reproduce your scenario a bit faster

@olive2205
Copy link
Author

olive2205 commented Apr 11, 2024

I'm just trying to use the example of the documentation https://dsd-dbs.github.io/py-capellambse/start/declarative.html.

and for the last point, here is my YAML code (PCNode1 was declared directly in Capella):

- parent: !find
    _type: PhysicalComponent
    name: PCNode1
  extend: 
    owned_components:
      - name: PCB2
        nature: BEHAVIOR
        promise_id: prom_PCB2
- parent: !find
    _type: Part
    name: PCNode1
  extend:
    deployed_parts: 
      - !promise prom_PCB2

@Wuestengecko Wuestengecko self-assigned this Apr 11, 2024
@Wuestengecko Wuestengecko added the model breaking Issues that pose the risk of breaking a model label Apr 15, 2024
@Wuestengecko Wuestengecko linked a pull request May 23, 2024 that will close this issue
@vik378
Copy link
Member

vik378 commented May 24, 2024

@Wuestengecko , where are we on this issue? its been open for a while ;-)

@Wuestengecko
Copy link
Member

For the last part of this (creating a matching Part when creating a Component, which currently has to be done explicitly), I was going to revive the now linked PR. But that has grown a bit beyond its original scope, so I first have to clean it up a little. But the good news is that I'm now actually working on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model breaking Issues that pose the risk of breaking a model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants