Table to Show Model Navigation

Discussions about Domain Specific Language customizations

Moderator: Moderators

Table to Show Model Navigation

Postby » Tue Jul 21, 2020 2:02 pm


I am trying to create a generic table where the columns report a specific navigation through the model. I want to start off with an input pin and get:

* input pin owner (call it OWNER)
* OWNER's behavior (call it BEHAVIOR)
* BEHAVIOR's context (call it _CONTEXT)
* _CONTEXT's parts (bonus points if it can be filtered to just ports)

I have a list of (over 200) validation results and I want to see the model elements the OCL goes through. To get these items manually I can right click the items in the specification window and open the specification for each item. I can get the input pin and it's owner in a table, but after trial and error and trying to understand the documentation, I have resorted to manual excel file creation, which is slow and tedious at best. Any help is appreciated!

The OCL for my validation rule is:

Code: Select all
self.owner.oclAsType(CallBehaviorAction).behavior.oclAsType(Activity)._context.oclAsType(SysML::Blocks::Block).part->asSet()->selectByType(Ports)->exists(p|p.type = self.type)


User avatar
Forum Newbie
Forum Newbie
Posts: 17
Posts Rating:0
Joined: Wed Jun 24, 2020 11:25 am
Full name: Ryan Hill

Re: Table to Show Model Navigation

Postby ogirdor » Fri Jul 24, 2020 12:04 am

Hi Ryan,

I would suggest that you look in the documentation regarding metachain navigation. It is a very powerful tool to navigate through the model. It can help you to easily retrieve the information that you are looking for.

You do not have the required permissions to view the files attached to this post.
Forum Beginner
Forum Beginner
Posts: 67
Posts Rating:19
Joined: Wed Jun 03, 2020 4:41 am

Return to DSL

Who is online

Users browsing this forum: No registered users and 0 guests