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

Question

Question

Custom Workflow Activity and For Each File activity

asked on April 8, 2014

I am building a custom workflow activity that I would like to expose a file list to the For Each File activity but I am having difficulty locating the appropriate LF collection to populate.

 

I see that there is a FileBookmarkCollection when I browse the LF objects.  I have tried to populate that collection with objects of type FileBookmark and the For Each File activity will recognize the exposed collection but it fails to iterate the collection.

 

Is the FileBookmarkCollection the appropriate collection to populate and present to the For Each File activity?

0 0

Replies

replied on April 9, 2014

Hi Cliff,

 

Have you tried declaring your collection object as simply "object"? (assuming VB.Net).Variant-type declarations tend to work well when there's no obvious collection type to use.

 

Can you supply any of the code you've been working on? I'd like to help but haven't time to write a full test scenario so it would be helpful to start with your code.

 

-Ben

 

0 0
replied on April 9, 2014 Show version history

Ben - I have not tried an object collection but I can give that a shot.  I was trying to follow LF's lead in that the For Each File activity exposes several 'file like' attributes for each member of the collection (filename, extension, fullname, path) so I assumed that there is a corresponding LF object that exposes those properties.  I guess I could instantiate a new class with those properties.  It would surprise me if it works but I will try it.

 

Thanks!

0 0
replied on April 9, 2014

Custom activities don't support creating file collections at this time.

0 0
replied on April 9, 2014

Miruna - With all respect; if any of the stock workflow activities (like the 'Retrieve Laserfiche Forms Content' activity) have the ability to create a file collection that can be made available to the 'For Each File' activity then I should be able to do the same in a custom workflow activity.

 

What I specifically need to know is what is the collection object that the 'Retrieve Laserfiche Forms Content' activity uses and potentially how to properly instantiate its member objects.

0 0
replied on April 9, 2014

Hi Cliff,

 

Miruna's answer is correct. While the stock workflow activities can do it and I could tell you exactly how to do it, you'd be using functionality that isn't part of the API that makes up custom activities and isn't guaranteed to be supported in future versions.

 

Your custom activity would become fragile and functionality could break even on a minor hotfix update if it was necessary on our part to change that portion of workflow.

0 0
replied on April 9, 2014

Ed - Thanks for the response.  Miruna - Please accept my apologies! 

 

I guess I could use the 'For Each Value' activity and then do some parsing of each value to get what I need but it isn't going to be as pretty as using the file collection.

 

Thanks!

 

 

0 0
replied on April 9, 2014

What is your use case for processing files?

0 0
replied on April 9, 2014

No worries. Asking for clarifications is never a problem.

0 0
replied on April 9, 2014

Ed - I am building a custom workflow activity to browse an FTP folder and return a list of files.  I am going to present that list for iteration to allow FTP imports directly into the repository.

 

It is one of a group of FTP related custom workflow activities.  I have one for FTP export (FTP upload), the next one is the FTP Directory Listing, followed by an FTP import (FTP download), and finally an FTP File I/O to move and/or delete the docs on the FTP site once they are imported.

 

Don't know for sure if there is a need (or a market) for them.  Any thoughts?

0 0
replied on April 9, 2014

I think in this case you would be better off with the For Each Value activity actually.

 

The For Each File activity checks if the activity exists on the file system and I'm not sure that would of worked from a FTP source.

 

As for need, we've heard very few enhancement requests regarding FTP.

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

Sign in to reply to this post.