cancel
Showing results for 
Search instead for 
Did you mean: 

How to update autoname on existing documents

David_Whelan
Star Contributor
Star Contributor

Is it possible to trigger OnBase to update the autoname string via the API? I will have millions of documents to update and would prefer to not use workflow.  I don't want to modify keyword values, as that will write to transaction logs and trigger other systems to update (because they look for changes in our logs).

 

As an alternative, is there an API call to send a document into workflow directly?  I do have a working Unity Life Cycle that updates the autoname (using the 'Update Document Name' action).   I just don't know how to feed workflow my original documents and don't want to create millions of unity form documents to be related to feed my original documents into workflow.

 

Any suggestions greatly appreciated,

 

David

1 ACCEPTED ANSWER

David_Whelan
Star Contributor
Star Contributor

Thanks for your info - I ended up writing an C# app that reads a CSV of DocHandles and adds each one to Workflow via Add to Life Cycle API call.  Then I have multiple tasks assigned on Unity Schedule to speed processing on the back-end.

 

The 'Rename All Documents of This Document Type' is too slow for high volumes.

 

Thanks, please consider closed!

 

View answer in original post

4 REPLIES 4

Larissa_Armand
Elite Collaborator
Elite Collaborator

Hi David,

 

I'm not aware of a way to do so via API. There is a checkbox in Configuration that could be used (though it could still take a while and this is per-document-type). It at least avoids the workflow option if you don't want to go that route: 

 

f6bca2c7e8234b4ba7840e5659128628

 

If you're looking for another way to get items into workflow, I've done so with WorkView objects to identify related documents and move them into workflow, then you can purge the workview objects. Or, if you'd prefer a scripting solution you could query for documents in a Unity script and add the items to workflow using the script. 

 

Edited to add: Sorry, realized you mentioned adding to workflow using a script already. Those options are outlined here, depending on whether you want to add to a life cycle or a particular queue. https://sdk.onbase.com/unitySDK/html/2cc2066d-6f0b-568a-2a05-f617ed93737d.htm 

Richard_Ruiz
Confirmed Champ
Confirmed Champ

You will want to look at the method Workflow.AddToLifeCycle Method (Document, LifeCycle). The LC would call the action then remove the document from the LC.

David_Whelan
Star Contributor
Star Contributor

Thanks for your info - I ended up writing an C# app that reads a CSV of DocHandles and adds each one to Workflow via Add to Life Cycle API call.  Then I have multiple tasks assigned on Unity Schedule to speed processing on the back-end.

 

The 'Rename All Documents of This Document Type' is too slow for high volumes.

 

Thanks, please consider closed!

 

Thank you for sharing your solution with our community members @David Whelan.

 

Cheers!

~Alan