It's all about the answers!

Ask a question

Use Java API to delete pending asset


James Thario (1153) | asked Feb 09 '11, 8:15 p.m.
Hi,

I am trying to use the API to delete a pending asset. My simplified code is:

RAMAsset pending = session.getAsset(new AssetIdentification(guid, version, true));
asset.setAction(RAMAction.DELETE);
session.put(asset, new NullProgressMonitor());

I consistently receive an exception even though I am an administrator of the community. I have tried this with several pending assets.

com.ibm.ram.common.data.exception.RAMRuntimeException: You are not authorized to delete asset "XYZ"

I can pull up the web UI and delete the pending asset without a problem.

What is the right way to do this through the API? This is a 7.2.0.2 system.

Thanks in advance!

4 answers



permanent link
Rich Kulp (3.6k38) | answered Feb 10 '11, 10:08 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

This looks like a bug. It appears that for a delete asset the client
code is ignoring the "pending" status and is trying to delete the main
asset, which is locked.

Could you please open a defect for this?

--
Rich Kulp
Rational Asset Manager developer

permanent link
Kevin Bauer (34621) | answered Feb 10 '11, 10:18 a.m.
JAZZ DEVELOPER
I have opened defect 45187 to track.

https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/45187


Hi,

I am trying to use the API to delete a pending asset. My simplified code is:

RAMAsset pending = session.getAsset(new AssetIdentification(guid, version, true));
asset.setAction(RAMAction.DELETE);
session.put(asset, new NullProgressMonitor());

I consistently receive an exception even though I am an administrator of the community. I have tried this with several pending assets.

com.ibm.ram.common.data.exception.RAMRuntimeException: You are not authorized to delete asset "XYZ"

I can pull up the web UI and delete the pending asset without a problem.

What is the right way to do this through the API? This is a 7.2.0.2 system.

Thanks in advance!

permanent link
James Thario (1153) | answered Feb 11 '11, 1:14 p.m.
Hi,

Is there a convention to specify a pending asset in the REST API as a workaround for now?

Thanks,
Jim

permanent link
Dmitry Kirillin (1111) | answered Feb 28 '11, 9:07 p.m.
hi folks,
I created a custom workflow in RTC client following the Infocenter instruction.

The workflow looks pretty similar to the one provided OOTB. When I saved it and restarted the RAM server the workflow didn't show up among other workflows available for the Community.

I verified the workflow ID and binding.

Is there any way to troubleshoot this? What's missing?

FYI. My RAM version is 7.5.0.1


Thanks in advance.

Dmitry

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.