It's all about the answers!

Ask a question

Saving a work item working copy withIRepositoryItemService


Billy Cope (651) | asked Nov 05 '08, 9:24 a.m.
I am working on a follow-up condition that attempts to update the child work item states to the same state of a parent (Modify and save a workitem in a follow-up condition code extension).

The code successfully retrieves the parent work item state and each child work item linked to the parent. For each child work item, the code successfully gets a working copy and the child state is updated to the same as the parent state.

After the child state is updated in the working copy, the IRepositoryItemService is used to save the working copy. The following exception is thrown and the save is unsuccessful:

com.ibm.team.process.common - Access violation in component item service. Service component: jazz.service.example.extensionService1, Model component: com.ibm.team.workitem, Item type: com.ibm.team.workitem#WorkItem
com.ibm.team.repository.common.InternalRepositoryException: Access violation in component item service.

My current understanding of the Jazz / RTC architecture, the follow-up code is not allowed to update items via the IRepositoryItem Service that my follow-up component did not create. Is there an API that is exposed to allow me to save these child work items via the follow-up code module? If so, please provide a code snippet.

One answer



permanent link
Jared Burns (4.5k29) | answered Nov 05 '08, 12:18 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You have to use the work item service to save work items.

When a component (Work Item, SCM, Build, etc.) defines an item, they
also provide a service which allows you to save those items. Only this
service can use the repository item service to save the item to the repo.

Jared Burns
Jazz Process Team


bcope wrote:
I am working on a follow-up condition that attempts to update the
child work item states to the same state of a parent (Modify and save
a workitem in a follow-up condition code extension).

The code successfully retrieves the parent work item state and each
child work item linked to the parent. For each child work item, the
code successfully gets a working copy and the child state is updated
to the same as the parent state.

After the child state is updated in the working copy, the
IRepositoryItemService is used to save the working copy. The
following exception is thrown and the save is unsuccessful:

com.ibm.team.process.common - Access violation in component item
service. Service component: jazz.service.example.extensionService1,
Model component: com.ibm.team.workitem, Item type:
com.ibm.team.workitem#WorkItem
com.ibm.team.repository.common.InternalRepositoryException: Access
violation in component item service.

My current understanding of the Jazz / RTC architecture, the follow-up
code is not allowed to update items via the IRepositoryItem Service
that my follow-up component did not create. Is there an API that is
exposed to allow me to save these child work items via the follow-up
code module? If so, please provide a code snippet.

Comments
Nate Decker commented Apr 24 '15, 1:51 p.m.

What is the service associated with ITimeSheetEntry objects?

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.