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

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

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?

0 votes

Comments

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


Accepted answer

Permanent link
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

1 vote

Comments

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.

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.

2 votes

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 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,927
× 368

Question asked: Sep 16 '13, 2:26 p.m.

Question was seen: 4,756 times

Last updated: Sep 17 '13, 4:48 p.m.

Confirmation Cancel Confirm