cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

How to get the details of selected item in MKS RM through JAVA API?

ptc-5474578
1-Newbie

How to get the details of selected item in MKS RM through JAVA API?

How to get the details of selected item in MKS RM through JAVA API?

I have use case to get the details (like issue id) for items selected in MKS RM through JAVA API.Can any one help in this regard.

4 REPLIES 4

Aman,

First I would recommend that you read the Event Triggers section of the Server Administration Guide. (Starting on page 306 http://www.ptc.com/WCMS/files/143622/en/ServerAdministrationGuide_Integrity_10_0.pdf)

Next, you can find documention for all our Java API beans in the documentation included with your Integrity server. Simply point your broswer to your Integrity server (typically http://hostname:7001) and then click on the link for Java API Documention.

If you can't find what you're looking for there, please let me know!

Jeremy,

I am looking at Java API Documentation that could be found on integrity server, but examples are missing. The same for Integrations Builder Guide.

I am particulary searching for examples around executing command using Interim Responses (in case of issues or viewissue) but I am not able to see an example.

executeWithInterim() method seems interesting, but where could I find an example of use?

executeWithInterim

Response executeWithInterim(java.lang.String[] args, boolean enableCache) throws APIException
Executes a command and returns an interim response. Using an interim response returns only a partially populated Response object. This allows a user more control over when to cancel a potentially long-running command.

Command-level exceptions in the Response will not be thrown by this method. This is due to the nature of the Response hierarchy and the point at which command-level APIException elements occur within the hierarchy.

Using interim responses without caching allows for better memory management since only a small part of the Response object hierarchy is saved in memory at any given time. However, once SubRoutines and WorkItems are read, they cannot be read again at a later time.

The array must have the following order:

  • Integrity application (si, im, etc.)
  • Integrity application command (about, co, issues, etc.)
  • [Optional] Options (--gui, -Y, etc.)
  • [Optional] Selection of items to operate on (members, issue IDs, etc.)
Parameters:
args - The command with arguments.
enableCache - Indicates if the response should be cached internally for use at a later point in time. Note that only WorkItem and SubRoutine objects directly in the Response hierarchy are affected by this flag.
Returns:
The response object that contains the results of the command.
Throws:
APIException - If there was an exception while running the command.


An example can be found at: https://github.com/jenkinsci/integrity-plugin/blob/master/src/main/java/hudson/scm/APISession.java

Hello Jeremy

I was not able to understand the example of code you mention in your mail, so I was able to use interim response.

Could it be possible to get a very basic example including command run and proscessing of response in "executewithinterim" context?

It would help me lot to understand.

Thanks in advance for any support or help.

Marc.

Announcements


Top Tags