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

Jazz Server blocked after programmatically workitem saving

Hi, I have a problem with a server follow-up action (IOperationParticipant).

I'm trying to save a WI change during a state transition (Verified -> Approved)

if (StateChecker.isTransitioning(auditableCommon, saveParameter, CW.getStateId(CW.VERSION_VERIFIED_STATE), CW.getStateId(CW.VERSION_APPROVED_STATE), monitor)) {

IWorkItem workItemFreshCopy = getFreshCopy(workItem, monitor);
IWorkItem workingCopy = (IWorkItem) workItemFreshCopy.getWorkingCopy();
IAttribute versionRevision = getWorkItemCommon().findAttribute(workItemFreshCopy.getProjectArea(), WorkItemAttributes.VERSION_REVISION.getStringIdentifier(), monitor);
Pattern pattern = Pattern.compile("([A-Z]+) draft");
Matcher matcher = pattern.matcher((String)workItemFreshCopy.getValue(versionRevision));
if(matcher.find()) {
if(matcher.groupCount() > 0) {
String actualVersion = null;

actualVersion = matcher.group(1);

workingCopy.setValue(versionRevision, new String(actualVersion));
IStatus s = getWorkItemService().saveWorkItem2(workingCopy, null, null);
if (!s.isOK())
throw new TeamRepositoryException("Errore nel salvataggio. " + s.getMessage());
}
}

private IWorkItem getFreshCopy(IWorkItem workItem, IProgressMonitor monitor) throws TeamRepositoryException {

return getWorkItemService().findWorkItemById(workItem.getId(), IWorkItem.FULL_PROFILE, monitor);
}


The problem is, when I'm calling saveWorkItem2 method, server appear to be blocked (not responding). This sounded strange because if I perform same operation in a different transition, all works fine.

This drives me crazy. Please... can you help me?

0 votes



One answer

Permanent link
I've resolved this particular situation deleting state from process and recreating it.

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

Question asked: Mar 09 '10, 6:59 a.m.

Question was seen: 5,082 times

Last updated: Mar 09 '10, 6:59 a.m.

Confirmation Cancel Confirm