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

Create a copy of an atrifact in a module of another component in DNG

Hello,

I want to make a copy from an existing artifact in module x which is also in Component x1
my module target where I want to copy in in modlu y in the component y1. The global cofiguration for the PA is enabled.
I tried to use the instructions here but it didnt work :(

Since 6.0.6 you can add an existing artifact to a module structure using the module structure API - see https://jazz.net/wiki/bin/view/Main/DNGModuleApiOverview andĀ https://jazz.net/wiki/bin/view/Main/DNGModuleAPI

I hope some one had a similar case and is able to help solving my poblem.
Thanks in advance.

0 votes



One answer

Permanent link

Hi Reem


It sounds like you're using REST APIs and are hoping to do something like reuse an artifact from one component in a module in a different component, is that right?

The module API you mention works within a component, just like how, when working in a browser, in a module you add an existing artifact, i.e. one which is in the same component as the module. But that doesn't allow adding an existing artifact from a different component.

It is possible in the user interface (but not AFAIK using the REST APIs) to clone an artifact from one component to another, and once you've cloned it into the same component as the module then you can insert the existing (cloned) artifact (i.e. from the same component as the module) into the module. But AFAIK this isn't possible using the APIs.


As it says there "Reorganize how artifacts are grouped in your project area by cloning them from one component into another. When you clone an artifact, a new version is added to the stream of the component that you work in."

You need to be careful that any artifact you've cloned isn't in more than one contribution (e.g. in it's origin component and in the component it's cloned into) to a single Global Configuration - this is called skew and must be avoided.

HTH
Ian

0 votes

Comments
Hi Ian,
thank you for your Antwort. I try to use any API (Rest or OSLC) to copy artifacts in different components. It will be fine for me if I create a new artifact and not just a cloned one.
I am able to create a copy and use the structure api to add it to the target module inside one component. My problem is to do the same between 2 components and the GC is enabled also.
Regards.
Reem.

AFAIK cloning isn't possible through the APIs so you can't reuse an artifact from one component in a module in a different component. You will have to code the copying the artifact say it's called ID1 into the component where the module is to create a new artifact ID2 and then create a reuse of ID2 into the module structure.

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
× 7,495
× 1,325

Question asked: Nov 03 '21, 9:45 a.m.

Question was seen: 1,224 times

Last updated: Nov 05 '21, 10:17 a.m.

Confirmation Cancel Confirm