Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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:


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.

1

1 vote



2 answers

Permanent link
use workingCopyManager.createPrivateWorkingCopy and not GetWorkingCopy :D

1 vote


Permanent link
use workingCopyManager.createPrivateWorkingCopy and not GetWorkingCopy :D


Thanks for the answer. I've already tried it and it works.

Best regards,
Michele.

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,953

Question asked: Jan 26 '11, 6:07 a.m.

Question was seen: 5,088 times

Last updated: Jan 26 '11, 6:07 a.m.

Confirmation Cancel Confirm