How can I Use IWorkItemTemplateService.instantiateTemplate()
Hi Friends,
I would like to know how to use the method IWorkItemTemplateService.instantiateTemplate, to create work Items using a work item template.
What should I pass in the argument String[] arg1 ?
Thank you for helping.
One answer
I would suggest to familiarize yourself with how to search in the RTC SDK. See https://rsjazz.wordpress.com/2019/05/16/searching-and-exploring-the-rtc-sdk/ for how to get started. Once you have set up a development environment with the RTC SDK, you can search for Java types, methods etc.
The second parameter is for parameters and values. Here an example I found:
public int[] instantiateTemplate(final IWorkItemTemplateHandle handle, final Map<iattributevariable, object=""> variables, final Map<string, string=""> parameters, IProgressMonitor monitor) throws TeamRepositoryException { assertValidHandle(handle); Assert.isNotNull(variables);ServiceRunnable<int[]> runnable= new ServiceRunnable<int[]>() { @Override public int[] run() throws TeamRepositoryException { return getService().instantiateTemplate(handle.getId(), WorkItemTemplateSerializable.serializeVariableAndParameterValues(variables, parameters), handle.getProjectArea()); } }; return fContext.callCancelableService(runnable, monitor); }
</int[]></int[]></string,></iattributevariable,>