How to get Process Template source
Hi,
id like to get process template source code using client API in order to versioning it.
With process definition catched by Project Area this code work properly:
but if I use the same code on a IProcessDefinition object instead of IProjectArea I get that IProcessDefinitionWorkingCopy returned is null:
The IProcessDefinition object was obtained using findAllProcessDefinitions on IProcessItemService.
Have someone any idea of why it returns a null value?
Thanks,
Michele.
id like to get process template source code using client API in order to versioning it.
With process definition catched by Project Area this code work properly:
IProcessItemService itemClient = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class);
IWorkingCopyManager workingCopyManager = itemClient.getWorkingCopyManager();
[...]
IProjectAreaWorkingCopy projAreaCopy = (IProjectAreaWorkingCopy) workingCopyManager.createPrivateWorkingCopy(projArea);
IDocument doc = projAreaCopy.getProcessSpecification();
String configStr = doc.get();
but if I use the same code on a IProcessDefinition object instead of IProjectArea I get that IProcessDefinitionWorkingCopy returned is null:
IProcessDefinitionWorkingCopy processDefWC = (IProcessDefinitionWorkingCopy)workingCopyManager.getWorkingCopy(processDef);
IDocument doc = processDefWC.getProcessSpecification();
String newProcessConf = doc.get();
The IProcessDefinition object was obtained using findAllProcessDefinitions on IProcessItemService.
Have someone any idea of why it returns a null value?
Thanks,
Michele.