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

RTC API usage. Can't find attachments in a child project area with unconfigured process template

A java program update the state of a work item created in a child project area (unconfigured process) which reuse the process template of a root project area  (RTC 4.0 scrum process template).  It works on the root project area.  It is a custom workitem type.

Error: SEVERE: Error while retrieving image: processattachment:/workflow/transfer.gif
Throwable occurred: com.ibm.team.repository.common.ItemNotFoundException: CRRTC0317E: Could not find ProcessAttachment for path: _0PQbsAe1EeKiHO3ea305vg/workflow/transfer.gif
    at com.ibm.team.workitem.service.internal.ImageContentService.findProcessAttachment(ImageContentService.java:156)

Program which does not work:
    private static String changeStatus(ITeamRepository repo, Integer workItemId,
            Boolean buildStatus, String actionOK, String actionKO, IProgressMonitor monitor)
            throws TeamRepositoryException {

        IWorkItemClient client = (IWorkItemClient) repo
                .getClientLibrary(IWorkItemClient.class);
        IWorkItemWorkingCopyManager copyManager = client
                .getWorkItemWorkingCopyManager();
        IWorkItem wi = client.findWorkItemById(workItemId,
                IWorkItem.FULL_PROFILE, monitor);
        if (null == wi) {
            return ("work item " + workItemId + " cannot be found");
        }
        IDetailedStatus status = null;
        String actionName = buildStatus ? actionOK : actionKO;
        try {
            copyManager.connect(wi, IWorkItem.FULL_PROFILE, monitor);
            WorkItemWorkingCopy wc = copyManager.getWorkingCopy(wi);
            IWorkflowInfo wfInfo = client.findWorkflowInfo(wi, monitor);
            Identifier<IWorkflowAction>[] actionList = wfInfo.getActionIds(wi
                    .getState2());
            String actionId = null;
            for (int i = 0; i < actionList.length; i++) {
                Identifier<IWorkflowAction> action = actionList[i];
                String name = wfInfo.getActionName(action);
                if (name != null) {
                    if (name.equals(actionName)) {
                        actionId = action.getStringIdentifier();
                        break;
                    }
                }
            }
            if (null == actionId) {
                return "Action not found: " + actionName;
            }
            wc.setWorkflowAction(actionId);
            status = wc.save(monitor);
            if (status.getCode() != org.eclipse.core.runtime.IStatus.OK) {
                return "Error: " + status.getDetails();
            }
        } catch (Exception e) {
            return "Unexpected error: " + e.getMessage();
        } finally {
            copyManager.disconnect(wi);
        }
        return null;
    }

Any help would be greatly appreciated.

Thanks

0 votes



4 answers

Permanent link
Jean-Claude,

As you found out that it only happens with translated custom processes and work with the built in ones, I would suggest to create a work item or PMR.


0 votes


Permanent link
A defect has been created on september 26 (ID - 233646).  Thanks.

0 votes


Permanent link
Jean-Claude,

Has the defect been addressed?  What is the defect number?

Is there a work around for this issue?

0 votes


Permanent link
Hell Scott,

   It was few months ago, but from what I remember depending on the languages settings defined in your Eclipse/RTC process template customization environment, you don't have exactly the same process template attachments.  The plug in was developed in a given environment with some language settings but tested in another environment with different languages settings.   Copying the attachments from one environment to the other has solved the problem.

       Thanks,

          Jean-Claude

0 votes

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,943

Question asked: Sep 26 '12, 6:43 a.m.

Question was seen: 6,423 times

Last updated: Mar 29 '13, 7:47 a.m.

Confirmation Cancel Confirm