How to set Planned For and Category for template initialized via RTC Java API and instantiateTemplate method
Hi,
I was able to create instance of work item template using RTC Java plain APi.
Map<IAttributeVariable, Object> arg1 = new HashMap<IAttributeVariable, Object>();But I have problem with setting up Planned For and Category before creating instance of the template.
Map<String, String> arg2 = new HashMap<String, String>();
service.instantiateTemplate(handle, arg1, arg2, monitor);
I know how to access attribute handle using findAttribute menthod but it is returns IAttribute type, not IAttributeVariable that is required by instantiateTemplate.
Any ideas how to conver IAttribute to IAttributeVariable or how exactly I should specify Planned For or Category before instanciating template ?
Accepted answer
That solved the issue
IAttributeVariable categoryAttribute = new AttributeVariable(ITemplateAttributeIdentifiers.WORKITEM_CATEGORY, ITemplateTypeIdentifiers.CATEGORY);
IAttributeVariable iterationAttribute = new AttributeVariable(ITemplateAttributeIdentifiers.WORKITEM_ITERATION, ITemplateTypeIdentifiers.ITERATION);
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 17 '17, 10:47 a.m.Bartosz Chrabski
May 17 '17, 2:31 p.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 17 '17, 2:49 p.m.Bartosz Chrabski
May 17 '17, 3:06 p.m.