APIs for Process information
Hi,
What services (APIs) can give information about process? Thank you. Regards, Abhishek |
8 answers
You'll need to be more specific.
What product/version are you using? Are you running in the eclipse client or server side? |
Hello Ryan,
We are interested in accessing process related information from a plugin running on RTC 1.0. A pointer to the relevant information or unit tests that highlight api usage would be greatly appreciated Marcelo You'll need to be more specific. |
Here is some code that will enumerate all project areas and print their name
and process id. You could start with this and branch out by reading the javadoc on these interfaces. You can get the source from the downloads page on jazz.net. If you explain more what you are trying to do, I could give better advice. IProcessItemService client = (IProcessItemService) repo.getClientLibrary(IProcessItemService.class); List projectAreas = client.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null); for (Object object : projectAreas) { IProjectArea projectArea = (IProjectArea) object; String processContentPath = projectArea.getProcessContentPath(); System.out.println("\n"); System.out.println("project: " + projectArea.getName()); System.out.println(processContentPath); IProcessDefinition definition = (IProcessDefinition) repo.itemManager().fetchCompleteItem(projectArea.getProcessDefinition(), IItemManager.REFRESH, null); System.out.println("process: " + definition.getProcessId()); } |
Thanks Ryan. We tried it and it worked. It will be helpful if you can tell me how to fetch the team members roles. We were able to fetch the team members (contributors) from a team area. However, we are still trying to find the APIs that will give us list of roles that are defined in a process for which the user has logged in against.
Thanks again for you valuable advice. Here is some code that will enumerate all project areas and print their name |
Jared Burns (4.5k●2●9)
| answered Jul 14 '09, 8:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Sat, 11 Jul 2009 13:53:01 +0000, abhminde wrote:
Thanks Ryan. We tried it and it worked. It will be helpful if you can It looks like this: // First, retrieve the set of available roles in the process area IRole[] availableRoles = fContext.getAvailableRoles(processArea, new SubProgressMonitor(monitor, 500)); RolePersistence rolePersistence = new RolePersistence(availableRoles); ITeamData teamData = processArea.getTeamData(); // Next, retrieve the encoded role-assignment data for the contributor String roleData = RolePersistence.getPersistentRoleData(teamData, contributor); if (roleData != null) { // Finally, decode the role-assignment data using the available roles IRole[] assignedRoles = rolePersistence.deserialize(roleData); } -- Jared Burns Jazz Process Team |
On Sat, 11 Jul 2009 13:53:01 +0000, abhminde wrote: Thanks Ryan. We tried it and it worked. It will be helpful if you can It looks like this: // First, retrieve the set of available roles in the process area IRole[] availableRoles = fContext.getAvailableRoles(processArea, new SubProgressMonitor(monitor, 500)); RolePersistence rolePersistence = new RolePersistence(availableRoles); ITeamData teamData = processArea.getTeamData(); // Next, retrieve the encoded role-assignment data for the contributor String roleData = RolePersistence.getPersistentRoleData(teamData, contributor); if (roleData != null) { // Finally, decode the role-assignment data using the available roles IRole[] assignedRoles = rolePersistence.deserialize(roleData); } -- Jared Burns Jazz Process Team |
Jared Burns (4.5k●2●9)
| answered Aug 20 '09, 8:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Thu, 20 Aug 2009 10:38:05 +0000, eclipsetalk wrote:
Hi, I don't know where that snippet is from, but it looks like a common pattern in our code where we pass an object a "context" which gives that object access to data and services which it would otherwise not be able to use. In the normal pattern, these contexts are handed out selectively. You can't ask for one (in fact, that's usually the point of using this pattern). -- Jared Burns Jazz Process Team |
Jared Burns (4.5k●2●9)
| answered Sep 22 '09, 12:40 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Tue, 22 Sep 2009 17:52:59 +0000, rose wrote:
what are the imports to execute for resolve IProjectArea in a type? The interfaces for the process items (IProjectArea, ITeamArea, etc.) are defined in the com.ibm.team.process.common plugin. -- Jared Burns Jazz Process Team |
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.