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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to programmatically move all revisions and versions of objects by Expression

Prashanth_0108
4-Participant

How to programmatically move all revisions and versions of objects by Expression

Hi All,

 

I have tried with this Expression (CS152791), but it is not move all the previous revisions. It will move only last 2lastest versions of object.

 

Kindly help me out to move all revision and versions by expression.

 

Thanks,

Prashanth

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Prashanth_0108 

So try to search previous versions that were not moved and use the api to move them.

You may go through all revisions

 

PetrH

View solution in original post

3 REPLIES 3

Hi Prashanth_0108,

Thank you for your question.
I encourage you to bring more details and context to your initial inquiery. For example, screenshots are useful to better understand what you are trying to do and will also increase your chance to receive meaningful help from other Community members.
 
 
Regards,
Andra

Hi Archila,

 

Kindly check the snapshots and i am using this expression for moving the object from one folder1 to folder2.

 

// Check if a PBO has been assigned to the process
if (primaryBusinessObject !=null) {
try {
wt.folder.Folder f = wt.folder.FolderHelper.service.getFolder( "/Default/Obsolescence",((wt.inf.container.WTContained)primaryBusinessObject).getContainerReference());
 
//move the PBO to the test folder
wt.folder.FolderHelper.service.changeFolder((wt.folder.FolderEntry)primaryBusinessObject, f);
  }
catch ( wt.util.WTException wex ) {
  System.out.println( "Cannot move "+ primaryBusinessObject.getDisplayIdentifier( )+" because "+ wex.getLocalizedMessage());
}
}
else
 // if a PBO has not been assigned to the Process
 System.out.println( "Primary business object is NULL");
 
 

Regards,

Prashanth

Hi @Prashanth_0108 

So try to search previous versions that were not moved and use the api to move them.

You may go through all revisions

 

PetrH

Announcements


Top Tags