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

Extending process template programmatically

Hello,

it is possible to extend a process template in a programming way.

If i have the IProcessDefinition, i want to add some roles, iterations or operations.

I can't manipulate the process_specification, because it is internal(com.ibm.team.process.internal.common.model)

Is there another way, how i can read/write the process specification without to create my own process specification model?

best regards

0 votes



6 answers

Permanent link
On Fri, 17 Jul 2009 14:23:02 +0000, gd wrote:
it is possible to extend a process template in a programming way.

If i have the IProcessDefinition, i want to add some roles, iterations
or operations.

There is no API for modifying process definitions this way. The intention
is that only end users modify the process definitions in the database and
we provide UI for that.


--
Jared Burns
Jazz Process Team

0 votes


Permanent link
Jared Burns wrote:

There is no API for modifying process definitions this way. The intention
is that only end users modify the process definitions in the database and
we provide UI for that.

I thought I'd make a point here that this is not the deployment model
for all RTC and Jazz customers.

For example, our admin team controls the process template deployed to
our users such that end-users do not update the process template. We
also have the need to programmatically deploy the same template changes
to hundreds of projects.

0 votes


Permanent link
On Mon, 20 Jul 2009 16:19:19 -0500, Mark Ingebretson wrote:

Jared Burns wrote:

There is no API for modifying process definitions this way. The
intention is that only end users modify the process definitions in the
database and we provide UI for that.

I thought I'd make a point here that this is not the deployment model
for all RTC and Jazz customers.

For example, our admin team controls the process template deployed to
our users such that end-users do not update the process template. We
also have the need to programmatically deploy the same template changes
to hundreds of projects.

When we make programmatic changes to the process specification during
migration, we make text-based (not model-based) edits and I would
recommend this approach to anyone else considering changing the spec. If
you make a model, alter it, and then serialize it, you will usually end
up with a bunch of formatting changes which will make it very difficult
for users to diff changes to the specification in their history.

If you're just asking how to read/write the spec, you need to:

1. Fetch the process definition using the IItemManager (client)
or IRepositoryItemService (server).
2. Get the spec content from the definition:
IContent spec = (IContent) definition.getProcessData().get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
3. Read the spec data from the database using the IContentManager (client)
or IContentService (server).
4. Make your edits.
5. Create a new IContent from the new specification string using the content manager or service.
6. Put the new IContent in the definition:
definition.getProcessData().put(ProcessContentKeys.PROCESS_SPECIFICATION_KEY, newContent);
7. Save the definition using the IProcessClientService (client) or IProcessServerService (server)


--
Jared Burns
Jazz Process Team

0 votes


Permanent link
Hi Mark,

In your case the "end users" for modifying the process definition that Jared mentions would be your admin team. The team can modify a template using the editing support the UI and then create projects based on the changed template. The team could also export the template and import it into other repositories as needed.

If I've misunderstood what you are trying to do, please correct me.

Martha
Jazz Process Developer

Jared Burns wrote:

There is no API for modifying process definitions this way. The intention
is that only end users modify the process definitions in the database and
we provide UI for that.

I thought I'd make a point here that this is not the deployment model
for all RTC and Jazz customers.

For example, our admin team controls the process template deployed to
our users such that end-users do not update the process template. We
also have the need to programmatically deploy the same template changes
to hundreds of projects.

0 votes


Permanent link
Hi,

I need to create work items from a WI template via a java program. What APIs I should use to do it (a WI template exist in the project area where I want to create the WIs)?


Thanks!

0 votes


Permanent link
Hi Jared,

I'm having trouble at step 4. Make your edits..

I'm trying to add an ILiteral value to an IEnumeration. Do you have any ideas how can I do it?


On Mon, 20 Jul 2009 16:19:19 -0500, Mark Ingebretson wrote:

When we make programmatic changes to the process specification during
migration, we make text-based (not model-based) edits and I would
recommend this approach to anyone else considering changing the spec. If
you make a model, alter it, and then serialize it, you will usually end
up with a bunch of formatting changes which will make it very difficult
for users to diff changes to the specification in their history.

If you're just asking how to read/write the spec, you need to:

1. Fetch the process definition using the IItemManager (client)
or IRepositoryItemService (server).
2. Get the spec content from the definition:
IContent spec = (IContent) definition.getProcessData().get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
3. Read the spec data from the database using the IContentManager (client)
or IContentService (server).
4. Make your edits.
5. Create a new IContent from the new specification string using the content manager or service.
6. Put the new IContent in the definition:
definition.getProcessData().put(ProcessContentKeys.PROCESS_SPECIFICATION_KEY, newContent);
7. Save the definition using the IProcessClientService (client) or IProcessServerService (server)


--
Jared Burns
Jazz Process Team

0 votes

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,948

Question asked: Jul 17 '09, 10:11 a.m.

Question was seen: 7,460 times

Last updated: Jul 17 '09, 10:11 a.m.

Confirmation Cancel Confirm