It's all about the answers!

Ask a question

How do I programmatically get the UUID for an IApproval object?


kanjbala jawahar (601815) | asked Sep 16 '13, 2:26 p.m.
retagged Sep 16 '13, 6:58 p.m. by Chris Goldthorpe (4287)
I have the IApproval object(s). But I don't see any way of of doing the following:
<somehandle>.getItemId().getUuidValue()

So how do I get hold of the item handle and/or the UUID of an IApproval object?

Comments
kanjbala jawahar commented Sep 16 '13, 2:27 p.m.

Yes, I did look at https://jazz.net/library/article/1118 with no answers.

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Sep 17 '13, 2:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
An IApproval does not seem to have a UUID. This is probably because it does not need to be identifiable in the repo,it just lives inside the work item in the approvals collection. What do you want to do that requires the UUID?

These posts: https://rsjazz.wordpress.com/2012/10/01/adding-approvals-to-work-items-using-the-plain-java-client-libraries/ and https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ show how you work with approvals API on client and server.
kanjbala jawahar selected this answer as the correct answer

Comments
kanjbala jawahar commented Sep 17 '13, 11:09 a.m.

Thanks for the reply Ralph.

We are extending the SCM CLI for Websphere (tWAS) RTC migration.
We need to be able to take actions on individual approval records.
I need to be able to say,
--approve the review record with this UUID.
I also need to be able to pass that UUID around among different invocations.
Just as with change sets, work items, contributors etc.


2
Ralph Schoon commented Sep 17 '13, 11:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Sorry, if you look at the interfaces of these things, there is no UUID. They live within the workitem and the work item is the only entry point. If you have retrieved the objects, you can pass around these objects, but as far as I can tell, you can not pass UUID's for approvals or approval descriptors, because they just don't have a UUID, at least it does not surface anywhere. The Interfaces don't specify an access method, nor do the implementations. And the approvals don't imlement any other interface that I can see. Unless they are otherwise castable or adaptable I don't think you can get that.

And the UUID won't necessary help, because there might be no way to look up the object and then find out what work item it is bound to.

 So whatever you do, you have to take action on the work item and look up the enclosed approvals.


kanjbala jawahar commented Sep 17 '13, 4:48 p.m.

Thanks Ralph.
Just curious as to why this particular route was decided upon for approvals. Almost all other artifacts that I have come across have some way of getting the item id and/or uuid.

I am able to work on the approvals via work item, as you suggest.
So that will have to be good enough for us.

Thanks again.

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.