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

Question

Question

New to Workflow and Forms

asked two days ago

Hi, I am new to Laserfiche forms and workflow. I would like to have a filled-out form go to a user's folder on a different Windows file server. Is there a export or way to do that in workflow? I have email working, but there are some things we don't want to email   

0 0

Replies

replied two days ago Show version history

I have a few processes in Workflow that export an entry out of the repository and to a file path on the server.  It's done by an SDK Script activity, which I'll include below.

Since you said it is from a form, I would recommend having the form first use the Save to Repository Service Task to create the entry in the repository, and the Workflow Service Task to call your Workflow.  Have it save it in PDF format, because the script below is assuming it is an electronic document attachment on the entry.

If you are on version 12, you should be able to pass the values from Forms to Workflow regarding the entry that was created earlier in the Forms process (such as the entry ID).  If you are still on version 11, then you will want your Workflow to search for that entry in the Repository (in which case, you may want to do something like having the Save to Repository Service Task include the Forms Instance ID # in the fields, so that it's easy to search for via that value).  Either way, you'll likely need Either a Search Repository or Find Entry activity to get the specific entry(ies) and a For Each Entry activity to loop through the result(s) from the Search/Find.

Once you have identified your entry in Workflow - you'll need a token value named File Path with the value of that being the full file path and file name (with the .pdf extension included).  The script is going to use this token - I do it this way to make it easier to manage/edit since a token is easier to work with than the script.  It's also easier to use other tokens within the File Path token.

Then you can run this script within an SDK Script activity, set to C#, and selecting the entry that you identified earlier in the workflow: 

        protected override void Execute()
        {

            // Get document
            DocumentInfo doc = (DocumentInfo)this.BoundEntryInfo;

            // Initialize Document Exporter
            DocumentExporter dExp = new DocumentExporter();

            // Export electronic document
            var filePath = GetTokenValue("File Path").ToString();
            dExp.ExportElecDoc(doc,filePath);

            // Cleanup document object
            doc.Dispose();

        }

 

1 0
replied two days ago

We are on 12 now. We just migrated and upgraded from 11 Thank you for this ill give it a go!

0 0
replied two days ago

There is no built in option to export documents to a Windows drive but our customers are very happy with this 3rd party add-on called Document Export that adds the activity to your Workflow designer. There is a free trial so you can try it out.

https://qfiche.com/products

0 0
replied two days ago

Thank you ill look into int as well!

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

Sign in to reply to this post.