Microsoft Content Management Server - Posting approved during SDAPI export is not exported correctly (resolution)

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > May 2005 > Posting approved during SDAPI export is not exported correctly (resolution)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Posting approved during SDAPI export is not exported correctly (resolution)
Erik Bailey

2005-05-23, 5:53 pm

All --

In an earlier posting a few months ago
(http://groups-beta.google.com/group...ff8a7ea03?hl=en)
I posted about an issue where postings Approved during an SDAPI export were
not correctly exported. (sorry I can't followup directly to that posting; I
guess it's too old)

I have been working with Microsoft Support since that point, and it does
appear to be a bug in the tool. A workaround was identified by Microsoft
that seems to work for us, and I wanted to share it here in case anyone else
experiences the same issue.

Problem Statement:
If a Posting is Approved during an SDAPI Export (with TimeInterval = 0,
meaning "since last export"), the following behavior is observed:
a) The Posting is exported, but it is the earlier revision (i.e., before the
approved change), and
b) The Posting is flagged as exported, so the next SDAPI export will NOT
pick it up. The only way to export the correct version of the Posting is
either to make and approve another revision, or use Site Manager manually

Workaround:
Do not use TimeInterval = 0. Each time the export runs, save a local copy of
the current date/time (e.g., in an XML file). Then, when the export next
runs, read the date/time from the file and get the time difference between
that and the current date/time. Use that number (in minutes) as the
TimeInterval for CmsDeployExport.Export().

For example:
private static int GetTimeDifference(DateTime dt, string strXmlFile)
{
DateTime dtLastDeployTime = GetDateFromXML(strXmlFile);
System.TimeSpan ts = dt - dtLastDeployTime;
return (int) Math.Ceiling(ts.TotalMinutes);
}

When using this workaround, the behavior changes to the following (which is
much better):
a) On the first export, the Posting is exported, but it is the earlier
revision
b) On the next export, the Posting is exported, and it is the new revision
c) On the next (and all subsequent) export, the Posting is not exported

I hope this helps anyone else experiencing this issue! --Erik Bailey


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com