Api client on Batch Java
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.
Accepted answer
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.
3 other answers
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
Good evening Ralph and good evening everyone.
I answer myself to the specific question, if it can be useful to someone I indicate here how I solved it:
Creating a class with all the attributes necessary for the ticket, which extends the WorkItemOperation class and implementing the run method that calls the method called execute within the class itself. This returns an IWorkItemHandle that through the resolveAuditable method instantiates the aforementioned WorkItem.
Thanks to everyone.