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

Contributing operations to be consumed by the Jazz process e

Hi,

How can I add operations so that they can show up when I try to modify
the "operation rights" for a given role in the process specification editor?

The only "operation" related extension I could find was
com.ibm.team.repository.common.operations which doesn't seem to be what
I'm looking for. All the process matches are no go because they're all
advisors/participants/listeners. So how can I add new operations to the
process?

Thank you.

Regards,
Rem

0 votes



10 answers

Permanent link
The extension-point is called "configuration-points" (as in places that
your component opens up for configuration by process). Operations,
Events, and Configuration Data are all configuration points.

- Jared

Remy Chi Jian Suen wrote:
Hi,

How can I add operations so that they can show up when I try to modify
the "operation rights" for a given role in the process specification
editor?

The only "operation" related extension I could find was
com.ibm.team.repository.common.operations which doesn't seem to be what
I'm looking for. All the process matches are no go because they're all
advisors/participants/listeners. So how can I add new operations to the
process?

Thank you.

Regards,
Rem

0 votes


Permanent link
Hi Jared,

Thanks for the hint. I have found them. Their full names are:

com.ibm.team.process.client.configurationPoints
com.ibm.team.process.service.configurationPoints

I have created a client configuration point and the operation did show
up. I created a service configuration point but it didn't. I tried
copying the exported JAR plug-in to the
\jazz\server\tomcat\webapps\jazz\WEB-INF\eclipse\plugins folder and
restarted Tomcat but it did not work. How do I add a server side operation?

Also, now that I've declared these operations, what is the next step?
How do I hook the code that is supposed to correspond to these operations?

Thank you.

Regards,
Rem

Jared Burns wrote:
The extension-point is called "configuration-points" (as in places that
your component opens up for configuration by process). Operations,
Events, and Configuration Data are all configuration points.

- Jared

Remy Chi Jian Suen wrote:
Hi,

How can I add operations so that they can show up when I try to modify
the "operation rights" for a given role in the process specification
editor?

The only "operation" related extension I could find was
com.ibm.team.repository.common.operations which doesn't seem to be
what I'm looking for. All the process matches are no go because
they're all advisors/participants/listeners. So how can I add new
operations to the process?

Thank you.

Regards,
Rem

0 votes


Permanent link
The quick answer is that in your code you implement AdvisableOperation
and ask the IClientProcess/IServiceProcess to "advise and execute" the
operation.

I'm currently in the process of cleaning up our "team process developers
guide", which I hope to have posted to the public wiki by early next
week. This document contains more of the details you're looking for.

- Jared

Remy Chi Jian Suen wrote:
Hi Jared,

Thanks for the hint. I have found them. Their full names are:

com.ibm.team.process.client.configurationPoints
com.ibm.team.process.service.configurationPoints

I have created a client configuration point and the operation did show
up. I created a service configuration point but it didn't. I tried
copying the exported JAR plug-in to the
\jazz\server\tomcat\webapps\jazz\WEB-INF\eclipse\plugins folder and
restarted Tomcat but it did not work. How do I add a server side operation?

Also, now that I've declared these operations, what is the next step?
How do I hook the code that is supposed to correspond to these operations?

Thank you.

Regards,
Rem

Jared Burns wrote:
The extension-point is called "configuration-points" (as in places
that your component opens up for configuration by process).
Operations, Events, and Configuration Data are all configuration points.

- Jared

Remy Chi Jian Suen wrote:
Hi,

How can I add operations so that they can show up when I try to
modify the "operation rights" for a given role in the process
specification editor?

The only "operation" related extension I could find was
com.ibm.team.repository.common.operations which doesn't seem to be
what I'm looking for. All the process matches are no go because
they're all advisors/participants/listeners. So how can I add new
operations to the process?

Thank you.

Regards,
Rem

0 votes


Permanent link
Hopefully, this will be useful to you and anyone else who's interested
in building on the process framework.

https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide

- Jared

Jared Burns wrote:
The quick answer is that in your code you implement AdvisableOperation
and ask the IClientProcess/IServiceProcess to "advise and execute" the
operation.

I'm currently in the process of cleaning up our "team process developers
guide", which I hope to have posted to the public wiki by early next
week. This document contains more of the details you're looking for.

0 votes


Permanent link
Hi Jared,

Thanks for the link. I have written a new class that extends
AdvisableOperation, but I do not know where I can retrieve a
IProcessArea and an IDevelopmentLine to send to the constructor.

Also, how can I tell the process to execute this operation?

I am trying to write an operation kind of like "Submit" or "Send as
attachment". All I have are some Eclipse IFile instances and any of its
related IRemoteActivities.

Thank you for any pointers that you can provide.

Regards,
Rem

0 votes


Permanent link
I believe your questions are answered in the developer guide

I do not know where I can retrieve a
IProcessArea and an IDevelopmentLine to send to the constructor.

https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Associate_items_with_a_team_area

Also, how can I tell the process to execute this operation?

https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Defining_Operations_on_the_Clien

- Jared

0 votes


Permanent link
Hi Jared,

Thanks for the quick reply.

In the second section, I do not know what are the contents of the
findProcessArea method that is being called on the 'parameter'. Also, of
what type is this 'parameter' supposed to be? Is it something like an
ISaveParameter?

IProcessArea processArea = findProcessArea(parameter);

I was able to get the IProcessClientService and IProcessArea though. For
anyone interested, you can retrieve an ITeamRepository like so from your
an IRemoteActivity (the 'activity' is an IRemoteActivity here)...

IActivitySource source = activity.getActivitySource();
ITeamRepository repository = source.getModel().teamRepository();
// service retrieved
IProcessClientService service = (IProcessClientService) repository
.getClientLibrary(IProcessClientService.class);
List<IFileSystemWorkItem> items = activity.getWorkItems();
for (IFileSystemWorkItem item : items) {
IWorkItem workItem = (IWorkItem) item.getWorkItem();
IProjectAreaHandle projectArea = workItem.getProjectArea();
IItem handle = projectArea.getFullState();
if (handle instanceof IProcessArea) {
} else {
IProcessArea area = (IProcessArea) repo.itemManager()
.fetchCompleteItem(projectArea, IItemManager.DEFAULT,
new NullProgressMonitor());
}
}

I do not know if this is the right way and it probably isn't, but at
least it works. ;)

I am now missing the IDevelopmentLine but believe I should be able to
retrieve it after more jumping around the various Jazz interfaces. I
will post back once I have found a way.

Regards,
Rem

0 votes


Permanent link
So, following the code I pasted above, to get an IDevelopmentLine...

repo = ITeamRepository
service = IProcessClientService
area = IProjectArea (I casted it as IProcessArea in my previous reply,
but it actually is an IProcessArea)

List areas = repo.itemManager().fetchCompleteItems(
area.getTeamAreas(), IItemManager.DEFAULT,
new NullProgressMonitor());
IClientProcess process = service.getClientProcess(area,
new NullProgressMonitor());
if (!areas.isEmpty()) {
IDevelopmentLine line = process.getDevelopmentLine((ITeamArea)
areas.get(0), new NullProgressMonitor());
// now you have an IProcessArea (area), and an
// IDevelopmentLine (line) to instantiate your concrete
// AdvisableOperation subclass from an IRemoteActivity!
}

0 votes


Permanent link
Choosing a random team area will result in a random process being
applied to your operation. This is fine if you're just experimenting,
but if you're writing a real operation, you need to use the appropriate
team area.

How you compute the "correct" team area depends on what operation you're
performing. This is what I try to explain in:
https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Associate_items_with_a_team_area

For example, the SCM Deliver operation is run relative to the owner of
the target stream, which according to their model must be a team area.

- Jared

Remy Chi Jian Suen wrote:
So, following the code I pasted above, to get an IDevelopmentLine...

repo = ITeamRepository
service = IProcessClientService
area = IProjectArea (I casted it as IProcessArea in my previous reply,
but it actually is an IProcessArea)

List areas = repo.itemManager().fetchCompleteItems(
area.getTeamAreas(), IItemManager.DEFAULT,
new NullProgressMonitor());
IClientProcess process = service.getClientProcess(area,
new NullProgressMonitor());
if (!areas.isEmpty()) {
IDevelopmentLine line = process.getDevelopmentLine((ITeamArea)
areas.get(0), new NullProgressMonitor());
// now you have an IProcessArea (area), and an
// IDevelopmentLine (line) to instantiate your concrete
// AdvisableOperation subclass from an IRemoteActivity!
}

0 votes


Permanent link
Hi Jared,

You are absolutely right. However, since I have been unsuccessful in
figuring out how to retrieve the ITeamArea for my items, I just used
this method since it at least returned me something meaningful
(non-null) and was able to let me test it out properly.

Certainly, this is very dangerous since each team area may have their
own customized process, so the whole operation could not be run properly.

I will continue jumping through interfaces for the next few days when I
have spare time and hopefully find the proper way. I will post back once
I have that. :)

Regards,
Rem

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

Question asked: Jun 07 '07, 5:21 p.m.

Question was seen: 11,492 times

Last updated: Jun 07 '07, 5:21 p.m.

Confirmation Cancel Confirm