It's all about the answers!

Ask a question

Api client on Batch Java


Emiliano Iannetti (11) | asked Nov 21, 12:10 p.m.
Good evening everyone.
I'm trying to create a batch that automatically creates RTC workItems having N parameters in input. I have always "worked" with plugins and Server-side APIs, now I need the client ones. Can you help me understand how to initially instantiate the objects that I will need later? Like a workItemClient, like a ProjectAreaHandle and the rest?
For the projectArea having the name it should be simple but I always miss the getProcessService that I used Server-side, can you help me? Thank you very much everyone.

3 answers



permanent link
Ralph Schoon (63.5k33646) | answered Nov 21, 12:29 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You might want to look at https://github.com/jazz-community/work-item-command-line to understand how this works.
More examples for client and server APIs are here https://rsjazz.wordpress.com/ the posts are usually tagged with server, common or client API. https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ explains the general concepts. https://rsjazz.wordpress.com/2013/03/14/what-apis-are-available-for-rtc-and-what-can-you-extend/ is a quick overview as well.


Comments
Ralph Schoon commented Nov 21, 12:32 p.m. | edited Nov 21, 12:32 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should do the Lab 1 of the newest workshop https://jazz.net/library/article/1000 the latest releases explain how to setup for client API development. See https://rsjazz.wordpress.com/ for some good to know for the workshop and the last versions.


permanent link
Emiliano Iannetti (11) | answered Nov 22, 7:12 a.m.
Good morning Ralph, thanks for the quick reply, I had already seen some links, but unfortunately I did not find the info I was looking for, I still have the link to github, which I will take a look at right away.
I also wanted to ask you in the meantime, the biggest obstacle I encounter is that using the Server side APIs, I already had everything obtainable, instead now I have to start from some attributes to create everything and I am getting a bit lost to tell the truth...
Can I ask you, if it is not too much, a few lines of addressing to obtain a ProjectArea, a WorkItem and similar, because I think I will then be able to "populate" everything, but I am missing the instantiation of the same, not using the server APIs.
In the meantime, thank you very much anyway.

Comments
Emiliano Iannetti commented Nov 22, 7:15 a.m.

Sorry but the command line is not very useful to me or rather, at the moment we would like to manage everything on the Java API side but client, not using a command prompt.


Ralph Schoon commented 2 days ago
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
  1. I wrote my blog, so that I don't have to answer every question a million times. All the examples you are looking for are there on the blog. 
  2. If you worked with the server API you know the extensions workshop. The newest version has Lab 1 enhanced to set up a Plain Java Client development workspace. It also shows the snippet code that comes with plain Java and already should answer many of your questions
  3. Any Java Application needs to be called at some time - through main(). I can't see why the code for WCL, which does all the stuff you want to do, would be irrelevant. 


Ralph Schoon commented 2 days ago
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The general pattern is, you need to startup the team platform, login, use the teamrepository object. 
You get client libraries which are the client side service objects. By picking the client libraries you should prefer the common libraries over the client 'client libraries' if they provide what you need. 

There are the most important links, I think



Emiliano Iannetti commented 2 days ago
You are absolutely right, in fact it was me who was at fault and I apologize. I tried to search in your guidelines but it talks about plain and not WorkItem (unless I missed it). However, trying and trying again I recovered the ProjectArea and performed the login, I just have to figure out how to create a WI from scratch and I should be there.

In the meantime, thank you very much for the answers and availability.

permanent link
Emiliano Iannetti (11) | answered 2 days ago
For example I found this: Using the Work Item Server API to create Work Items
But I can't find it with the client side API, am I doing something wrong in my search? Thanks.

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.