cancel
Showing results for 
Search instead for 
Did you mean: 

Folders as Workflow Package

colinmcm
Champ in-the-making
Champ in-the-making
Hope this is the right place to post this question!

"Since the dawn of time Alfresco’s UI has not allowed workflows to start on folders, but the workflow engine can handle it. For this approach to work we most definitely have to be able to start workflows on folders." - Jeff Potts http://ecmarchitect.com/archives/2010/12/29/1238

This begs the question, why not? it seems an odd omission. The company I work for regularly throws around folders full of files and having to start a workflow on a single file creates "issues" !!

Jeff does go on to give a method of enabling folders as workflow packages but this is based on an earlier version, the files he refers to do not even exist in Community 5 - does anybody know how to implement workflows on folders in Community 5.0.b?

I tried this also, http://www.codingfreaks.net/2014/07/alfresco-activiti-workflow-form-how-to_9.html , but the file contents are different.

Any help is much appreciated.

Colin



1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

wow, that quote from Jeff is from a long, long time ago.

I consider the default workflows Alfresco provided / provides as merely examples and the UI built to support these examples, with very little creativity in regards to "what actual workflows require".
The "only" limitation the Alfresco Share UI imposes is that you can not really select folders as "packageItems" and that the "Start workflow" action is not available on the folder level. The last part can be fixed by configuration, the first part by ignoring "packageItems" (provided just as a default way of handling workflow contents) and using your own workflow data model.

We have implemented workflows based on folders going back the same year Jeff published his blog post. We typically use the workflow data model to define our own semantic properties / associations for contained elements - be they folders or documents - and almost never use "packageItems". No modifications to Alfresco were necessary - all could be provided by regular configuration of the process definition, data model and form definition.

In Community 5.0.b the Explorer UI was removed, so a lot of the old workflow-related blogs do not apply when it comes to source code examples. Folders can still be used as workflow packages - the relevant WorkflowService provides a createPackage(NodeRef) operation which can take "null" or a valid node reference - if a folder reference is passed, that folder is "promoted" to a workflow package.

Regards
Axel