It's all about the answers!

Ask a question

Issues while creating OSLC link from CCM to AM.


Madhusudhan Acharya (134) | asked Jan 05, 8:41 a.m.

 Hello there,


We are trying to create a OSLC link from a workitem in CCM to a model element in AM in Global configuration context.
When we create the link manually it works fine. so we know that the global configuration is setup correctly.
However, when we try to do the same using EWM APIs it doesn't work as expected.
We can see the link in workitem(CCM). But the link is not visible in the model element(AM).

Any suggestions?

Below is the code:


private static void createLinkFromCCMToAM(IWorkItem workitem, String rmmTargetUrl) {
ILinkManager linkManager = (ILinkManager) teamRepository.getClientLibrary(ILinkManager.class);
URI targetURI = URI.create(rmmTargetUrl);
IReference sourceRef = WorkItemLinkTypes.createWorkItemReference(workitem);
IReference targetRef = IReferenceFactory.INSTANCE.createReferenceFromURI(targetURI);
ILink link = linkManager.createLink(WorkItemLinkTypes.ELABORATED_BY, sourceRef, targetRef);
linkManager.saveLink(link, monitor);
}

One answer



permanent link
Ralph Schoon (63.3k33646) | answered Jan 05, 9:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 05, 9:34 a.m.

 The plain Java Client Libraries, by default for CLM links between applications, only create one link and not the back link. In order to get the back link created you might need to provide an advanced property. The code above also lacks the wrapping work item save operation. You can not just create the link. You have to save the work item change with the additional reference added and likely add the advanced property for the backlink.


Your answer


Register or 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.