So at first I’m sorry if there is already a topic like that, but I didn’t find it.
I want to create an add on to get a visual possibility to check, if the created model does work like wanted. For that I thought of an animation of the path in chronologic order.
I’m quite new to Capella so I don’t dip to deep until now so I am happy about every answer that can halp.
You can use Python4Capella to validate your model. If can allow you to create a validation report.
For the animation part, you will need to add a Sirius layer to existing Capella representations. Then you need to trigger a refresh of the representation to change the style of the current animated element. I’m not sure that’s the best way to do this. It can have an impact on performance.
An other way could be to generate XState code corresponding to your Capella elements and use their visualizer to check the behavior. Note that the open source version of the visualizer might not be maintained anymore and has a few limitations. There is an online version of the visualizer.
I believe for both background solution that was mentioned in previous post, that is, Java code or Python scripts, there will be the need to do any of the following activities on the model:
Query model elements:
1.1 Java and extending Capella validation rules and developing Eclipse plugins; this seems a more independent solution?
1.2. Python4Capella: generate validation report. Which format can it generate?
Navigate, i.e., go from one model element to another.
Validate the model.
@YvanLussaud any other considerations/thoughts that you envisage?
If the need is to validate one model against the other, it needs to compare both. Hence:
Thank you Both for your ideas. I‘m going to have a look on your solutions and will See, what will work the best for me. If you have more suggestions, please send them aswell so there is smth like a list to Check the options
The EMF validation approach is probably the best if you are use to Java and plugin development. Invalid rules will generate markers in your Capella model and help you identify which object invalidate which rule.
The Python4Capella is the fastest way to do this since it will avoid a lot of boiler plates in the process. But it will be less integrated with Capella. You can generate any document that could be generated with Python. As an example you can find a simple script generating a xlsx document.
In both cases you can use the Java API to navigate. Python4Capella provides simplified APIs for Capella but you can also access Java objects and the Java API from it (see tips and tricks).
If you need to compare different versions of a model, Java and tools like EMF DiffMerge (used by Capella) or EMF Compare can be used.