Extending an Existing Element with More Tagged Properties

Discussions about Domain Specific Language customizations

Moderator: Moderators

Extending an Existing Element with More Tagged Properties

Postby veejay.gorospe@jhuapl.edu » Tue Feb 06, 2018 2:46 pm

Hello,

I'm looking to extend the standard SysML <block> element type with some tagged properties for a sponsor. I know how to do this with a Customization element for derived properties. But I can't seem to figure it out with regular tagged properties.

So I would like to do this with a Customization element or something similar so I not have to actually change the <block> stereotype element. The reason for doing this is so my sponsor can still use his standard SysML profile in his current project. But then he can add this "extension" customization to supplement his model with more properties.

In the example attached, I added Status and Status Rationale properties to a Customization element targeted to a <block>. But looking in the specification window of any block, none of those properties show up. Then when I added a derived property call "Test Derived Property", it shows up just fine in a block's specification window. Not sure exactly why a regular property won't show up the same way.

Any information helps.

Thanks,

Veejay Gorospe
Johns Hopkins APL
You do not have the required permissions to view the files attached to this post.
veejay.gorospe@jhuapl.edu
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Tue Jan 17, 2017 1:42 pm

Re: Extending an Existing Element with More Tagged Properties

Postby donatas.mazeika@nomagic.com » Wed Feb 14, 2018 7:24 am

Hello,

There are two different ways of extending your metamodel:
- Derived properties that are created in a customization. These properties are calculated and read-only. You could learn more here: https://docs.nomagic.com/display/MD185/ ... Properties
- Tag definitions. Tag definition should be created not for a customization but for a stereotype (as it is based on UML profiling mechanism). You could learn more here: https://docs.nomagic.com/display/MD190/ ... +DSL+Guide

In short: you need to create a stereotype, add several tag definitions for it (e.g. Status / Status rationale) and then to apply that stereotype to Block element. In such case, these tagged values will be visible in the specification window. It's a recommendation to keep stereotypes ant their customizations in a different project, that should be used in the projects where the extensions are needed.

If you have more questions, please free to ask.

Best regards,
Donatas Mazeika
donatas.mazeika@nomagic.com
Forum Beginner
Forum Beginner
 
Posts: 95
Posts Rating:8
Joined: Tue Apr 21, 2015 12:30 am


Return to DSL

Who is online

Users browsing this forum: No registered users and 1 guest