Jazz Jazz Community Blog Under the hood: Understand the impact of proposed changes using Rational Engineering Lifecycle Manager

Part 1b of “Using Rational Engineering Lifecycle Manager to answer hard Systems Engineering questions” blog series

Preamble: Our users have been asking us for more practical examples about how to unleash the power of linked lifecycle data in Rational Engineering Lifecycle Manager (RELM), so we have decided to kick off a blog series on the Jazz Team Blog to answer some of your most pressing questions! We started with our first posting in this series last week, titled “Understand the impact of proposed changes using Rational Engineering Lifecycle Manager“, which is an ideal place to start reading if you haven’t already. This post contains an “under the hood” look at some of the views and queries mentioned previously.

Creating a RELM View: Impact on replacing a physical block

A quick note before we start: This is the first part in a series of articles about creating RELM Views. Even though we chose to write this one as our first article, this View is by far the most complicated one in the list. If you are a beginner when it comes to RELM Views, we suggest you wait to start with our second part of this series which will be published in the coming days.

The goal of this exercise is to create a RELM View showing a physical block, with its links all the way to the test cases, to understand the impact of replacing any such physical part in a system. For additional background information to help you better understand the following exercise, be sure to read “Understand the impact of proposed changes using Rational Engineering Lifecycle Manager“.

Okay, if you are still with me, you are ready to create a View that will tackle one of the most challenging problems in Systems Engineering! What does it take to replace a physical block when I have several software modules, requirements and test cases linked to it both directly and indirectly? We will start with a blank View in RELM and add several containers, one container for each type of element we want to display. We will use the Container – Grid Layout type container, as we want a simple list of nodes as opposed to a collapsible list. For a collapsible list, use Container – Tree Layout. We will change the Number of Columns for the container to 1 so that we get the nodes stacked in a single column as seen in the picture above.

After adding the first container and a text title to the View, it should look like the screen below.

The container requires a query. Here we want to create a query that will give us details of a physical block. Since we do not want to hardcode a physical block in to our query, the parameter capability of RELM Views comes in handy.

Now, here is the query to get details of a Physical Block:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?resource ?title ?shortTitle ?type
WHERE {
	?resource
		a sysml:Block ;
		a ?type ;
		dcterms:title "${PhysicalBlock_Name}" ;
		dcterms:title ?title ;

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )
}

Notice “${PhysicalBlock_Name}” in the query. This will get replaced with the parameter provided to the View.

Add the query to the View and select the query for our container. This should display the physical block in the view. If you hover on the node, you will get the OSLC preview.

Note: In “Understand the impact of proposed changes using Rational Engineering Lifecycle Manager“, we talked about the sample data we are using for these exercises. Needless to say, the output you see here are from the data on our server.

Repeat the same steps to display Logical Blocks in the View. Use the following query:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?resource ?title ?shortTitle ?type
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?blockAlloc .

	?blockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )

}

The view should look like this one now.

Our next goal is to display the links between the nodes. RELM supports several link types out of the box. You can check them out in the Connections section of the Page Properties. If the link types you are looking for are not listed there, RELM allows you to manually specify them. You can do so by providing the predicate for the link type (if the link is represented as a triple) or by using custom queries.

We will be using a custom query here:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?source ?target
WHERE {
	?source
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}";
		sysml:Block-Allocations ?blockAlloc .

	?blockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?target .
}

After adding a Connection using the custom query, the View should look like this

Following this process for the remaining items and their links, you can create the View as seen below. At the bottom of this article I have listed all the queries I used to achieve this View.

Look and Feel

RELM allows you to use different types of nodes and UI types in your view. Basically, with UI type you define the shape you want to display and specify what text to appear where. A Node uses a UI type. Node allows you to specify a condition that determines when the Node will be used in the View.

For example, the Node named ‘Requirement’ in the screen below will be shown when RELM View finds an element with ‘type’ matching rm#Requirement. Note that you can use any property here, so long as your query returns that property. So, for this to work, my query for requirement should also return ‘type’.

You can override many of the settings in the Node that you inherit from the UI Type.

In the screen below, I changed the width and height to 200 and 40 respectively. Then I changed the fill property as seen in the inset. That gives a bluish gradient box for Requirements.

Same way I added new Nodes for the other types in the View to get the final look and feel.

Conclusion

That concludes this exercise of creating a RELM View to show the impact of replacing a physical block. As you saw, the View will take the name of a Physical Block as a parameter and display its linkage through software components, to the requirements, and the test cases.

Ubaidu Peediakkal
Systems and Software Engineering (SSE) Solution Architect

List of queries used in this View

Container/Link Name Query
Physical Block
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?resource ?title ?shortTitle ?type
WHERE {
?resource
		a sysml:Block ;
		a ?type ;
		dcterms:title "${PhysicalBlock_Name}" ;
		dcterms:title ?title ;

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )
}
Logical Block
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?resource ?title ?shortTitle ?type
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )

}
Link between Physical and Logical Blocks
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?source ?target
WHERE {
	?source
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}";
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?target .
}
Operation
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT DISTINCT ?resource ?title ?shortTitle ?type
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?logicalBlock .

	?logicalBlock
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )

	FILTER regex(str(?type), "Operation")

}
Link between Logical Block and Operation
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT ?source ?target
WHERE {
	?source
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?target .

	?target
		a uml:Operation .

}
Activity
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>
PREFIX diagram: <http://jazz.net/ns/dm/diagram#>

SELECT DISTINCT ?resource  ?title ?shortTitle
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?logicalBlock .

	?logicalBlock
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?operation .

	?resource
		a uml:ActivityDiagram ;
		dcterms:title ?title ;
		diagram:diagramElement ?operation .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )

}
Link between Operation and Activity
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>
PREFIX diagram: <http://jazz.net/ns/dm/diagram#>

SELECT DISTINCT ?source ?target
WHERE {
       ?target
		a uml:ActivityDiagram;
		diagram:diagramElement ?source .

       ?source
		a uml:Operation .
}
Usecase
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>
PREFIX diagram: <http://jazz.net/ns/dm/diagram#>

SELECT DISTINCT ?resource  ?title ?shortTitle
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?logicalBlock .

	?logicalBlock
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?operation .

	?activity
		a uml:ActivityDiagram;
		diagram:diagramElement ?operation .

	?activityview
		a uml:UseCase;
		uml:classifier-mainBehavior ?activity ;
		uml:owner ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )
}
Link between Activity and Usecase
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>

SELECT DISTINCT ?source  ?target
WHERE {  

       ?source
		a uml:ActivityDiagram .

       ?activityview
		a uml:UseCase ;
		uml:classifier-mainBehavior ?source ;
		uml:owner ?target ;

}
Requirement
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>
PREFIX diagram: <http://jazz.net/ns/dm/diagram#>
PREFIX linktype: <http://jazz.net/ns/dm/linktypes#>

SELECT DISTINCT ?resource  ?title ?type ?shortTitle
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?logicalBlock .

	?logicalBlock
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?operation .

	?activity
		a uml:ActivityDiagram;
		diagram:diagramElement ?operation .

	?activityview
		a uml:UseCase;
		uml:classifier-mainBehavior ?activity ;
		uml:owner ?usecase.

	?usecase
		linktype:satisfy ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )
}
Link between Usecase and Requirement Uses Satisfy link, which is listed out of the box
Test case
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX uml: <http://jazz.net/ns/dm/rhapsody/uml#>
PREFIX sysml: <http://jazz.net/ns/dm/rhapsody/sysml#>
PREFIX diagram: <http://jazz.net/ns/dm/diagram#>
PREFIX linktype: <http://jazz.net/ns/dm/linktypes#>
PREFIX rm: <http://open-services.net/ns/rm#>

SELECT DISTINCT ?resource  ?title ?type ?shortTitle
WHERE {
	?block
		a sysml:Block ;
		dcterms:title "${PhysicalBlock_Name}" ;
		sysml:Block-Allocations ?BlockAlloc .

	?BlockAlloc
		?predicate1 ?object1 .

	?object1
		uml:dependency-dependsOn ?logicalBlock .

	?logicalBlock
		uml:classifier-operations    ?classOps .

	?classOps
		?predicate2 ?operation .

	?activity
		a uml:ActivityDiagram;
		diagram:diagramElement ?operation .

	?activityview
		a uml:UseCase;
		uml:classifier-mainBehavior ?activity ;
		uml:owner ?usecase.

	?usecase
		linktype:satisfy ?requirement .

	?requirement
		rm:validatedBy ?resource .

	?resource
		dcterms:title ?title ;
		a ?type .

	BIND( SUBSTR(str(?title), 1, 50) AS ?shortTitle )
}
Link between Requirement and Test Case Uses Validated By link, which is listed out of the box
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
1 Comment
  1. Arne Bister August 31, 2013 @ 2:42 am

    That is a great example with reusable actionable content. Thank you!

Sorry, the comment form is closed at this time.