You are viewing limited content. For full access, please sign in.

Question

Question

Workflow 8 Abilities

asked on May 8, 2013 Show version history

Our client would like to know if the following scenarios are possible with WF 8.

 

1.      Possible to export entries from LF to an external location, FTP, network share, etc.

2.      Duplicates - Is there a way for WF to do a lookup for entries having the same data in a specific field, compare it to entries residing in a specific folder,  and when it finds a match, to replace the existing entry?

3.      Lookup a receipt # in a field, in a specific folder, and search for it throughout LF and if WF finds a match, move the entry to a specified folder.  Or if it does not find a match, route to a different specified folder.

4.      Perform a look up from an Excel spreadsheet to lookup specific data in a single metadata field,  and then export those docs to an FTP or external location

 

Thank you!

0 0

Answer

APPROVED ANSWER
replied on May 9, 2013 Show version history

 

Workflow 8 can do everything you’ve mentioned below out of the box with the exception of exporting entries outside of Laserfiche. It’s possible to use Workflow to export documents out of Laserfiche but you will need to use the Workflow SDK. The reason why Workflow 8 doesn’t have any built-in activities that export documents outside of Laserfiche is because of performance. Exporting documents is considered a long running activity which can significantly affect performance on your system.

 

I hope that helped! Please let us know if you have any additional questions.

0 0

Replies

replied on July 26, 2013

You do not need the Workflow SDK to export documents. The WF SDK is used if you want to build custom activities.

0 0
replied on January 2, 2014

Is there any sample code available for an Export via Workflow script?

0 0
replied on February 10, 2016

namespace ExportDoc
{
    using Laserfiche.Custom.Activities;
    using Laserfiche.Workflow.ComponentModel;
    using Laserfiche.Custom.Activities.Design;
    using LFSO90Lib;
    using DocumentProcessor90;

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.ComponentModel;
    using System.Workflow.ComponentModel;
    using System.Drawing;
    using Laserfiche.Workflow.Activities;

    public class ExportDocActivity : CustomSingleEntryActivity
    {

        public string DocumentPath { get; set; }
       

        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            
            using (ConnectionWrapper wrapper = executionContext.OpenConnection90())
            {
                
                ILFDatabase db = (ILFDatabase)wrapper.Database;

                LaserficheEntryInfo entryInfo = this.GetEntryInformation(executionContext);
                LFDocument doc = (LFDocument)db.GetEntryByID(entryInfo.Id);

                string DocumentName = doc.Name;

                LFDocumentPages dpages = (LFDocumentPages)doc.Pages;
                dpages.MarkAllPages();


                bool exists = System.IO.Directory.Exists(DocumentPath);

                if (!exists)
                {
                    System.IO.Directory.CreateDirectory(DocumentPath);
                }

                int i = 0;
                while (System.IO.File.Exists(string.Format("{0}\\{1}.tif", DocumentPath, DocumentName)))
                {
                    i=i+1;
                    DocumentName = string.Format("{0}_({1})", doc.Name, i);
                }
              

                DocumentExporter DocE = new DocumentExporter();
                DocE.AddSourcePages(dpages);
                DocE.Format = Document_Format.DOCUMENT_FORMAT_TIFF;
                DocE.ExportToFile(string.Format("{0}\\{1}.tif", DocumentPath, DocumentName));
                doc.Dispose();
            }

            return base.Execute(executionContext);
        }

    }
}

Here is a custom activity to export a document in a network

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.