It's all about the answers!

Ask a question

Running client api application


Sola Otudeko (4511316) | asked Dec 08 '11, 5:17 a.m.
Hi, I developed a simple client app to access rtc users records. It works in eclipse, but stops in the jar file I built to run non-interactively.
It fails on this line
>>> ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI); <<<
after TeamPlatform has started.
Any help please?
regards
Sola


TeamPlatform.startup();


if (!TeamPlatform.isStarted()){
System.out.println("Unable to start team platform");
System.exit(1);
}

System.out.println("team platform status [" + TeamPlatform.isStarted() + "]");

try {
IProgressMonitor monitor = new NullProgressMonitor();
ITeamRepository teamRepository = login(repositoryURI, monitor);
System.out.println("\nlogged in to rtc connection...\n");
run(teamRepository, monitor, assignee);
} catch (TeamRepositoryException e) {
System.out.println("Unable to login: " + e.getMessage());
e.printStackTrace();
} finally {
System.out.println("\nshutting down rtc connection...");
TeamPlatform.shutdown();
System.exit(0);
}


public static ITeamRepository login(String repositoryURI, IProgressMonitor monitor) throws TeamRepositoryException{
String adminUserId = "xxxxxx";
String adminPasswd = "xxxxxx";

System.out.println("doing TeamPlatform.getTeamRepositoryService() ...");

// next line is failing
ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
System.out.println("done...");

System.out.println("doing teamRepository.registerLoginHandler ...");
teamRepository.registerLoginHandler(new LoginHandler(adminUserId, adminPasswd));
System.out.println("done...");

System.out.println("doing teamRepository.login(monitor) ...");
teamRepository.login(monitor);
System.out.println("done...");

return teamRepository;
}

8 answers



permanent link
sam detweiler (12.5k6183201) | answered Dec 08 '11, 8:47 a.m.
what do u mean by 'stops'?

Sam

permanent link
Sola Otudeko (4511316) | answered Dec 08 '11, 9:56 a.m.
It exits (returns to the finally block) when executing the indicated line.

permanent link
sam detweiler (12.5k6183201) | answered Dec 08 '11, 10:17 a.m.
well, your exception handler only handles one exception type

} catch (TeamRepositoryException e) {

I would make it less specific and report out the error

Sam

permanent link
Joseph Simon Arokiaraj (21414745) | answered Dec 08 '11, 3:17 p.m.
Hi Sola,

This is not related to your query.

I am new to RTC.

I have got a attribute "Request Type" of enum type in a workitem. I need to force the approval based on the value of Request Type field.

Is this possible?

I am interested to work on automation. Basically I am a perl programmer working in Build Release domain. Could you please tell where I can find the RTC API?

CHeers,
Jose

permanent link
sam detweiler (12.5k6183201) | answered Dec 08 '11, 5:12 p.m.
the RTC api is a set of classes and methods.. in the latest release, 3.0.1.1, the javadoc has been published (see the download site) , but it does not contain everything in the SDK.

Many of the seemingly trivial things people want to do are very complex with the OO design of RTC as there is no direct procedural api.

there are many examples on the wiki and in the doc. there is NO good overview or class/api architecture doc.

Sam

permanent link
Joseph Simon Arokiaraj (21414745) | answered Dec 08 '11, 5:17 p.m.
Hi Sam,

Thanks a lot for your update.

I guess doo framework is relatively easy for automation. Have you got any example scripts which uses doo.

Have you got any hint for my approval query?

Cheers,
Simon

the RTC api is a set of classes and methods.. in the latest release, 3.0.1.1, the javadoc has been published (see the download site) , but it does not contain everything in the SDK.

Many of the seemingly trivial things people want to do are very complex with the OO design of RTC as there is no direct procedural api.

there are many examples on the wiki and in the doc. there is NO good overview or class/api architecture doc.

Sam

permanent link
sam detweiler (12.5k6183201) | answered Dec 08 '11, 5:31 p.m.
by doo , do you mean dojo? I have no experience there.

I also have no idea about your approval process query.. I would like that answer too.. (I haven't spent any time trying this myself) but I would guess it is in the OperationParticipant context.. which is all server side, no javascript.

Sam

permanent link
Joseph Simon Arokiaraj (21414745) | answered Dec 09 '11, 4:45 a.m.
Hi Sam,

Yes. I mean Dojo framework.

Thanks for your update.

Cheers,
Simon


by doo , do you mean dojo? I have no experience there.

I also have no idea about your approval process query.. I would like that answer too.. (I haven't spent any time trying this myself) but I would guess it is in the OperationParticipant context.. which is all server side, no javascript.

Sam

Your answer


Register or to post your answer.