Skip to main content

Hi all, I have a problem that needs resolving, and I'm hoping someone out there might have a good idea how I can start.


Scenario: I have a Workflow process that manages our Contracts Booking process. At several stages during that process, the users upload documents to a SharePoint Document Library. We have a custom SmartObject that searches the document library and returns a Related Document list and links to the doc in Sharepoint.


Our problem is that the document library has got so large, that we need to archive those documents that relate to Contracts processes that are complete. This is to (a) prevent the custom SmartObject code from timing out, and (b) reduce the time it takes the document library to load.


Our Process sets a SmartObject flag in the Smartbox to Complete when the final stage is finished. So what we need to do is find some way to set a document status to Complete for all items related to the specific Contract Process instance ID, including those that have been uploaded at all stages of the Process flow. We can then do a bulk move (either manual or automated) of all Completed documents to an Archive Library.


Having just read that back, it kinda makes sense to me, hope it does to you.


So - any thoughts?

Hi,


I won't go too deeply into your problem, but anyhow it can throw some ideas that you might want to consider:


- Do you use folders in the document library or do you upload and store the documents in the root level of it? Using folders might be a good solution, if you have a large number of processes you can even have a first level with year/month and then a subfolders for Processes. Example:DOCLIB/2008-12/ContractProcess_A/myItem.doc


This reduces a lot the docLib load time in moss as fewer items are present, logically groups related folders and docs, and even if for some reason you have to move some folder(s) later its easier.


- Why don't you build a WS to interact with MOSS from K2 instead of using SmartObjects? SOs sure are handy in some cases, but they can also become short of features when there are more specific needs and flexibility. This is achieved without great effort and you can have simple methods to create folders, manage permissions, search docs, etc...


Regards,


 


 


Thanks for the reply, jarrostick.


We don't (can't) use folders, because of the way we need to index the files as they are uploaded, and the way the code searches the library when retrieving the list of related documents and creates the URL list. If we did use folders, then we'd need to search through all folders as well. 


However, at that time we are not actually loading the DocLib, just searching it. so I'm not sure how that would help.


Our SmartObject was actually built for us by K2, who said that this was the best way to achieve what we needed to do.


What I need to do is to pass a status value from a contract transaction in K2 back to MOSS and use that to edit a document's properties for all documents that are indexed to that specific Contract transaction (we call them Deal Packs, so we would select all docws where DealPack_ID = xxx and update the DealPack_Status property to = Complete.)


I think you can create as much as documents libraries as you want and at a certain stage within the Workflow you can move a document from a library to an other in a very easy way using the "Sharepoint document" Event in VS 2005.

 

If you want for some reason move those documents after the completion of the WF instance, you can do it by launching a new workflow separately and  use the previous stated event do complete your mission.

 

Best regards, and let me know if it works 🙂


Reply