Initializing a project and process specification
Our team is building a point product on top of the Jazz framework and have a desire to initialize a project with some process customizations out of the box. Is there an established convention to programatically create a project and inject our process specification (for instance: a role specification, workitem type, etc)?
Ultimately the product will integrate with other products on the Jazz platform so shipping with a custom repository is not really an option. The product intends to hide many of the Jazz complexities so we will not ask users to create a project initialized from a template. The framework should be mostly transparent to the vast majority of users.
Thanks for the help!
Ultimately the product will integrate with other products on the Jazz platform so shipping with a custom repository is not really an option. The product intends to hide many of the Jazz complexities so we will not ask users to create a project initialized from a template. The framework should be mostly transparent to the vast majority of users.
Thanks for the help!
One answer
You can create project areas programatically and you can change the
process specification of a project area programatically. You would do
this by using the IProcessItemService. See below. We currently require a
process template ('process definition' in the code) to be set in the
project area. There is no way to hide process templates, i.e. any
template you use will be visible to other components/products.
IProcessItemService service =
(IProcessItemService) repo.getClientLibrary(IProcessItemService.class);
// create project area
IProjectArea area = service.createProjectArea();
area.setName(<project area name>);
area.getDescription().setSummary(<project area description>);
IProcessDefinition definition =
service.findProcessDefinition(
<your process template id>,
IProcessItemService.ALL_PROPERTIES,
<monitor>);
area.setProcessDefinition(definition);
area = (IProjectArea) service.save(area, monitor);
// customize process specification
area = (IProjectArea) service.getMutableCopy(projectArea);
projectArea.getProcessData().put(
ProcessContentKeys.PROCESS_SPECIFICATION_KEY,
<IContent with the new process specification>);
area = (IProjectArea) service.save(area, monitor);
Cheers, Kai
jnason wrote:
process specification of a project area programatically. You would do
this by using the IProcessItemService. See below. We currently require a
process template ('process definition' in the code) to be set in the
project area. There is no way to hide process templates, i.e. any
template you use will be visible to other components/products.
IProcessItemService service =
(IProcessItemService) repo.getClientLibrary(IProcessItemService.class);
// create project area
IProjectArea area = service.createProjectArea();
area.setName(<project area name>);
area.getDescription().setSummary(<project area description>);
IProcessDefinition definition =
service.findProcessDefinition(
<your process template id>,
IProcessItemService.ALL_PROPERTIES,
<monitor>);
area.setProcessDefinition(definition);
area = (IProjectArea) service.save(area, monitor);
// customize process specification
area = (IProjectArea) service.getMutableCopy(projectArea);
projectArea.getProcessData().put(
ProcessContentKeys.PROCESS_SPECIFICATION_KEY,
<IContent with the new process specification>);
area = (IProjectArea) service.save(area, monitor);
Cheers, Kai
jnason wrote:
Our team is building a point product on top of the Jazz framework and
have a desire to initialize a project with some process
customizations out of the box. Is there an established convention to
programatically create a project and inject our process specification
(for instance: a role specification, workitem type, etc)?
Ultimately the product will integrate with other products on the Jazz
platform so shipping with a custom repository is not really an
option. The product intends to hide many of the Jazz complexities so
we will not ask users to create a project initialized from a
template. The framework should be mostly transparent to the vast
majority of users.
Thanks for the help!