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

creating change activity using java api

Highlighted
Regular Member

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

Re: creating change activity using java api

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);