It's all about the answers!

Ask a question

How can I Use IWorkItemTemplateService.instantiateTemplate()

Peterson dos Santos (3926) | asked Sep 05 '19, 10:43 a.m.
Hi Friends,

I would like to know how to use the method IWorkItemTemplateService.instantiateTemplate, to create work Items  using a work item template.

templateService.instantiateTemplate(String arg0, String[] arg1, IProjectAreaHandle arg2)

What should I pass in the argument String[] arg1 ?

Thank you for helping.

One answer

permanent link
Ralph Schoon (62.7k33643) | answered Sep 18 '19, 1:48 a.m.

 I would suggest to familiarize yourself with how to search in the RTC SDK. See 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 {

    ServiceRunnable<int[]> runnable= new ServiceRunnable<int[]>() {
        public int[] run() throws TeamRepositoryException {
            return getService().instantiateTemplate(handle.getId(), WorkItemTemplateSerializable.serializeVariableAndParameterValues(variables, parameters), handle.getProjectArea());
    return fContext.callCancelableService(runnable, monitor);


Your answer

Register or to post your answer.