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

RM.Data.createLink results in OPERATION_BAD_REQUEST (DNG JS API)

Hello everybody,

i'm trying to link two DNG resources via TypeScript (i.e. DNG JavaScript Api). The following operation results in OPERATION_BAD_REQUEST :

RM
.Data.createLink(this.artifact, RM.Data.LinkTypes.EMBEDS, pickedModule, function(result) {
      console.log("Link-Status: " + result.code + " - " + result.message);
});

this.artifact    : Single resource retrieved by RM.Event.subscribe(RM.Event.ARTIFACT_SELECTED ...)
pickedModule : Module resource retrieved by RM.Client.showArtifactPicker(...)

Both resources exist in within the callback function. Does anyone has an idea, what might be the problem?

Best regards
-- Thomas Noack

0 votes



One answer

Permanent link
The function works as expected, at least with RNDG 5.0.1. Without further details, it's hard to say what problem you were facing. I would guess either of the two artifacts in the function call is invalid (undefined or something).

To determine, examine the /rm/links POST request payload using a network tracing tool such as Firebug or the Chrome built-in tool. You should see the "subject", "object" and "predicate" well defined. Or you can set a break point at the code where the "createLink" function is and check whether "this.artifact" and "pickedModule" are valid (of the type RM.ArtifactRef) at run time.

1 vote

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

Question asked: Mar 28 '15, 12:52 p.m.

Question was seen: 4,132 times

Last updated: Apr 03 '15, 5:07 a.m.

Confirmation Cancel Confirm