Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

Recovery Item pending action

  • 1.  Recovery Item pending action

    Posted Wed January 15, 2025 10:00 AM

    Good morning,

    I'm currently working on a data script that iterates through a specific recovery bin to find a specified item and use .recover() to return it back to the DocVersion table. When doing my initial testing on this, it appears that the .recover() function out of the box just adds the recovery process as a pending action and I am unsure how to make that complete processing. For most pending actions, just using ".save(RefreshMode.REFRESH)" on the item is enough to get the server to process it but I've tried saving/refreshing the CmRecoveryItemImpl, the object store, and even the recovery bin but the item is still not searchable in Content Navigator or in the DocVersion table. Here is a code snippet of the logic I am using:

    I would greatly appreciate any advice/input that you may be able to offer and thank you for reading my post.

    Thanks,

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------


  • 2.  RE: Recovery Item pending action

    Posted Thu January 16, 2025 11:01 AM

    Hello, the IBM code example is clear and matches your code block except you do not need os.Save, bin.save, you don't need searchscope either. You are hitting your guid right and have console out it was matched?  Is that guid one document or part of a version series? SAVE will commit your pending action you are correct about that. As another troubleshooting step after you locate your test document, recover and save it run the same code again and see if the item is still in the recovery bin.  Last troubleshooting step check your CPE log after you make the call, or if the item never moves out of recovery bin loop it with a thread sleep like 1 second and then look at CPE logs see what is going on. 

    Working with Recovery Bins - IBM Documentation



    ------------------------------
    Jay Bowen
    www.bowenecmsolutions.com
    Medina, OH
    ------------------------------



  • 3.  RE: Recovery Item pending action

    Posted Thu January 16, 2025 03:41 PM

    Hi Jay,

    Thanks for the reply! I was assuming that I wouldn't need the os.save() and bin.save(), I had just added them because I was running out of ideas of what else to try. The code does successfully find that GUID and does the .recover() logic. The GUID is just the document ID of a standard document that was placed in the recovery bin. The documents for some reason successfully leave the recovery bin but they do not appear in content navigator. I am not really sure where the documents are ending up. 



    ------------------------------
    Christopher Hegel
    ------------------------------



  • 4.  RE: Recovery Item pending action

    Posted Thu January 16, 2025 04:31 PM

    Oh k gotcha. When you say the document is not visible in navigator is that because you are using a search template to locate the document? After you do the recover + save, do an ad hoc search against all versions on document class root, enable include subclasses, do not use folder path as part of search and have one search field ID = 'your recycle item ID' execute and share the results. Do you see a document? Next step do the same search in ACCE, provide the GUID and search. If neither place returns a result and the item is in docversion take a look at the security_id and compare to a document you can see with the same security_id. If you cannot view the document and security is the same there must be another internal flag or bit preventing the document from being visible in CPE most likely a column in docversion. 



    ------------------------------
    Jay Bowen
    www.bowenecmsolutions.com
    Medina, OH
    ------------------------------



  • 5.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:12 PM

    Hi Jay,

    I apologize for the long delay with this. There was a production issue that popped up with our web service that took my attention away from this thread. I am not using a search template to locate the document. I did a desktop-wide search for any document matching the GUID/Document ID for the document and I was unable to find it. I am also unable to see the document in the ACCE tool. I had the head system administrator also perform these searches to see if it's a security related issue but he is also unable to find the documents. Is there something maybe wrong with how I'm sending them to the recovery bin? I wouldn't think so since it shows up in the ACCE tool after the recycle bin script is ran but I'm running low on ideas of what else could be happening. 

    Thank you for taking the time to read this,

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------



  • 6.  RE: Recovery Item pending action

    Posted Fri January 17, 2025 10:07 AM

    Christopher

    If you are not sure where the documents are ending up, have you tried searching for them based on GUID...either using ICN or ACCE?

    It is likely the documents are being "unfiled" and can't be browsed too, but a search in ICN can find them.

    The other alternatives include the document has been marked as hidden in which case you will only be able to find it in ACCE, or you don't have permissions to view the document after it's been restored.



    ------------------------------
    RUTH Hildebrand-Lund
    ------------------------------



  • 7.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:05 PM

    Hi Ruth, 

    I have tried in ICN and ACCE but they do not appear in either of them. I checked with our head administrator and he should have full access to everything and he stated that the document appears to not exist at all. Is there something potentially wrong with my deletion process? After the recycle/delete script, the documents did appear in the recovery bin in ACCE but maybe there's something else I'm doing wrong? 

    Thank you for taking the time to look at this,

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------



  • 8.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:15 PM

    Sorry -- I'm not able to clearly read the code in the graphic. Take a look at the samples here: https://www.ibm.com/docs/en/filenet-p8-platform/5.6.0?topic=bins-working-recovery and make sure you have the appropriate permission to get to the items.



    ------------------------------
    RUTH Hildebrand-Lund
    ------------------------------



  • 9.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:24 PM

    Hi Chris, do you want to do a screen share and do this together?  If so what's your schedule look like and time zone.



    ------------------------------
    Jay Bowen
    www.bowenecmsolutions.com
    Medina, OH
    ------------------------------



  • 10.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:54 PM

    Hi Jay,

    I sadly do not think my organization would allow me to screenshare any of the code outside of a few screenshots. I apologize for the inconvenience/complication.

    Thanks,

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------



  • 11.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 01:51 PM

    Hi Ruth, 

    It looks like the code mentioned there is the same that I am using. I will triple check on permissions but I believe that the user that I am using has full access to this environment.

    Thanks,

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------



  • 12.  RE: Recovery Item pending action

    Posted Tue January 21, 2025 02:51 PM

    Please make sure that the user that runs the code has  the VIEW_RECOVERABLE_OBJECTS access right on the object store...it is not on by default for OS Admins:



    ------------------------------
    RUTH Hildebrand-Lund
    ------------------------------



  • 13.  RE: Recovery Item pending action

    Posted Wed January 22, 2025 05:12 AM

    Hi,

    after re-reading the whole thread  10 times I'm still not 100% clear of the problem. Is my understanding correct:

    1. You have a document that you can find and view in ICN and ACCE
    2. You mark the document for deletion and you do not see it anymore (note as Ruth said if you have the VIEW_RECOVERABLE_OBJECTS you would indeed see it)
    3. You  recover the document and you still do not see it (using the same user as in 1)

    What happens if you do that manually using ACCE?

    On a side note: The document never leaves the DocVersion Table. The fact that it is marked for deletion manifests itself in the column RECOVERY_ITEM_ID not being null. In reverse any query to the documents will have the clause AND RECOVERY_ITEM_ID IS NULL automatically appended (unless you have - of course- VIEW_RECOVERABLE_OBJECTS privilege where the clause is omitted. )

    Hope this helps,

    Gerold



    ------------------------------
    Gerold Krommer
    Managing Director
    The Document Content Profesionals, G.m.bH
    Wien
    +436602408515
    ------------------------------



  • 14.  RE: Recovery Item pending action

    Posted Wed January 22, 2025 08:34 AM

    Hello everyone,

    It seems to have been an issue specifically with that document since after rerunning the script with a larger collection of documents, it worked. I apologize for the confusion and I greatly appreciate you all taking your time to help me with this. It really does mean a lot!

    Thank you everyone!!!

    Chris



    ------------------------------
    Christopher Hegel
    ------------------------------