Plugin Running twice while saving link [Tracks Requirement].
Hello Everyone,
We have created a follow-up operation that will extract the data of a few attributes from RTC[5.0.2] and create a module in DOORS[9.6] via OLSC.
It is observed that after every restart of any of the servers (ccm or DWA) when ever the plugin runs for the first time there is dwa window popup that asks the user to authenticate.
After successful authentication the plugin is rerun and another duplicate module object is created and this object link is added to the Tracks requirement Link of RTC, whereas the original module object which was created is not linked to RTC which is causing duplication in the doors system.
public void createLinkToRequirement(IWorkItem currentWI, String doorsLocation, IProgressMonitor monitor) throws TeamRepositoryException {
IWorkItemReferences currentWorkItemReferences = workItemServer.resolveWorkItemReferences(currentWI, null);
ILinkType parentChildLinkType = ILinkTypeRegistry.INSTANCE.getLinkType(WorkItemLinkTypes.TRACKS_REQUIREMENT);
URI uri = URI.create(location);
currentWorkItemReferences.add(parentChildLinkType.getTargetEndPointDescriptor(), IReferenceFactory.INSTANCE.createReferenceFromURI(uri));
Set<String> additionalParams = new HashSet<String>();
additionalParams.add(IExtensionsDefinitions.UPDATE_PARENT_SUMMARY_EXTENSION_ID);
additionalParams.add(IAdditionalSaveParameters.UPDATE_BACKLINKS);
IStatus saveStatus = workItemServer.saveWorkItem3((IWorkItem)currentWI.getWorkingCopy(), currentWorkItemReferences, null, additionalParams);
if (saveStatus.isOK()) {
getLog().info(currentWI.getId()+": Link to doors complete"+location);
}
}
On a sumary
1. workitem saved by the user
2. a new object in DOORS is created by the followup operation (say o1)
3. then the createLinkToRequirement to requirement function is called which in turn calles the saveworkitem3 method
4. if this plugin is running to the first time after a server restart (ccm or dwa) a DWA login popup appears
5. the user logs in succesfully into DWA.
6. Insted of saving o1 as the requirement link the plugin is rerun and another object o2 is created and linked to the workitem
I am encountering this issue only for the first time when the plugin runs after a server restart, else the behavior is as expected from the 2nd run.
can anyone help me out on this?? what is the cause of this problem
Thanks in Advance.
Abhishek
|
Be the first one to answer this question!
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
I'm not fully understanding this. Is it a timing thing? e.g. user has dwa-sessionA and creates o1. That session becomes invalid due to a restart and she has to login again, gets dwa-sessionB - and now doesn't know anything that went on in dwa-sessionA?
But are you getting asking to login to DWA twice?
Only for the fist time the user is asked to login. then until the DWA or the CCM server is shut down i am not encountering this behaviour.
Only for the fist time the user is asked to login. then until the DWA or the CCM server is shut down i am not encountering this behaviour.