Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Documents not checked-in - why?
Rooose
Hi All,
Can ayone explain why, if you call the openCmd from a custom app, any non-Word documents do not check-in automatically when closed? Obviously if you open a document from within Filesite it is checked in when closed - regardles of its native app - so why not via the openCmd?.
thanks,
RW
Find more posts tagged with
Comments
nbwoven
Can you elaborate more on your implementation I mean are you invoking OpenCmd using the inherent mContext object variable defined as part of the ICommand class.
Or Are you creating another object var icontext and assigning SelectedNRTDocuments etc. to Initialize it for the OpenCmdClass.
Pls check for the above two(In case you it implemented) else Try mContext.Add(IManExt.opencmd.Integration False) too.
jny
The OpenCmd Object is tasked to do only the following: Checkout the document file and its associated prf file (which holds the document profile values) to the NrPortbl path. Open the document file in its native editor.
When the native app is not integrated with WorkSite, WorkSite does not know that the app has a WorkSite document opened thus it does not know that it needs to check in the file to WorkSite when the file is closed.
In an integrated app, namely Word, WorkSite knows that the file that is closed from the app is WorkSite thus it checks it into WorkSite. This capability comes from the integration with the app itself. More specifically, WorkSite Office Integration hooks into the File|Close thus it can check, when a file closes, whether or not it's a WorkSite document, then check into WorkSite database accordingly if it is.
In a non-integrated app, namely Notepad, WorkSite does not have any capability of knowing the a file handle is released.
So, it is not the OpenCmd that has the capability to check in the checkedout document; it is up to the integrated application to accomplish that.
What is the file type fo the file that you're opening? If it does not require to be checkedout, namely a mime file, you may want to opt for OpenROCmd to just open it read-only.
Rooose
Thanks for the replies...
The file type is a .txt - which opens up in notepad as expected. I,m curently experimenting with the winApi to start the associated app and to pass back the process id (createProcess). I'm then polling the process exit status with GetExitCodeProcess, which returns 0 when the app is closed - i can then check-in the document and refresh my document list.
Problem is that as Word has a MDI and it's already running then the process dies straight away (even though the document is still open). To get round this i'm polling the document object and checking the checkedout property. As soon as this is set to zero then i perform a refresh on my document list.
Complex and messy, i know
I don't suppose the there is anything supported by the SDK which could prove a better option than the above. How does Filesite do it as this checks in a notepad document when it is closed?
many thanks,
RW
jny
FileSite uses a Timer to check on the release of the file handle.