Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Link creation from RQM to RM is not creating backlink from RM in a Global Configuration project using OSLC API .

Link creation from RQM to RM is not creating backlink from RM in a Global Configuration project using OSLC API . The snippet was working as expected 2 weeks back. The snippet used is below: Can you please support us.
jar used : oslc-java-client.2.3.0


        ClientResponse rqmResponse = null;
        boolean flag = false;
        try {
            TestCase testCaseofID = getTestCaseForGC(testcaseID);
            String testCaseURI = testcaseID;
            Link newLink = new Link(new URI(artifactURI));

            Link[] validateRequriement = testCaseofID.getValidatesRequirements();
            if (!Arrays.asList(validateRequriement).contains(artifactURI)) {
                Link[] allValidatesLink = new Link[validateRequriement.length + 1];
                int i = 0;
                for (Link dngLink : validateRequriement) {
                    allValidatesLink[i++] = dngLink;
                }
                allValidatesLink[i] = newLink;
                testCaseofID.setValidatesRequirements(allValidatesLink);
                // Updating test case
                rqmResponse = client.updateResource(testCaseURI, testCaseofID, OslcMediaType.APPLICATION_RDF_XML);

                if (rqmResponse.getStatusCode() == 200) {

                    logger.info("Successfully added requirement link for " + testcaseID);
                    flag = true;

                }
            } else {
                logger.info("Testcase : " + testcaseID + " is linked to artifact " + artifactURI);
                
                flag = true;
            }
        } catch (NullPointerException e) {

            logger.error("Error Occured in creating requirement link! Please check. Status Code : "
                    + rqmResponse.getStatusCode() + " : " + e.getMessage());
            flag = false;

        } catch (Exception e) {

            logger.error("Error Occured in creating requirement link! Please check. Status Code : "
                    + rqmResponse.getStatusCode() + " : " + e.getMessage());
            flag = false;
        } finally {
            rqmResponse.consumeContent();
        }

        return flag;

   

0 votes

Comments

 Backlinks aren't created when configuration management is enabled.

Hello Barnard, is there a way to create backlink from DNG in gc?

No - backlinks are intentionally not created/used. When you create the forward link the browser UI will show you a "backlink" but that is dynamically calculated for presentation/usage purposes rather than (as before configuration management was enabled) being actually stored as an actual backlink.


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 15 '21, 5:49 a.m.

Question was seen: 1,102 times

Last updated: Sep 21 '21, 3:41 a.m.

Confirmation Cancel Confirm