06-20-2019 10:57 AM
We have an IWorkflowScript that throws this error when executing:
An error occurred within the Unity API: Keywords can only be modified on an active document.
I'm banging my head on my desk trying to figure out what is causing this to occur.
Any ideas?
Thanks!
Wes
06-21-2019 11:10 AM
Sorry...I don't see the same issues that my coworker had. One question though. If this is an iWorkflow script, why are you trying to get all the documents in the queue into a collection? iWorkflow scripts will run once for every document in the queue. All you have to do is work with the one document that gets passed to you in the args. I'm just a little confused in trying to understand your approach.
06-20-2019 11:09 AM
Can you share some your code? This sounds similar to an issue that one of my coworkers had a few weeks ago. It was due to a timing issue. We were able to fix it by rearranging the code.
One more question, is this on a new document?
06-21-2019 11:10 AM
Sorry...I don't see the same issues that my coworker had. One question though. If this is an iWorkflow script, why are you trying to get all the documents in the queue into a collection? iWorkflow scripts will run once for every document in the queue. All you have to do is work with the one document that gets passed to you in the args. I'm just a little confused in trying to understand your approach.
12-15-2021 09:11 AM
Can I ask a follow up Question:
I am using an iScheduleable script to loop through a result doclist from a Custom Query.
foreach( Document doc in docList){
DocumentLock docLock = doc.LockDocument();
...
keyModifier.ApplyChanges(); -- Its failing here with that same Error Message.
06-28-2019 07:42 AM
If a document is in a scan queue in an UNINDEXED state, you'll get this error. OnBase is very insistent that documents aren't "real documents" until the initial indexing is done: You wouldn't want them to show up in a general query, for example, until a user has said for sure what it's document type and keywords are.
This can be frustrating at times. Until it's indexed, neither the API nor Workflow can do very much - you can't even transition the document to a new queue!
If you're doing something to move documents from a scan queue, to Workflow, then back to a scan queue, then you can run into this error. Even if the documents were indexed before, they will be considered unindexed again until they get through the Index step of their new batch.
(And if there is a Reindex step, they need to get through that as well.)
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.