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

RM.Data.deleteLink : some links are not deleted

We have RM 7.0.2 - iFix026.

We have 2 modules, in distinct components, with requirements, in the same global configuration :
  • Module A, with requirements A1, A2 ...
  • Module B, with requirements B1, B2 ...
We create somme satisfaction Links between requirements from A --> B ("Satisfies" links, for example) :
  • A1 --> B1
  • A2 --> B1
  • A3 --> B1
The result is : B1 is "Satisfied by" 3 requirements (A1, A2 and A3).

We create a widget to delete links between artifacts, and we use the "RM.Data.deleteLink" API method.

We open Module B and run the widget.

The "RM.Data.deleteLink" has a "strange" behavior :
  • A2/B1 and A3/B1 links are deleted well
  • but A1/B1 is not deleted (response.code=OPERATION_FAILED) ...
We run again the widget, but the link A1/B1 can not be deleted ...

Why this behavior ?

Regards.

0 votes

Comments
Hi Jean,

I strongly suggest checking permissions because we have used RM.Data.deleteLink some projects and problem with deletion was almost always related to permissions. You can display the problem by displaying detailed status message that is returned my RM.Data.deleteLink.



One answer

Permanent link
I have found, as well as the permissions issue mentioned above, that you need to delete the link in the correct context. If you have a mix of links created in module context and artefact context, then you'll need to do two delete calls - one for each context.

It could be that A1-> B1 is done directly to the B1 artefact, while the other two are done to the B1 artefact in the module's context

0 votes

Comments
For the moment, I'm doing my development in a "JazzAdmin" context, so permissions are not the biggest constraints. I first want to make sure that the logic of how the widget works is correct.

Indeed, I am looking to correct certain links created directly on the artifact, outside the context of the module. And specifically, the links I'm looking to remove are those created directly on the artifact.

But the widget I'm developing only seeks to remove links created outside of a module context :

1/ The widget detects “malformed” links
2/ Then must first delete them one after the other
3/ Currently, the first link is deleted, but not the others, which generate an error

My major problem therefore remains to understand why such behavior?

Regards

In addition, I realize that an "Base Artifact" does not have the same URI as an "Module Artifact" and that changes a lot of things...

So I have to modify the logic of my Widget


Yes, that's what I meant in my answer above - you need to look at the context of the link and perform the delete in the correct context.

The API documentation shows how you can detect the context:

Your answer

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,927

Question asked: Dec 12 '23, 2:15 a.m.

Question was seen: 886 times

Last updated: Feb 14, 1:09 a.m.

Confirmation Cancel Confirm