Reporting on link validity status in CLM projects

This topic applies only to the Requirements Management (RM) and Quality Management (QM) applications. You can report on link validity status by adding SPARQL content to the query that you build by using Report Builder. For example, you might generate a report to show the links with a validity status of Invalid so you know which artifacts to examine, and possibly change, to restore validity.

Before you begin

  • Ensure that you are familiar with the concepts and examples described in Link validity, especially the meaning of upstream and downstream artifacts in the context of link validity.
  • Know how to write SPARQL queries.
  • To display information about the artifact on either end of the link, you must have access to the project area that contains the artifact. Otherwise, your report will contain only the artifact's URI.
  • You must have permission to read data in the JTS Link Validity Resources (TRS 2.0) data group. If your report does not return link validity information, ask an application or project administrator to assign this permission to you.

About this task

Link validity is the status shown on links between artifacts to indicate whether the contents of two artifacts meet the intended meaning of their link.

This procedure applies to the RM and QM applications.

To report on the link validity status for linked artifacts from other Rational® solution for Collaborative Lifecycle Management (CLM) applications, you can create reports by using IBM® Rational Publishing Engine. For details, see Creating document-style reports.

Procedure

  1. In Report Builder, build a report about the artifacts and configurations you want to report on.
  2. After you save your report, on the Format page, in the Advanced section, edit the SPARQL query.
    • Add an ns_validity_ prefix to the query. Example:
      PREFIX ns_validity_: <http://jazz.net/ns/validity#>

Example

The following custom query shows how you might use SPARQL to report on link validity. This query shows the links between requirements in modules and test cases, and the validity status of those links.

You can build your own query in the guided Report Builder interface to identify the requirements that have links to test cases within a specific project scope. Then, you can edit the query in the Advanced section of Report Builder and add the statements about link validity.
Note: This custom query is an example and might not work in your environment. IBM does not provide support for custom queries or edited existing queries.
PREFIX oslc_rm: <http://open-services.net/ns/rm#>
PREFIX merge: <http://jazz.net/ns/lqe/merge/>
PREFIX oslc: <http://open-services.net/ns/core#>
PREFIX rqm_merged: <http://jazz.net/ns/lqe/merge/gensym/qm/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX oslc_config: <http://open-services.net/ns/config#>
PREFIX process: <http://jazz.net/ns/process#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX oslc_qm: <http://open-services.net/ns/qm#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ns_validity_: <http://jazz.net/ns/validity#>

SELECT DISTINCT
  ?oslc_rm_Requirement1_identifier
  ?oslc_rm_Requirement1_title
  ?oslc_rm_Requirement1
  ?rqm_merged_QMTestCase1_shortId
  ?rqm_merged_QMTestCase1_title
  ?rqm_merged_QMTestCase1
  ?validity_status
WHERE{
  VALUES( ?oslc_rm_Requirement1_paUri )
  {
    ( <https://SERVER:9443/rm/process/project-areas/RMPROJECT> )
  }
  VALUES( ?rqm_merged_QMTestCase1_paUri )
  {
    ( <https://SERVER:9443/qm/process/project-areas/QMPROJECT> )
  }
  ?oslc_rm_Requirement1_uri process:projectArea ?oslc_rm_Requirement1_paUri.
  {
    ?oslc_rm_Requirement1_uri oslc_rm:validatedBy ?rqm_merged_QMTestCase1_uri.
  } UNION {
    ?rqm_merged_QMTestCase1_uri oslc_qm:validatesRequirement ?oslc_rm_Requirement1_uri.
  }
  ?oslc_rm_Requirement1_uri rdf:type oslc_rm:Requirement.
  ?oslc_rm_Requirement1_uri dcterms:title ?oslc_rm_Requirement1_title.
  OPTIONAL {
    ?oslc_rm_Requirement1_uri dcterms:identifier ?oslc_rm_Requirement1_identifier.
  }
  OPTIONAL {?oslc_rm_Requirement1_ver dcterms:isVersionOf ?oslc_rm_Requirement1_uri; rdf:type oslc_config:VersionResource.}
  ?rqm_merged_QMTestCase1_uri process:projectArea ?rqm_merged_QMTestCase1_paUri.
  ?rqm_merged_QMTestCase1_uri oslc:instanceShape ?rqm_merged_QMTestCase1_uri_instanceShape.
  ?rqm_merged_QMTestCase1_uri_instanceShape merge:mergeShape rqm_merged:QM%20Test%20Case.
  ?rqm_merged_QMTestCase1_uri dcterms:title ?rqm_merged_QMTestCase1_title.
  OPTIONAL {
    ?rqm_merged_QMTestCase1_uri oslc:shortId ?rqm_merged_QMTestCase1_shortId.
  }
  OPTIONAL {?rqm_merged_QMTestCase1_ver dcterms:isVersionOf ?rqm_merged_QMTestCase1_uri; rdf:type oslc_config:VersionResource.}
  BIND( IF (bound(?oslc_rm_Requirement1_ver), concat(str(?oslc_rm_Requirement1_uri), "?oslc_config.context="), ?oslc_rm_Requirement1_uri) as ?oslc_rm_Requirement1)
  BIND( IF (bound(?rqm_merged_QMTestCase1_ver), concat(str(?rqm_merged_QMTestCase1_uri), "?oslc_config.context="), ?rqm_merged_QMTestCase1_uri) as ?rqm_merged_QMTestCase1)
 

BIND( IF (CONTAINS(?oslc_rm_Requirement1_ver, "/core/"), IRI(strbefore(str(?oslc_rm_Requirement1_ver), "/core/")), ?oslc_rm_Requirement1_ver) as ?oslc_rm_Requirement1_validityVer)

  OPTIONAL {
  ?rqm_merged_QMTestCase1_ver <http://jazz.net/ns/validity#contentHash> ?sourceHash .
  ?oslc_rm_Requirement1_validityVer <http://jazz.net/ns/validity#contentHash> ?targetHash .
  ?ns_validity__ValidityLink1_uri <http://jazz.net/ns/validity#validateSourceHash> ?sourceHash .
  ?ns_validity__ValidityLink1_uri <http://jazz.net/ns/validity#validateTargetHash> ?targetHash .
?ns_validity__ValidityLink1_uri <http://jazz.net/ns/validity#status> ?status_enum .
  }
  BIND (IF (!bound(?status_enum), "Suspect", ?status_enum) as ?validity_status)

}

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki