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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

creating change activity using java api

aashishramchand
12-Amethyst

creating change activity using java api

I am trying to create a change activity object using java api and im getting the following error when i run it,

this error is occuring at FolderHelper.assignLocation(changeTask, folder_path_in_windchill);

 

wt.folder.FolderException:
A cabinet member must be assigned to a cabinet, not a subfolder. Cabinet member: "(Default task) Modify affected objects". Subfolder: "(Default task) Modify affected objects=.
at wt.folder.FolderHelper.assignLocations(FolderHelper.java:838)
at wt.folder.FolderHelper.assignLocation(FolderHelper.java:142)

1 REPLY 1
yxin
5-Regular Member
(To:aashishramchand)

Change activity is not folder based object. It's a CabinetMember instead, so you can only assign it to the root folder. 

Try to get the root folder first (containerRef is the context ref):

Folder folder = FolderHelper.service.getFolder("/Default", containerRef);

And then call the assignLocation:

FolderHelper.assignLocation((FolderEntry) changeActivity, folder);

 

Announcements

Top Tags