Showing results for 
Search instead for 
Did you mean: 

Teamcenter SOA service - Load object




I am developing a SOA service which will read project information from a file and update the necessary projects in Teamcenter.

Information on the file are: ProjectID, UserID, GroupName etc.

I would like to know how to load objects of Type TC_Project,  User,  Group and GroupMember in my ProjectManagement.Java class.


When I was working with Teamcenter UID, I was loading objects in the following way:

private final String projectUID = "wxThN2f8YH3MfD";
private final String userId = "gsbhlo7zYH3MfD";	
private final String grpMemberId1 = "gedhIsvvYH3MfD";

private TC_Project project;
private User teamAdmin;
private GroupMember grpMember;

DataManagementService dmService = DataManagementService.getService(AppXSession.getConnection());
ServiceData sData = dmService.loadObjects(new String[] {projectUID, userId, grpMemberId1});

project = (TC_Project) sData.getPlainObject(0);
teamAdmin = (User) sData.getPlainObject(1);
grpMember = (GroupMember) sData.getPlainObject(2);

How to load objects from the Project_ID or User_ID?


Thank you.


Re: Teamcenter SOA service - Load object




You need to have couple of lines in your code to search for your project using Project... query or a similar saved query which return your project object


1) Initiate SavedQueryServices

2) find Project... saved query using findSavedQueries function

3) search for your project based on your input criteria using executeSavedQueries

4) process the SavedQuery.SavedQueriesResponse (retuned by above funtion) to get your TC_Project object


From here you can use your ProjectLevelSecurityService to manage your project information