Look, workflow started on a folder!

Showing results for 
Search instead for 
Did you mean: 

Look, workflow started on a folder!

Active Member II
0 0 1,660

Ever wondering why Alfresco Share cannot start a workflow with a folder as its asset instead of a document? I happen to have a couple client projects that would make the most sense if I can design the workflow works that way. After some tinkering, here it is:

In any running Alfresco Share instance, find this file: tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml then change this line from:


<action type="action-link" id="onActionAssignWorkflow" asset="document" icon="document-assign-workflow" label="menu.selected-items.assign-workflow"/>


<action type="action-link" id="onActionAssignWorkflow" icon="document-assign-workflow" label="menu.selected-items.assign-workflow"/>
Then restart Alfresco Share (or just Alfresco if you are running Community). Login to Share and go to the Repository. Check mark any folder then click the "Selected Items..." drop-down menu. You will find the "Start Workflow..." action. Select "Assign a task to yourself or ..." In the pop-up dialog, cut/paste "Look, workflow started on a folder!" into the Message box. Notice in the "Items" section below that? Finish the dialog then go to "Tasks" > "My Task" > "Look, workflow started on a folder!" to find the same folder listed in the "Items" section.
The association of a workflow with its "Items" is merely a list of NodeRef. There is no reason to limit ourselves with only documents and not folders. This proof of concept only demonstrates using the "Selected Items..." menu. You should be able to add the same action to other action menus or your own ADF/ACA application.