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

Create artifact with RM API in RDNG

 Hello!

I'm trying to create several artifacts as described by next link:


First artifact is created without a problem. But I have a strange message taken from result.message if a second artifact is to be created next in a loop:

At the same time, next message is displayed on Web page:

The artifact cannot be placed at the specified location in the module.hide details
ID CRRRW7756W  While you were working in the module, another user might have changed and saved it. Refresh the module and try again.

Is it possible to create several artifacts with RM API somehow? What is missing by me in this code?
Thank you!

0 votes



One answer

Permanent link
 It seems that next RM.Data.Module.createArtifact must be put into callback of the previous one. I mean that the next construction is wrong:

RM.Data.Module.createArtifact(attrs, strategy, function(result2) {
if (result2.code === RM.OperationResult.OPERATION_OK) {
//...
}
});
RM.Data.Module.createArtifact(attrs, strategy, function(result3) {
if (result3.code === RM.OperationResult.OPERATION_OK) {
//...
}
});

But the next one works:

RM.Data.Module.createArtifact(attrs, strategy, function(result2) {
if (result2.code === RM.OperationResult.OPERATION_OK) {
//...
RM.Data.Module.createArtifact(attrs, strategy, function(result3) {
if (result3.code === RM.OperationResult.OPERATION_OK) {
//...
}
});
}
});

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,930
× 233
× 46
× 27
× 17

Question asked: Mar 25 '19, 2:14 p.m.

Question was seen: 3,236 times

Last updated: Mar 26 '19, 2:30 p.m.

Confirmation Cancel Confirm