Click or drag to resize

ExportDocumentManagerMarkAsReceived Method (IEnumerableInt32)

Marks the documents as having been received/processed

Namespace:  Law.EdaIntegration.Exports
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.2
Syntax
C#
public void MarkAsReceived(
	IEnumerable<int> documentIds
)

Parameters

documentIds
Type: System.Collections.GenericIEnumerableInt32
The list of documents ids to mark as received
Remarks
This method supports updating up to 1000 documents at a time. Any list longer than 1000 will cause an exception to be thrown.
Examples
The following example demonstrates retrieving the list of documents for an export printing each name to the system console. Additionally the document ids are accumulated and Early Data Analyzer is updated to show that the documents have been received and processed. This ensures that subsequent calls to All(Boolean) return only "new" documents.
C#
using Law.EdaIntegration;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        // Get the export
        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");
        Export export = edaCase.Exports.ByName("Export-001"); 

        // Create a list to hold the ids of the documents that have been received/processed
        List<int> docsReceived = new List<int>();

        // Set the number of documents to process before we update their received state in
        // Early Data Analyzer
        const int batchSize = 10;

        // Retrieve the list of documents that were exported
        ExportDocumentManager mgr = export.Documents;

        // Loop through each document
        foreach (IExportDocument doc in mgr.All())
        {
            Console.WriteLine("{0}:  {1}", doc.ExportNumber, doc.FileName);

            // Accumulate the document ids so we can mark them as received in Early Data Analyzer.
            docsReceived.Add(doc.Id);
            if (docsReceived.Count >= batchSize)
            {
                // Mark items as received in Early Data Analyzer
                mgr.MarkAsReceived(docsReceived);

                // Clear the received list
                docsReceived.Clear();
            }
        }
    }
}
/*
This example produces the following results:

00001160:  Unprofitable actions.msg
00001155:  Four Attributes.msg
00002241:  Technology outlook.pdf
00001163:  Load Forecasting Technology.msg
00002240:  Book1.xlsx
00001159:  Monthly data.msg
00001170:  Viewpoint from above.msg
00001168:  Scope.docx
00001166:  Key Stats YTD 2011.xlsx
00001167:  Forecast 2012.pptx
 */
See Also