How do I programmatically get the UUID for an IApproval object?
Accepted answer
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.
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.
Comments
kanjbala jawahar
Sep 16 '13, 2:27 p.m.Yes, I did look at https://jazz.net/library/article/1118 with no answers.