It's all about the answers!

Ask a question

Issue in getting updated Work item in Plugin 2 saved in Plugin 1?

Asha Faldu (1110) | asked Dec 20 '16, 8:12 a.m.
Can anyone help us with how to get an updated copy of work item in plugin 2 considering a scenario as plugin 1 is updating the work item and plugin 2 need to access the updates done by plugin 1 in work item.  

we are using getWorkingCopy() method to get the fresh copy of workitem in the plugin. 

One answer

permanent link
Ralph Schoon (63.2k33646) | answered Jan 05 '17, 4:38 a.m.
The extensions are automatically called by the framework and there are only limited capabilities to communicate between the plugins. It is also important to understand that a save in a follow up action will cause a new save event and a subsequent call of all related pre conditions and follow up actions (process advisors and - participants).

The easiest way to pass information is to use additional save parameter - basically a string - during work item save. The parameter will be available to the subsequently called process advisors and - participants. This can be used for the abve purpose and to prevent recursive descent as well. See

	Set additionalParams = new HashSet();

	fWorkItemServer.saveWorkItem3(newWorkItem, null, null, additionalParams);
	return newWorkItem;

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.