Exception on saving userproperty on Versionable in operationParticipant
![]()
Hi
I want to save a string on a file/folder on delivery, implemented in an operationparticipant. My code is quite simple:
On the saveoperation, I get an exception:
I have suspect the componentid on the extensionservice is causing the failure. It is set to componentId="com.ibm.team.repository.service". But if it is wrong, I don't know a better value (I've tried several).
...and by the way: I plan to use the userproperty, assuming it is ment for users to set in customization. Is that true or am I abusing something?
Regards
Erling
|
Accepted answer
![]()
Just a followup to say this was implemented in RTC 5.0.2. Here's a link to more information:
https://jazz.net/downloads/rational-team-concert/releases/5.0.2?p=news
Ralph Schoon selected this answer as the correct answer
|
3 other answers
![]()
Versionables can only be saved via a commit operation. See IScmService#batchCommit. I am not sure If properties behave as you would like. They are baked Into the version.
|
![]()
Geoffrey Clemm (30.1k●3●30●35)
| answered Aug 07 '12, 11:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As John says, currently, a version property is part of the state of a version, and cannot be modified once that version is created by the checkin operation. I've created work item 220897, requesting support for modifiable version properties ( https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/220897 ).
|
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.
Comments
Hi Erling, I am not sure about the context of the operation. There are several things that can prevent this from working.
One is the service. There is an IScmService and I am not sure the IRepositoryItemService can do the save you want.
I searched the SDK for setUserProperty() as a method and there are several ways of how it is used, also containing save operations, which are usually done on an IWorkspaceConnection using the IWorkspaceConnection.configurationOpFactory().save(). I assume the call you are doing is not allowed in the context.