It's all about the answers!

Ask a question

Is it possible to operate ETM Project Area with EWM Operation Participant?


Musashi Tsujiuchi (513) | asked Jul 16 '21, 6:19 a.m.

 I'm developing an operation participant that runs with saving work items.

When the work item is saved, members are added to the Project Area based on the information in the work item.

I was able to confirm that I could add members to the EWM Project Area, but I'm not sure if I could add members to the ETM Project Area.
If anyone knows if it can be done on the server side Java API, please help..

**I have confirmed that there is a possibility on the client side Java API & REST API by referring to the following.

How to add members to Project Area in Rational Design Manager programmatically
Bulk Manipulation of Process Area Membership

2 answers



permanent link
Monika Rajput (2412) | answered Jul 27 '21, 2:34 a.m.

Hi Musashi,


You can do a GET on https://<hosy>:<port>/qm/process/project-areas to retrieve the list of QM projects and then do a GET on https://<hosy>:<port>/qm/process/project-areas/<project_area_itemID(UUID)>/members
to get the list of members assigned a particular project area.

The POST method will allow you to add members to the project area.

Thanks,
Monika Rajput


Comments
Musashi Tsujiuchi commented Jul 28 '21, 10:44 p.m.

Hi Monika, thank you for your comment. 


I want to do the processing in the server side Java API.
However, if I do it with REST API, I'll refer to it.
Thank you!


permanent link
Ralph Schoon (59.7k23643) | answered Jul 27 '21, 2:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Did you try to use the Java API against ETM? As far as I am aware, the same Java API should work for ETM, because that part of the API is shared. Unless there is something that prevents the APIU from working on ETM, it is worth a try. I do not know if there are any special authentication requirements.


Comments
Musashi Tsujiuchi commented Jul 28 '21, 10:57 p.m. | edited Jul 28 '21, 11:01 p.m.
Hi Ralph, thank you for your comment. 

I am trying the following code in the server side Java API, but ETM does not work.
Since EWM is working well, I think it will be possible if I can access the IRepositoryItemService on the ETM side.

Is there a way to access the IRepositoryItemService on the ETM side?


 
IRepositoryItemService itemService = getService(IRepositoryItemService.class);

//EWM-OK,ETM-NG
UUID ewmuuid = UUID.valueOf("_Gg83MN6KEeuJy9m7LML5cA");
//UUID rqmuuid = UUID.valueOf("_Fa-_kOhMEeu-6aXqyuSoaA");
IProjectAreaHandle ewmhandle = (IProjectAreaHandle)
IProjectArea.ITEM_TYPE.createItemHandle(ewmuuid, null);
IProjectArea ipaEwm =(IProjectArea)itemService.fetchItem(ewmhandle,null);
String EwmProjectName = ipaEwm.getName();


Ralph Schoon commented Jul 29 '21, 2:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I think the reason why it does not work for ETM but for EWM is, that you are logged into EWM and the ItemService you use is the one of EWM and not of ETM. 


You would have to authenticate with ETM and get a session with it to do this. I am sure there are mechanisms in the Java API to do that, but I have never used them.


Musashi Tsujiuchi commented Jul 29 '21, 5:56 p.m.
Thanks for your comment.

As you said, I want to get the session on the ETM side.
However, I do not know how to do this...
I am thinking that something like ITeamRepository on the server side might be able to achieve this, but I haven't found it.

I will think about it some more. 


Ralph Schoon commented Jul 30 '21, 7:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You could try to follow the SDK entries you have in your follow up action to  look into the underlying layers. At some point the services use an HTTP client to send the calls. You should be able to get that client and the associated session to make your call to ETM, or may be able to get the Java service that allows you to reach the remote server. I have no examples unfortunately.


Musashi Tsujiuchi commented Aug 03 '21, 11:10 p.m.
Sorry for the delayed response.

Thanks for your useful comments!

I've just run out of time to do the research, so I'll consider creating REST or client Java program and calling it from the server side.

Once again, thanks! 

Your answer


Register or to post your answer.