It's all about the answers!

Ask a question

Creating a LabResourceGroup programmatically


pietro marella (953130) | asked Mar 07 '11, 10:45 a.m.
I need to programmatically create a Lab Resource Group within a RQM Project (I'm on RQM 2.0.1)

When I put a LabResourceGroup artifact without specifyng the associated TeamArea I get a java.null.Exception in RQM :
java.lang.NullPointerException
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.extractTeamAreaUUID(ResourcegroupPutHandler.java:114)
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.unmarshal(ResourcegroupPutHandler.java:74)
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.unmarshal(ResourcegroupPutHandler.java:1)
at com.ibm.rqm.integration.handler.AbstractPutHandler.handle(AbstractPutHandler.java:199)
...................)))

It lead me think that I need to specify the TeamArea in the LabResourceGroup.

The problem I have is that the TeamArea is not an artifact I'm able to manage programmatically, I can't find any way to list the actual TeamAreas defined in the Project, get the ID and set it in the LabresourceGroup to be post in the RQM -

Any help?

Thanks in Advance

*piero

3 answers



permanent link
Paul Slauenwhite (8.4k12) | answered Mar 08 '11, 8:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
I need to programmatically create a Lab Resource Group within a RQM Project (I'm on RQM 2.0.1)

When I put a LabResourceGroup artifact without specifyng the associated TeamArea I get a java.null.Exception in RQM :
java.lang.NullPointerException
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.extractTeamAreaUUID(ResourcegroupPutHandler.java:114)
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.unmarshal(ResourcegroupPutHandler.java:74)
at com.ibm.rational.test.lm.service.integration.jaxb.ResourcegroupPutHandler.unmarshal(ResourcegroupPutHandler.java:1)
at com.ibm.rqm.integration.handler.AbstractPutHandler.handle(AbstractPutHandler.java:199)
...................)))

It lead me think that I need to specify the TeamArea in the LabResourceGroup.

The problem I have is that the TeamArea is not an artifact I'm able to manage programmatically, I can't find any way to list the actual TeamAreas defined in the Project, get the ID and set it in the LabresourceGroup to be post in the RQM -

Any help?

Thanks in Advance

*piero


As described in http://jazz.net/wiki/bin/view/Main/RqmApi, you can a teamarea feed using the following URL:

https://<host>:<port>/<context>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/teamarea?abbreviate=false

permanent link
Kurtis Martin (1.4k11) | answered Mar 08 '11, 12:04 p.m.
JAZZ DEVELOPER
I just created a LabResourceGroup in the UI then did a GET on it via REST API. I was able to see how the labresourcegroup specifies the link to the teamarea.

The name space shortcut in your version of RQM maybe different but the link looks something like this:

<ns3:teamarea href="https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/teamarea/_ygbJQkkYEeC-wtNVeUZnqw"/>

Also I discovered there is a REST API feed for teamarea that contains the id seen at the end of the URL. You can do a GET on this URL to get all Team Areas configured for the project area you are working with:

https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/teamarea?abbreviate=false

Then look for the <id> element in the returned team areas.

permanent link
pietro marella (953130) | answered Mar 11 '11, 10:12 a.m.
Thank you all for your answers.
Really the problem was that the there is no <id> tag for the teamarea feed (while it exsts fro alla the other artifact types).
But I realized then, that in order to create a Labresource.Teamarea item I just need to use the <title> tag as an id:

Resourcegroup.Teamarea team = new Resourcegroup.Teamarea();
String teamid = ...call to a method that gets the teamarea feed and returns back the teamarea <title>...
team.setHref(teamareaId);


thanks
*piero

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.