cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-Foldering Problem When Changing The Trigger Keyword

Joe_Brownlee
Champ in-the-making
Champ in-the-making

We are having an auto-foldering problem that I don't see any way to resolve. We are using the Java Unity API on OnBase 15, but we saw the same issue on version 13 as well.

We have a process that updates the trigger keyword for auto-foldering. If the folder exists for the new value, all is well and the document moves. But if the folder does not exist, the document is in the old folder unless we manually re-index.

The behavior is the same as what we see through the Unity Client. If we re-keyword, the document does not move, but re-indexing moves it. The problem is, re-indexing is a manual process that takes a long time to run since we have many multiple thousands of documents and are adding more daily.

I tried using the CreateReindexProperties() call to set this up. This was suggested by Justin Carlson and I showed Nevin my code at TechQuest. But the problem is, when I call CreateReindexProperties(), I get an exception because I am not changing the Document Type. I don't want to change the Document Type, I just want to jog OnBase to create the new folder and relocate the document.

Is there some other call I can make that would force the document into its correct folder location?

I know there are the new folder APIs that I can use to see what folder the document is in, but I am reluctant to write code to manually re-folder the document since our business people can change the foldering rules as they see fit and I don't want my code to break if/when they do so.

Please help us resolve this issue.

1 ACCEPTED ANSWER

Tyler_Sorber
Star Collaborator
Star Collaborator

EDIT:  Correction of Information

Hi Joe

Re-Indexing the Document will allow the Auto-Foldering of a Document.  Since there is a check to ensure that the same DocumentType is not being Re-Indexed to, you will actually need to perform this action to a Temp DocumentType (Skipping Auto-Foldering), and then Re-Index a second time to the correct DocumentType.  This is the major caveat of performing this update with the Re-Index method.

A second option would be much easier since only the Keyword Information is being modified.  Through the KeywordModification Class, the keyword that triggers the Auto-Foldering can be modified.  This will cause the folder structure to be modified within the same method.  I have tested this scenario back to the latest version of OnBase 12.  This would be from utilizing the UpdateKeyword Method.  Examples of this method can be found throughout the SDK, as well as in the Unity API Sample Application.

View answer in original post

2 REPLIES 2

Jeff_Stoner
Elite Collaborator
Elite Collaborator
Hi Joe -

If the folders are static, then the document will remain in the original folder along with being placed in the new folder. If the folders are dynamic, then changing the keywords will cause the document to appear in the new folder if configured appropriately. I'd recommend contacting your first line of support so that they can verify your folder setup.

Thanks,
-jeff

Tyler_Sorber
Star Collaborator
Star Collaborator

EDIT:  Correction of Information

Hi Joe

Re-Indexing the Document will allow the Auto-Foldering of a Document.  Since there is a check to ensure that the same DocumentType is not being Re-Indexed to, you will actually need to perform this action to a Temp DocumentType (Skipping Auto-Foldering), and then Re-Index a second time to the correct DocumentType.  This is the major caveat of performing this update with the Re-Index method.

A second option would be much easier since only the Keyword Information is being modified.  Through the KeywordModification Class, the keyword that triggers the Auto-Foldering can be modified.  This will cause the folder structure to be modified within the same method.  I have tested this scenario back to the latest version of OnBase 12.  This would be from utilizing the UpdateKeyword Method.  Examples of this method can be found throughout the SDK, as well as in the Unity API Sample Application.