It's all about the answers!

Ask a question

How to get Team areas List and Process roles list from particular project area using RTC plain java API


Rohini Kumar (92853) | asked Jul 19 '18, 6:26 a.m.

 Hi Everyone,


My scenario is that I want to get the list of process roles list and team area list of particular project area using RTC plain java API for that I am referring https://rsjazz.wordpress.com/2012/12/09/analyzing-a-aroject-areas-members-and-roles-using-the-plain-java-client-libraries/
currently I am getting specific project area from RTC
CLM version 6.0.5

Thank You 

2 answers



permanent link
Rohini Kumar (92853) | answered Jul 19 '18, 8:15 a.m.
edited Jul 19 '18, 8:22 a.m.

     

public static void teamArea(ITeamRepository repo,
IProjectArea projArea) throws TeamRepositoryException {
List teamAreas = projArea.getTeamAreas();
for (Iterator iterator = teamAreas.iterator(); iterator.hasNext();) {
ITeamAreaHandle handle = (ITeamAreaHandle) iterator.next();
ITeamArea teamArea = (ITeamArea) repo.itemManager()
.fetchCompleteItem(handle, IItemManager.DEFAULT, null);
System.out.println(projArea.getName());
System.out.println(teamArea.getName());

}
}

Using above scenario now I am getting team area also of the specific project area,
I just want to get list of process  roles that are available in particular project area


Comments
Ralph Schoon commented Jul 19 '18, 8:27 a.m. | edited Jul 19 '18, 8:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

There is no scenario above, that I can understand. There is a minimal information maximal fuzzy question.

I think the example code you can download from the blog post https://rsjazz.wordpress.com/2012/12/09/analyzing-a-aroject-areas-members-and-roles-using-the-plain-java-client-libraries/ should give you a good idea how to write or change the code to reuse it for your purpose. The downloadable code actually iterates through exactly one project area, if you provide the name. The blog actually explains how the code works to some extend.



Rohini Kumar commented Jul 19 '18, 8:31 a.m. | edited Jul 19 '18, 8:32 a.m.

 I am writing a code to add users with roles in RTC project area,now users added in project area, but  I want to see how many and which roles are available in RTC project area 


Ralph Schoon commented Jul 19 '18, 8:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
        IClientProcess clientProcess = service.getClientProcess(processArea,
                null);
        IRole[] availableRoles = clientProcess.getRoles(processArea, null);
        for (int i = 0; i < availableRoles.length; i++) {
            if (availableRoles[i].getId().equals(roleID)) {
                return availableRoles[i];
            }
        }


permanent link
Ralph Schoon (63.1k33646) | answered Jul 19 '18, 8:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 19 '18, 8:08 a.m.

You have the example up there, what more do you want?

See: How should I ask a question in the Forum if I want to receive useful answers?

Your answer


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